[alsa-devel] How to set idle S/PDIF sample rate?
Matt Whitlock
matt at whitlock.name
Sat Feb 23 04:34:22 CET 2008
When no programs have the sound hardware open, ALSA drives my Intel HDA's S/PDIF output with silence at 48000 Hz. How would I change this default so that the idle sample rate is 44100 Hz? The reason I ask is that my stereo receiver misses the first second or so of each song that I play as it switches from 48000 Hz to 44100 Hz. I understand that by switching the idle sample rate to 44100 Hz, I would have the same problem whenever playing a DVD, but I can much more happily accept the switching delay when starting DVDs than I can when starting music playback.
I've tried everything, including replacing /usr/share/alsa/alsa.conf with a single PCM definition that outputs straight to hardware with "rate 44100", but still, whenever nothing is accessing the sound hardware, ALSA reverts to 48000-Hz silence. There must be a way to influence that, right?
Alternatively, if ALSA would simply not output anything over S/PDIF when idle, my receiver could just stay at 44100 Hz, albeit unlocked since there would be no data stream at all. So this is also an acceptable solution to me, but I cannot find any way to make ALSA totally shut up when idle. It always wants to output silence. Interestingly, if I mute the IEC958 playback channel and then unmute it, my receiver reports no signal at all until I play a sound, and then after the sound finishes, my receiver reports that it is locked onto PCM at 48000 Hz. Seems kind of like a bug, doesn't it?
Thanks to anyone who can lend some assistance.
More information about the Alsa-devel
mailing list