From: Mark Greer Date: Tue, 9 Jun 2015 22:29:35 +0000 (-0700) Subject: greybus: gb-audio: Reset sample count when CPort deactivated X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1484 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=45f427a02ecee25885542ad1e449b1ae72b85a53;p=karo-tx-linux.git greybus: gb-audio: Reset sample count when CPort deactivated The sample count placed in Greybus I2S audio messages should be reset every time a new audio stream is set up. However, the current code does not do the reset so make it so it does. Signed-off-by: Mark Greer Acked-by: John Stultz Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/audio-pcm.c b/drivers/staging/greybus/audio-pcm.c index 4d2f0ab132ee..fa5e85dfc83b 100644 --- a/drivers/staging/greybus/audio-pcm.c +++ b/drivers/staging/greybus/audio-pcm.c @@ -57,6 +57,7 @@ static void gb_pcm_work(struct work_struct *work) pr_err("deactivate_cport failed: %d\n", ret); snd_dev->cport_active = false; + snd_dev->send_data_sample_count = 0; } return;