[mythtv-users] Multiple cards with different audio sample rates

Michael T. Dean mtdean at thirdcontact.com
Fri Jun 2 22:02:37 UTC 2006


On 06/02/2006 03:55 PM, Michael Lynch wrote:
> On 6/2/06, Michael T. Dean <mtdean at thirdcontact.com> wrote:
>   
>> On 06/02/06 00:09, Michael Lynch wrote:
>>> The bttv card needs to have a sample rate of 48000 or the audio gets
>>> terrible (humming) and the saa713x card needs to have a sample rate of
>>> 32000.  Herein lies my problem.  With the audio sample rate set to
>>> 48000 for the 'Live TV' recording profile, the bttv audio is perfect,
>>> but the saa713x audio turns to chipmunks.  If it change the 'Live TV'
>>> audio sample rate to 32000 to accomodate the saa713x card, the bttv
>>> card begins to hum.
>> http://www.mythtv.org/wiki/index.php/DigitalSoundHowTo#Setting_up_ALSA.27s_.asoundrc.2C_Properly
>>
>> Fix that and you can play back the 32kHz audio without problems.
> Does it matter if I'm not using the digital out?
>   

Yes, the ALSA configuration file matters if you're not using digital 
out.  Or, no, it makes no difference whether you're using digital or 
analog out--without a proper ALSA configuration some streams won't play 
properly on your sound card.  (Wasn't sure which question you were 
asking.  :)

Some sound cards ("software" sound cards) offload a lot of audio 
processing to the CPU.  For example, the much-touted NVIDIA nForce 
SoundStorm APU is really just a pretty nice audio driver with some basic 
hardware support.  Your card is one of these.

Fortunately, ALSA means that we have a pretty nice audio driver for 
/all/ sound cards--even those with bad Windows drivers.

> The above question aside...if I understand the wiki page correctly, I
> can pretty much drop in that config file with minor changes.
>
> I need to verify the device number for the "analog-hw" and/or
> "digital-hw" virtual devices, and change them accordingly in the
> config.  Running aplay -l gives me card 0 with device 0 as ICH5 and
> card 0 with device 4 as ICH5-IEC958.  That being said after I change
> the settings in the config file should I change anything else?
> Reading on the alsa-project web page it states that the
> .asound/asound.conf files "allow extra functionality, such as routing
> and sample-rate conversion, through the alsa-lib layer" - I'm guessing
> this is how the captured audio gets 'fixed' so that my playback is
> good no matter what.
>
> If I'm missing the whole point, please let me know.

Exactly right.  By my reading, you have to change one place in the 
.asoundrc--the digital-hw device should be 4.  (Although, if you never 
use digital output, it won't really matter if you don't change it.)

Then, either specify a default audio device in the ALSA configuration 
file as appropriate (the first section of the file--which currently 
specifies mixed-analog as the default), or tell Myth to use 
"ALSA:analog" or "ALSA:mixed-analog" with the mixer device "default" and 
everything will work.

Mike




More information about the mythtv-users mailing list