Jakob Hansen
2014-05-13 21:22:32 UTC
Hello,
I am running raspbian with alsalib version 1.0.25 and driver version
k3.8.10+. The kernel is compiled according to the instructions here:
http://blog.koalo.de/2013/05/i2s-support-for-raspberry-pi.html. Since the
wm8731 does not support hardware mixing, I am using the dmix plugin, but I
have a few questions - thanks in advance for any help!
First, I have noticed a distinct degradation in audio quality when using
the Master Playback volume control in amixer. Is this an artifact of
truncation being done in the hardware, and is it possible to use dmix or
any other means to increase the bit depth before the signal reaches the
dac? Please excuse any misuse of terminology, this is all pretty new to me.
Second, sometimes setting certain parameters in asound.conf can yield
unexpected results, for example in the following pcm declaration taken
almost directly from the alsa documentation (this is just one block, not
the entire file. )
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:1,0"
format S16_LE
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
The rate is declared to be 44100, but when I issue 'cat
/proc/asound/card1/pcm0p/sub0/hw_params', the rate appears to be 48k. This
is after reloading the config file, just for the record. The odd thing is
that no matter what the input file format is, it plays back at the correct
speed (or pitch level) whether the rate is declared to be 44.1k or 48k.
But, if I declare the rate to be 96k, then hw_params shows 96k and the file
plays back at double speed, which I suppose makes some kind of sense. Can
anyone shed some light on this behavior? Similarly changing the format
declaration apparently has no effect whatsoever. Is there some other
alsa-specific means of doing rate/format conversions, and is that the key
to retaining the sound qualtiy with digital volume attenuation?
Thanks very much for reading.
Jakob
I am running raspbian with alsalib version 1.0.25 and driver version
k3.8.10+. The kernel is compiled according to the instructions here:
http://blog.koalo.de/2013/05/i2s-support-for-raspberry-pi.html. Since the
wm8731 does not support hardware mixing, I am using the dmix plugin, but I
have a few questions - thanks in advance for any help!
First, I have noticed a distinct degradation in audio quality when using
the Master Playback volume control in amixer. Is this an artifact of
truncation being done in the hardware, and is it possible to use dmix or
any other means to increase the bit depth before the signal reaches the
dac? Please excuse any misuse of terminology, this is all pretty new to me.
Second, sometimes setting certain parameters in asound.conf can yield
unexpected results, for example in the following pcm declaration taken
almost directly from the alsa documentation (this is just one block, not
the entire file. )
pcm.dmixer {
type dmix
ipc_key 1024
slave {
pcm "hw:1,0"
format S16_LE
period_time 0
period_size 1024
buffer_size 8192
rate 44100
}
The rate is declared to be 44100, but when I issue 'cat
/proc/asound/card1/pcm0p/sub0/hw_params', the rate appears to be 48k. This
is after reloading the config file, just for the record. The odd thing is
that no matter what the input file format is, it plays back at the correct
speed (or pitch level) whether the rate is declared to be 44.1k or 48k.
But, if I declare the rate to be 96k, then hw_params shows 96k and the file
plays back at double speed, which I suppose makes some kind of sense. Can
anyone shed some light on this behavior? Similarly changing the format
declaration apparently has no effect whatsoever. Is there some other
alsa-specific means of doing rate/format conversions, and is that the key
to retaining the sound qualtiy with digital volume attenuation?
Thanks very much for reading.
Jakob