LinHES Forums
http://forum.linhes.org/

HOWTO: Activate digital output on nForce2 motherboard
http://forum.linhes.org/viewtopic.php?f=11&t=1829
Page 1 of 2

Author:  ceenvee703 [ Thu Jun 24, 2004 2:01 pm ]
Post subject:  HOWTO: Activate digital output on nForce2 motherboard

This is an attempt to list the steps I took to get digital output (a.k.a. optical out or S/PDIF out) working with MythTV and my nForce-based motherboard, a Shuttle SN41G2. I can't say that all these steps are necessary, but they're what worked for me. YMMV.

1. Install KnoppMyth (this is the easy part :) I am using R4V4.1 currently

2. Open an Xterm window and check that your nForce2 motherboard is set up correctly:

Code:
cat /proc/asound/pcm


If you see:

Code:
00-00: Intel ICH : NVidia nForce2 : playback 1 : capture 1
00-01: Intel ICH - MIC ADC : NVidia nForce2 - MIC ADC : capture 1
00-02: Intel ICH - IEC958 : NVidia nForce2 - IEC958 : playback 1


you are in good shape: skip to step #10!

If you only see:

Code:
00-00: Intel ICH : NVidia nForce2 : playback 1 : capture 1


you'll (apparently) need to recompile alsa for your nForce2 mobo. At least that's what I did and it worked. Follow these next steps to do so.

3. su to root and go to the /usr/src directory:

Code:
su
cd /usr/src


4. Download the latest alsa-driver, alsa-lib, and alsa-utils from http://www.alsa-project.org/ to the /usr/src directory. You'll need to get the same versions from each ftp directory. In the wget commands that follow, substitute the version you're getting with the version I used (which was 1.0.5rc1), and substitute mirror sites if appropriate:

Code:
wget ftp://ftp.alsa-project.org/pub/driver/alsa-driver-1.0.5rc1.tar.bz2
wget ftp://ftp.alsa-project.org/pub/lib/alsa-lib-1.0.5rc1.tar.bz2
wget ftp://ftp.alsa-project.org/pub/utils/alsa-utils-1.0.5rc1.tar.bz2


5. Now expand the files you just downloaded.

Code:
bunzip2 alsa-driver-1.0.5rc1.tar.bz2
bunzip2 alsa-lib-1.0.5rc1.tar.bz2
bunzip2 alsa-utils-1.0.5rc1.tar.bz2
tar -xf alsa-driver-1.0.5rc1.tar
tar -xf alsa-lib-1.0.5rc1.tar
tar -xf alsa-utils-1.0.5rc1.tar


6. To get the source to compile you'll also need to expand some kernel stuff. In my case with R4V4.1 it was:

Code:
bunzip2 linux-2.4.25-chw.tar.bz2
tar -xf linux-2.4.25-chw.tar


7. At this point I pretty much followed the directions for the nForce2 motherboard found on Alsa's page for nForce2 support. Again, substitute your alsa info for what I'm using below:

Code:
cd alsa-driver-1.0.5rc1
./configure --with-cards=intel8x0 --with-sequencer=yes
make
make install
cd ..
cd alsa-lib-1.0.5rc1
./configure
make
make install
cd ..
cd alsa-utils-1.0.5rc1
./configure
make
make install


8. Insert the modules into the kernel:

Code:
modprobe snd-intel8x0
modprobe snd-pcm-oss
modprobe snd-mixer-oss
modprobe snd-seq-oss


(EDIT:)Then reboot your system.

9. Now do a post-install check of your motherboard.

Code:
cat /proc/asound/pcm


You should see:

Code:
00-00: Intel ICH : NVidia nForce2 : playback 1 : capture 1
00-01: Intel ICH - MIC ADC : NVidia nForce2 - MIC ADC : capture 1
00-02: Intel ICH - IEC958 : NVidia nForce2 - IEC958 : playback 1


10. Check your mixer settings with alsamixer:

Code:
alsamixer


WIth the non-GUI alsamixer, use your left and right arrow keys to scroll through all mixer settings, and up and down arrows to increase or decrease levels. Make sure that the IEC958 settings are not muted. If an "M" appears above that channel, press M to unmute it. (Many of these settings are more easily set with the GUI-based gnome-alsamixer... you can always apt-get install it if you would rather use it.)

After making changes via alsamixer (and pressing Esc to exit and save changes), store the settings via:

Code:
/usr/sbin/alsactl store


11. Use the asoundrc file found at this excellent Digital Sound HOWTO page. (Read it too while you're at it. :) The asoundrc file is found half way down the page and is called "The (I hope it's the definitive) .asoundrc for nForce2". This file can be placed either in ~/.asoundrc or /etc/asound.conf. I placed it in the latter location:

