summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorJussi Laako <jussi@sonarnerd.net>2016-11-28 11:27:45 +0200
committerSasha Levin <alexander.levin@verizon.com>2017-01-12 20:56:57 -0500
commited21b94ebbf4218baadbaad82bbea8a43a8bf5a9 (patch)
tree2e625f11d9fb184b16a6bdec5c69c563c24a9079 /sound
parentf8c36e2b98b7b5ea41a01c60349f70764a4e33e6 (diff)
ALSA: hiface: Fix M2Tech hiFace driver sampling rate change
[ Upstream commit 995c6a7fd9b9212abdf01160f6ce3193176be503 ] 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> Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/hiface/pcm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/hiface/pcm.c b/sound/usb/hiface/pcm.c
index 2c44139b4041..33db205dd12b 100644
--- a/sound/usb/hiface/pcm.c
+++ b/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);
+ hiface_pcm_stream_stop(rt);
+
sub->dma_off = 0;
sub->period_off = 0;