From: Alexander E. Patrakov <> Date: Sat, 6 Oct 2007 17:32:52 +0000 (+0200) Subject: dsp->oss_format was used before it was set correctly X-Git-Tag: v1.0.15~2 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=24a38a8720c8c2ea5687b6bc2819b1e4e11993d4;p=alsa-oss.git dsp->oss_format was used before it was set correctly spotted by running "aoss flite_time 10:00" Signed-Off-By: Alexander E. Patrakov --- diff --git a/alsa/pcm.c b/alsa/pcm.c index f5ec83d..76dc916 100644 --- a/alsa/pcm.c +++ b/alsa/pcm.c @@ -215,10 +215,10 @@ static int oss_dsp_hw_params(oss_dsp_t *dsp) unsigned int rate, periods_min; if (!pcm) continue; + dsp->format = oss_format_to_alsa(dsp->oss_format); str->frame_bytes = snd_pcm_format_physical_width(dsp->format) * dsp->channels / 8; snd_pcm_hw_params_alloca(&hw); snd_pcm_hw_params_any(pcm, hw); - dsp->format = oss_format_to_alsa(dsp->oss_format); err = snd_pcm_hw_params_set_format(pcm, hw, dsp->format); if (err < 0)