[mythtv] [mythtv-commits] Ticket #5900: AO: Generalise upmix and AC-3 encoding
cal at graggrag.com
Thu Nov 13 07:48:32 UTC 2008
John P Poet wrote:
> On Wed, Nov 12, 2008 at 2:52 PM, foo bar <foobum at gmail.com> wrote:
>> On 12/11/2008, John P Poet <jppoet at gmail.com> wrote:
>>> With modern ALSA, my ice1712 based sound card is just plug-n-play. No
>>> .asoundrc file necessary at all. Foo managed to make me paranoid that
>>> ALSA might actually be re-sampling 44.1KHz into 48KHz, and maybe I had
>>> not noticed the drop in quality - since I have not used my audiotron
>>> in so long.
>> The test you outlined just shows that the card and receiver support
>> spdif clocked at 44.1k. It doesn't tell you anything about ALSA's
>> resampling or lack thereof.
>> ALSA will, by default, resample pcm (i.e. samples that you send to the
>> main device rather than AC3/DTS that you send to the iec958/spdif
>> device) that's not 48k. If we request 44.1k it presumably resamples
>> again after mixing, etc - ugh. With no asoundrc, this is probably
>> happening to you. I guess using a hw device (hw0:0 etc) prevents this.
>> The SRC we use honestly makes no audible difference (and my ears
>> aren't very old :). But if you really want "bit perfect" (digitally
>> sampled, probably lossy compressed) audio and don't mind no sw mixing
>> make sure that you are using a hw device for your main device.
> So, you are saying that if I do:
> aplay -D iec958 music.wav
> where music.wav is encoded at 44.1KHz, that alsa will convert that to
> 48KHz, then back to 44.1KHz before sending it to my receiver, just so
> it can "mix"? That is ugly. Guess I will have to craft up a
> asound.conf file to tell it not to do that. Been a while since I
> have had to do that -- gonna need a refresher.
It belongs in AudioOutputALSA, not asound.conf. If you explicitly don't
want alsa to do any resampling, you simply have to tell it that during the pcm
initialization. Unless told otherwise, alsa defaults to "yes, I'll accommodate
your crappy soundcard but I'll have to resample".
A question I'm fuzzy on on is just when "no alsa resample!" is required/desired?
Always? Sometimes only, depending on ... what? Putting such functionality into
AudioOutputALSA is trivial (the current one flies with the default), but what's
the logic around it?
> My receiver definitely says it is receiving a 44.1KHz signal, so I
> know the sound card is delivering it at the correct rate.
Nice to hear!
More information about the mythtv-dev