Code:
cd /etc/
nano asound.conf


(copy and paste asoundrc file into the document, save changes, exit nano)

12. Start up MythTV frontend again. Go to Settings->General and change Audio from "/dev/dsp" to "ALSA:Analog" just to test. Start a recording or live TV. You should hear audio via the analog outs as usual. Then return to the general settings and change Audio to "ALSA:Digital" to activate digital output. Return to a recording or live TV. You should hear audio via your digital out.

(I will also be adding this to the KnoppMyth wiki)

Author:  wififun [ Thu Jun 24, 2004 7:10 pm ]
Post subject: 

that was a great how to. I went back through it again thinking I missed something from before when I did it based on the previous posts.
I had no trouble getting:
Code:
cat /proc/asound/pcm
00-00: Intel ICH : NVidia nForce2 : playback 1 : capture 1
00-01: Intel ICH - MIC ADC : NVidia nForce2 - MIC ADC : capture 1
00-02: Intel ICH - IEC958 : NVidia nForce2 - IEC958 : playback 1


Then turning everything on and up in the alsamixer, and saving those changes. I created an asound.conf and pasted in
Quote:
The (I hope it's the definitive) .asoundrc for nForce2

For good measure I even put in a .asoundrc into /home/mythtv like you mentioned before. Just not getting anything.

In the mythtv settings I have to manually type ALSA:Analog or :Digital, because those choice are not there, but still no go. It tells me it can not find the audio device when I go to watch tv. Pass through is on... actualy I have read through and checked everything about 7 times now.

Author:  ceenvee703 [ Thu Jun 24, 2004 7:42 pm ]
Post subject: 

About the only thing I can recommend is to test that your alsa setup is OK. The digital sound HOWTO that posted the asoundrc file, mentions a test just before that file listing:

Quote:
To test the output devices, execute the command:

aplay -D devicename /path/to/audio/file.au

replacing devicename with one of default, analog, mixed-analog, digital, or mixed-digital. aplay doesn't support many formats, so an au file is probably the easiest one to test with. If you need one, download ftp://ftp.kernel.org/pub/linux/kernel/S ... english.au and you can hear Linus pronounce Linux (from 1994).


For me, trying this with both "analog" and "digital" works without errors. I can't help much beyond this because, believe me, I shocked myself when I got it to work. :-/

Author:  wififun [ Thu Jun 24, 2004 11:28 pm ]
Post subject: 

EDIT: I got it... RTFM wifi... :-) I had to go back one more time to the Digital Sound Howto and found something else... My exact problem... Any way... it now works... I am worried I will have to pop Passthrough on and off every time I want to play something that outputs AC3 though... but by turning off Passthrough it works. Thanks for your help.

Ahh I did see that while reading that site... Just always kept going. A quick test of:
Code:
aplay -D digital ~/english.au

worked with out a hitch...

I am really wondering if the problem is just what is being put in the Audio output device in Setup->General.

I have tried many different combinations, and none seem to work. The audio is working but not in MythTV.

Settings in myth:
Audio output device: ALSA:digital (non capitalized digital at least myth does not say there is no audio device when going to watch tv anything else fails with that error)
Enable AC3 to SPDIF is checked
Aggressive is not checked
Use internal volume controls checked (and volume is up)
Mixer device /dev/mixer
Mixer controls PCM
I have tweaked back and forth just about everything. It is nice to know that the audio is working though...

Author:  Xsecrets [ Thu Jun 24, 2004 11:42 pm ]
Post subject: 

wififun what version of knoppmyth are you working with?

Author:  alien [ Fri Jun 25, 2004 4:12 pm ]
Post subject: 

I got as far as being able to play the .au file from the command line over my spdif interface (note to others who may be using this great HowTo: I had to do a reboot after adding the modules in).

However, in MythMusic, I keep getting an error that it can't open the ALSA:digital device (I tried ALSA:digitial, ALSA:Digital, ALSA:analog, ALSA:default and even asdfasdf and I got the same error). I seem to have missed something.

Any ideas?

Allen

Author:  ceenvee703 [ Fri Jun 25, 2004 6:02 pm ]
Post subject: 

Quote:
However, in MythMusic, I keep getting an error that it can't open the ALSA:digital device (I tried ALSA:digitial, ALSA:Digital, ALSA:analog, ALSA:default and even asdfasdf and I got the same error). I seem to have missed something.


Sorry, you didn't miss anything, I just was vague about my results. I got optical out working with MythTV and only MythTV... I too can't get MythMusic to use the digital out. I haven't played much with alsamixer, though, and it does have that "Analog to IEC958 output" option, which I just noticed is set to 0 on my system. Not sure I'll get a chance to play with it more, so see if that alsamixer setting matters...

