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

Commit efe66bfd authored by Sriharsha Allenki's avatar Sriharsha Allenki
Browse files

usb: gadget: f_uac2: Unblock pcm read when HOST closes stream



The pcm_read/write function which is used to read/write
from/to the pcm devices waits for the data/device even when
HOST closes the stream. And is stuck in the waiting loop for
long before it errors out. Fix this by setting the
pcm device state to SNDRV_PCM_STATE_DISCONNECTED whenever a
pcm device is open and a set alt zero happens or usb cable is
disconnected. This helps the waiting loop to error out quickly
whenever set alt zero happens or usb cable is disconnected and
thus unblocking the pcm read/write.

Change-Id: I27a8e994ff2914b0513c96d3598ac23d80398cdc
Signed-off-by: default avatarSriharsha Allenki <sallenki@codeaurora.org>
parent bd4535a8
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