lkml.org 
[lkml]   [2017]   [Jan]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.12 021/235] ALSA: hiface: Fix M2Tech hiFace driver sampling rate change
    Date
    From: Jussi Laako <jussi@sonarnerd.net>

    3.12-stable review patch. If anyone has any objections, please let me know.

    ===============

    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 | 2 ++
    1 file changed, 2 insertions(+)

    diff --git a/sound/usb/hiface/pcm.c b/sound/usb/hiface/pcm.c
    index c21a3df9a0df..d4d036fca6cb 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;

    --
    2.11.0
    \
     
     \ /
      Last update: 2017-01-27 13:03    [W:5.558 / U:0.664 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site