Author:  wififun [ Fri Jun 25, 2004 7:48 pm ]
Post subject: 

I know during my quest I saw some information on routing analog to the spdif. I think is was on that Digital How To page. I will be working on that this evening. If I get it up, I will this post to include the information.

Author:  alien [ Mon Jun 28, 2004 1:02 am ]
Post subject: 

In my attempts, I tried routing the default to S/PDIF with no luck (I can't remember if I used the exact entry in the sound how-to or if I used what was in the comments at the top of the nforce2 .asound on the same page... I think they are the same, just written differently). Didn't work.

What is interesting is that I just discovered four 0 length files in ~allen (ALSA, ALSA:digital ALSA:pcm.digital and asdf), all owned by root. I may have started myth under my userID instead of mythtv some point. These match some of the attempts I made setting the mythmusic sound out (asdf was one of my attempts).

These three attempts might have been the three I tried after runing ./snddevices as described in http://www.alsa-project.org/alsa-doc/do ... e=intel8x0

Allen

Author:  beamland [ Tue Jun 29, 2004 12:55 am ]
Post subject: 

alien wrote:
However, in MythMusic, I keep getting an error that it can't open the ALSA:digital device (I tried ALSA:digitial, ALSA:Digital, ALSA:analog, ALSA:default and even asdfasdf and I got the same error). I seem to have missed something.
Allen

I have no problem with MythMusic... I routed analog to spdif using the same howto. However, in my /etc/modutils/alsa-0.9-knoppix I added
Code:
options snd-pcm-oss adsp_map=2

and did an update-modules, a depmod -a and a reboot afterwards. In mythtvfrontend I then went into Setup -> General and set my default device to /dev/adsp. Everything except AC3 through digital out works for me... liveTV, recordings, music, video, ... ;-)

Author:  wififun [ Tue Jun 29, 2004 9:52 pm ]
Post subject: 

beamland,
Using your post above, and toying around with some other things including this post:
http://mysettopbox.tv/phpBB2/viewtopic.php?t=1650

I have SPDIF out working for ALL parts of MythTV.

Here is the short version: Follow the great how-to here by ceenvee703, then with your (beamland) additions all that is left is the information from that topic: add
Code:
-ao alsa9:iec958

to the mplayer options for files that do not have ac3 and
Code:
-ao alsa9:iec958 -ac hwac3

for the mplayer command used to play dvd's and any video files that have ac3 streams (like dvd rips).
That has it all working for me. Thanks you all for the input. I hope this helps more people with nforce2 boards.

Author:  Xsecrets [ Tue Jun 29, 2004 10:39 pm ]
Post subject: 

seems like there was a thread about the mplayer command for spdif output before and if you use the hardware command and put a , after it then it will work for both or something like that. At any rate could someone make sure that the howto over on the wiki reflects the latest developments?

Author:  ceenvee703 [ Wed Jun 30, 2004 6:41 am ]
Post subject: 

Yes, here's the thread:

http://mysettopbox.tv/phpBB2/viewtopic. ... ayer+comma

It says to add the comma after the -ac hwac3 to allow for either AC3 passthrough or software encoding of anything else.

I've updated the wiki page with the additional steps. Thanks everyone.

Author:  alien [ Wed Jun 30, 2004 8:48 am ]
Post subject: 

beamland wrote:
I have no problem with MythMusic... I routed analog to spdif using the same howto. However, in my /etc/modutils/alsa-0.9-knoppix I added
Code:
options snd-pcm-oss adsp_map=2

and did an update-modules, a depmod -a and a reboot afterwards. In mythtvfrontend I then went into Setup -> General and set my default device to /dev/adsp. Everything except AC3 through digital out works for me... liveTV, recordings, music, video, ... ;-)

I tried this, but no luck. I did notice that I am getting warnings when the alsa modules initiaze. Some of them were related to other entries in alsa-0.9-knoppix. Any idea what configure created this file so I can try it again?

Thanks,

Allen

Author:  wififun [ Wed Jun 30, 2004 9:47 am ]
Post subject: 

Allen,
I saw an error that sounds like what your are talking about. But with out the exact message I am not sure. I saw it when I did not compile alsa 1.0.5 correctly and get is configured. This was before the howto above. I would suggest going through step by step the alsa 1.0.5rc1 setup above, and create the /etc/asound.conf file. Give yourself a clean slate. I have since reinstalled on another drive to make sure I have this down. And by following those steps exactly it worked for me. I will try adding the comma to the mplayer line when I get home in hopes that it means I won't have to edit as much. What I have done now is set mplayer options for file types. This is working well even if the comma thing doesn't work, but it looks like it should. Good luck.

Page 1 of 2 All times are UTC - 6 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/