Re: OSS sound emulation broken between 2.6.0-test2 and test3

From: Martin J. Bligh
Date: Sat Dec 27 2003 - 15:26:56 EST


>> --- compile/sound/core/oss/pcm_oss.c.old Mon Nov 17 18:29:43 2003
>> +++ compile/sound/core/oss/pcm_oss.c Sat Dec 27 10:32:30 2003
>> @@ -814,7 +814,7 @@
>> xfer += tmp;
>> if (substream->oss.setup == NULL || !substream->oss.setup->wholefrag ||
>> runtime->oss.buffer_used == runtime->oss.period_bytes) {
>> - tmp = snd_pcm_oss_write2(substream, runtime->oss.buffer, runtime->oss.buffer_used, 1);
>> + tmp = snd_pcm_oss_write2(substream, runtime->oss.buffer, runtime->oss.period_bytes, 1);
>> if (tmp <= 0)
>> return xfer > 0 ? (snd_pcm_sframes_t)xfer : tmp;
>> runtime->oss.bytes += tmp;
>
> It's not a good fix.

OK you know the code far better than I ... but it sounds a lot better ;-)
So *something* around there is broken. It sounds horrible in 2.6.0 virgin.

> The problem might be that the rate convert plugin is
> activated. When small chunks are passed to this plugin, the quality drops.
> You can check it with this command (and compare native and OSS rates):
>
> cat /proc/asound/card0/pcm0p/sub0/*

OSS rate: 44100
rate: 48000 (48000/1)

However, test2 worked fine - and it works fine with whole-frag turned on ...
has the rate conversion changed?

> Also, we fixed some OSS emulation errors in our latest code which is
> available here:
>
> bk pull http://linux-sound.bkbits.net/linux-sound
>
> or
>
> ftp://ftp.alsa-project.org/pub/kernel-patches/alsa-bk-2003-12-05.patch.gz
>
> I will prepare new patch for recent kernel soon.

I tried the above patch - doesn't help.

Thanks,

M.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/