From: Takashi Iwai Date: Tue, 12 Apr 2005 15:33:59 +0000 (+0200) Subject: [ALSA] Fix capture on OSS emulation X-Git-Tag: v2.6.13-rc1~68^2~690 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=004e65389714721ce0f52a8f0fc22999d3908a2a;p=linux-2.6 [ALSA] Fix capture on OSS emulation ALSA<-OSS emulation Fix the noisy capture on some hardwares over OSS emulation. Change back to avail_min = period_size for capture direction. Signed-off-by: Takashi Iwai --- diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c index 1a805020f5..6c8fdcaf9f 100644 --- a/sound/core/oss/pcm_oss.c +++ b/sound/core/oss/pcm_oss.c @@ -464,7 +464,8 @@ static int snd_pcm_oss_change_params(snd_pcm_substream_t *substream) sw_params->tstamp_mode = SNDRV_PCM_TSTAMP_NONE; sw_params->period_step = 1; sw_params->sleep_min = 0; - sw_params->avail_min = 1; + sw_params->avail_min = substream->stream == SNDRV_PCM_STREAM_PLAYBACK ? + 1 : runtime->period_size; sw_params->xfer_align = 1; if (atomic_read(&runtime->mmap_count) || (substream->oss.setup && substream->oss.setup->nosilence)) {