[mythtv-users] Two bttv cards - trying to access the second audiostream- SOLVED

Bob Bulloch bbulloch at shaw.ca
Sat Jan 31 16:27:09 EST 2004


OK, I managed to figure it out (reading is a good thing). There is a
glitch in devfs documented (at the following link) for kernels up to
2.4.20 (I'm using  gentoo 2.4.20). 

http://alsa.opensrc.org/index.php?page=Getting+oss+emulation+to+work+wit
h+2+Sound+cards

They have posted a workaround that describes using a shell script at
bootup to manually create the appropriate entries in /dev that devfs
would normally create at bootup.

Their solution:

nano -w /etc/conf.d/local.start

#Set up device nodes for alsa oss emulation for the second sound card
mknod  /dev/sound/dsp1 c 14 19 mknod  /dev/sound/mixer1 c 14 16 chown
root.audio /dev/sound/dsp1 chown root.audio /dev/sound/mixer1 chmod 664
/dev/sound/dsp1 /dev/sound/mixer1 ln -s /dev/sound/dsp1 /dev/dsp1 ln -s
/dev/sound/mixer1 /dev/mixer1

	Once I did this, I then had /dev/dsp1 

	It was then a matter of using mythsetup to assign /dev/dsp1 to
the second capture card's audio source (although I have to admit, at
first I forgot to use the right-arrow to select /dev/dsp1 -- I initially
tried to just type it in, --- of course that didn't work)

	I am not sure about how this script behaves on the next boot. It
seems to me that the links from /dev/dsp1 -> /dev/sound/dsp1 (and same
for the mixer) cannot be created at each bootup. On a subsequent bootup
I got an error message complaining that the link already existed, so
I'll likely have to remove the last two lines. I won't worry about that
for now. It's working GREAT! I can now record two different shows at the
same time while watching a third show recorded at an earlier time. I
can't say enough good things about this project. It's awesome

Bob


-----Original Message-----
From: Rob Rosenfeld [mailto:rosenfeld at alum.mit.edu] 
Sent: January 25, 2004 5:27 PM
To: 'Bob Bulloch'
Subject: RE: [mythtv-users] Two bttv cards - trying to access the second
audiostream

Just to confirm, you have drivers for both loaded?  I think you do if
you see both devices in /proc/asound.

Gentoo uses the devfs, so you don't create files in the dev structure.
I believe they're automagically created as needed. 

Have you been through the Gentoo docs for ALSA?  I found the following
in http://www.gentoo.org/doc/en/alsa-guide.xml that should get you going
w/ multiple soundcards:

-----begin blurb-----
Code listing 2.7: In /etc/modules.d/alsa

## and then run `modules-update' command.
## Read alsa-driver's INSTALL file in /usr/share/doc for more info. ##
##  ALSA portion alias snd-card-0 snd-emu10k1 ## If you have more than
one, add: ## alias snd-card-1 snd-intel8x0 ## alias snd-card-2
snd-ens1370 ##  OSS/Free portion ## alias sound-slot-0 snd-card-0 ##
alias sound-slot-1 snd-card-1 ##

Note: If you have more than one soundcard, adjust the cards_limit value
and add more snd-card aliases to the file. I don't have experience with
this, but you can find examples for configurations with two or more
soundcards in Chapter 6 of the ALSA Howto.

-----end   blurb-----

> -----Original Message-----
> From: mythtv-users-bounces at mythtv.org [mailto:mythtv-users- 
> bounces at mythtv.org] On Behalf Of Bob Bulloch
> Sent: Sunday, January 25, 2004 5:08 PM
> To: mythtv-users at mythtv.org
> Subject: [mythtv-users] Two bttv cards - trying to access the second 
> audiostream
> 
> 	I have myth running on gentoo. I'm using alsa. The first bttv
card 
> works fine. I can watch live tv, record etc and the sound is sync'd 
> fine. When I try to use the second bttv card, I cannot figure out how 
> to get to the second audio stream.
> 
> 	I have 2 audio cards, the first is an on-board using the
intel8x0 
> module, and the second is a pci card that uses the ens1371 module. 
> Both have a patch cord linking the bttv audio-out to the sound cards' 
> line-in. When I lspci, I see them both. Under /proc/asound they both 
> appear, listed as card0 and card1. I think the problem arises from 
> what does not appear under /dev
> 
> 	So far /dev/dsp is a link to /dev/sound/dsp
> 
> 	The /dev/sound directory looks like this:
> 
>     drwxr-xr-x    1 root     root           0 Dec 31  1969 ../
>     crw-rw----    1 root     audio          0 Dec 31  1969 audio
>     crw-rw----    1 root     audio          0 Dec 31  1969 dsp
>     crw-rw----    1 root     audio          0 Dec 31  1969 mixer
>     crw-rw----    1 root     audio          0 Dec 31  1969 sequencer
>     crw-rw----    1 root     audio          0 Dec 31  1969 sequencer2
>     crw-rw----    1 root     audio          0 Dec 31  1969 unknown
> 
> Isn't there supposed to be /dev/dsp0 /dev/dsp1 etc?
> 
> 	The first bttv card is using /dev/dsp, but I have nothing to
tell the 
> second bttv card to use.
> 
> 	I have tried aplay -Dhw.1 with pop.wav and it plays ok (from the

> speaker out on second card). I can use alsamixer -c0 and alsamixer 
> -c1. So I am assuming that alsa is working on the second card.
> 
> 	I've tried playing around in /etc/modules.d/alsa but nothing
seems to 
> make any difference.
> 
> 
> 	Do I need to manually create new /dev/dsp 's and if so how?
> 
> Thanks
> 
> Bob
> 




More information about the mythtv-users mailing list