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:
Sriharsha Allenki <sallenki@codeaurora.org>
Loading
Please register or sign in to comment