sound dies after KDE starts

Alexander E. Patrakov patrakov at ums.usu.ru
Wed Sep 22 07:02:26 PDT 2004


Simon Geard wrote:
> On Tue, 2004-09-21 at 18:06 +0600, Alexander E. Patrakov wrote:
> 
>>Or, you can use the builtin helpers and put the following instead of 
>>swmix and the !default above:
>>
>>cat >/etc/asound.conf <<"EOF"
>>pcm.!default {
>>         type asym
>>         playback.pcm "plug:dmix"
>>         capture.pcm "plug:dsnoop"
>>}
> 
> 
> Ok, the above works, but not very well - even with only a single program
> running, the sound quality has dropped considerably, and ogg123 reports
> buffer underruns from ALSA. With multiple programs running, there's a
> lot of noise, and the sound is jerky.

The sound quality may have dropped because of resampling (the variant 
above doesn't specify its sampling rate, and the default of 48000 Hz is 
used in hardware). Buffer underruns can be cured by either specifying 
the buffer size in .asoundrc, or increasing HZ while compiling the kernel.

<OT>
But you probably know that Windows always resamples (that's why FM801 
always sounds badly under Windows).
</OT>

If you want to avoid resampling and buffer underruns, try (this is 
almost certainly overconfiguration, and big buffers may not work with 
all soundcards):

pcm.!default {
         type asym;
         playback.pcm {
                 type plug;
                 slave.pcm {
                         type dmix;
                         ipc_key 9576823;
                         ipc_key_add_uid yes;
                         slave {
                                 pcm {
                                         type hw;
                                         card 0;
                                         device 0;
                                 }
                                 rate 44100;
                                 format S16_LE;
				buffer_size 65536;
				period_size 16384;
				periods 128;
                         }
                 }
         }
         capture.pcm {
                 type plug;
                 slave.pcm {
                         type dsnoop;
                         ipc_key 50884685;
                         ipc_key_add_uid yes;
                         slave {
                                 pcm {
                                         type hw;
                                         card 0;
                                         device 0;
                                 }
                                 rate 44100;
                                 format S16_LE;
				buffer_size 65536;
				period_size 16384;
				periods 128;
                         }
                 }
         }
}

BTW my previous comment concerning brokenness of ARTS is outdated and 
does not apply to ARTS 1.3.0. Just make sure it is using the "ALSA" device.

-- 
Alexander E. Patrakov



More information about the blfs-support mailing list