]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commitdiff
greybus: gb-audio: Reset sample count when CPort deactivated
authorMark Greer <mgreer@animalcreek.com>
Tue, 9 Jun 2015 22:29:35 +0000 (15:29 -0700)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 10 Jun 2015 17:35:03 +0000 (10:35 -0700)
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 <mgreer@animalcreek.com>
Acked-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/audio-pcm.c

index 4d2f0ab132eef66b8b02b8eeb95556607edc21f5..fa5e85dfc83be9b5f4b1bb9e88fe48853133a57f 100644 (file)
@@ -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;