]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ALSA: hiface: Fix M2Tech hiFace driver sampling rate change
authorJussi Laako <jussi@sonarnerd.net>
Mon, 28 Nov 2016 09:27:45 +0000 (11:27 +0200)
committerJiri Slaby <jslaby@suse.cz>
Thu, 26 Jan 2017 16:22:28 +0000 (17:22 +0100)
commit 995c6a7fd9b9212abdf01160f6ce3193176be503 upstream.

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>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
sound/usb/hiface/pcm.c

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