]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: u_audio: update hw_ptr in iso_complete after data copied
authorJoshua Frkuska <joshua_frkuska@mentor.com>
Thu, 21 Jun 2018 15:22:48 +0000 (17:22 +0200)
committerFelipe Balbi <felipe.balbi@linux.intel.com>
Tue, 17 Jul 2018 07:12:51 +0000 (10:12 +0300)
commit74146fd57e87d0e77c478387669b7b8b091e7f2f
treefbd87fc72b94aca70809b7043467c106ca2bb0c2
parent23568e0dc0cc7d3e8431e40d5e6486ae34a1d8a4
usb: gadget: u_audio: update hw_ptr in iso_complete after data copied

In u_audio_iso_complete, the runtime hw_ptr is updated before the
data is actually copied over to/from the buffer/dma area. When
ALSA uses this hw_ptr, the data may not actually be available to
be used. This causes trash/stale audio to play/record. This
patch updates the hw_ptr after the data has been copied to avoid
this.

Fixes: d43b6f02d0c1 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: Joshua Frkuska <joshua_frkuska@mentor.com>
Signed-off-by: Eugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
drivers/usb/gadget/function/u_audio.c