[mythtv] Alsa capture support

Martin Møller martin at martinm-76.dk
Tue Aug 22 17:27:43 UTC 2006

Mandag 21 august 2006 16:42 skrev Matthew Wire:
> > Wouldn't saa7134-alsa work with ALSA's OSS emulation (i.e. instead of
> > using an OSS audio driver module, use an ALSA audio driver module, but
> > enable ALSA's OSS emulation)?  If so, doing so does not ignore your
> > requirements ("I'd like to do it properly") since the API used by the
> > application is largely irrelevant (unless you need access to features
> > not available in one API--and Myth doesn't).
> It should do shouldn't it.  In fact my oss emulation provides me
> with /dev/dsp1 for this purpose - except it doesn't work :(
> When I use myth to capture from /dev/dsp1 I get nothing, capturing
> from /dev/dsp (with a loopback cable) also gives nothing or static -
> I've read reports on the internet that myth does not correctly unmute
> saa7134 based cards but I've been unable to test this (and I don't have
> v4lctl to test this with).
Well, I for one have always used v4lctl to unmute and set the volume for my 
SAA7134 cards, OSS or ALSA. I also make sure (in the case of saa7134-alsa) to 
set 'video' to the recording source and turn it up about 75-85%.

My v4lctl lines:

v4lctl -c /dev/video0 volume mute off
v4lctl -c /dev/video0 volume 13

MPlayer, TVtime, etc. unmute that setting while playing and then mutes it 
again on exiting so if you use any other program to watch TV than MythTV 
you'll need to unmute the volume yourself. At least that's my experience.

I haven't tried your arecord line yet, but it would certainly be interesting 
if that works without unmuting the volume...

At present all my cards are using saa7134-alsa with OSS emulation  (and 
apparently *needs* v4l1-compat in order to record anything useful).


> Using tvtime I always get sound from the loopback correctly.  I've also
> been able to test the saa7134-alsa module by executing
> "arecord -D hw:1,0 -r 32000 -c 2 -f s16_LE | aplay - " which allows me
> to hear sound correctly.
> So, I figured if mythtv supported alsa capture my problems would be
> solved and it will also allow others to use alsa without oss which seems
> cleaner to me!
> I've been looking through the code and found audio capture code in
> Nuppelvideorecorder.c.
> I think this is the only place audio is captured so effectively I should
> only have to modify this file (plus configuration stuff).  Is that
> correct?
> What I will probably do is write a patch to replace oss support
> initially, then when I get that working put oss back in and add some
> configuration.
> Thanks,
> Matthew Wire
> _______________________________________________
> mythtv-dev mailing list
> mythtv-dev at mythtv.org
> http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev

More information about the mythtv-dev mailing list