Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 2d4d3f27 authored by Vladimir Zapolskiy's avatar Vladimir Zapolskiy Committed by Ajay Agarwal
Browse files

usb: gadget: u_audio: remove cached period bytes value



Substream period size potentially can be changed in runtime, however
this is not accounted in the data copying routine, the change replaces
the cached value with an actual value from substream runtime.

As a side effect the change also removes a potential division by zero
in u_audio_iso_complete() function, if there is a race with
uac_pcm_hw_free(), which sets prm->period_size to 0.

Change-Id: Id9e5dc114d61976582a96b1ba1758078057dcb89
Fixes: 132fcb46 ("usb: gadget: Add Audio Class 2.0 Driver")
Signed-off-by: default avatarVladimir Zapolskiy <vladimir_zapolskiy@mentor.com>
Signed-off-by: default avatarEugeniu Rosca <erosca@de.adit-jv.com>
Signed-off-by: default avatarFelipe Balbi <felipe.balbi@linux.intel.com>
Git-commit: 773e53d50e227b0c03d0bb434c1636f6c49c75b2
Git-repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git


Signed-off-by: default avatarAjay Agarwal <ajaya@codeaurora.org>
parent 5e79fd6f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment