浏览代码

ALSA: hiface: Fix M2Tech hiFace driver sampling rate change

Sampling rate changes after first set one are not reflected to the
hardware, while driver and ALSA think the rate has been changed.

Fix the problem by properly stopping the interface at the beginning of
prepare call, allowing new rate to be set to the hardware. This keeps
the hardware in sync with the driver.

Signed-off-by: Jussi Laako <jussi@sonarnerd.net>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Jussi Laako 8 年之前
父节点
当前提交
995c6a7fd9
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      sound/usb/hiface/pcm.c

+ 2 - 0
sound/usb/hiface/pcm.c

@@ -445,6 +445,8 @@ static int hiface_pcm_prepare(struct snd_pcm_substream *alsa_sub)
 
 
 	mutex_lock(&rt->stream_mutex);
 	mutex_lock(&rt->stream_mutex);
 
 
+	hiface_pcm_stream_stop(rt);
+
 	sub->dma_off = 0;
 	sub->dma_off = 0;
 	sub->period_off = 0;
 	sub->period_off = 0;