summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorMichael Bommarito <michael.bommarito@gmail.com>2026-06-17 22:51:26 -0400
committerTakashi Iwai <tiwai@suse.de>2026-06-18 12:44:59 +0200
commit3c7af07943b2718087ae791cad450af5cf646d90 (patch)
tree9be09cc7bcad722612cb5b64be9772d122e546d9 /sound
parentbdb640be82e645e2828731648f485224d0c2587b (diff)
downloadlinux-3c7af07943b2718087ae791cad450af5cf646d90.tar.gz
linux-3c7af07943b2718087ae791cad450af5cf646d90.zip
ALSA: usb-audio: qcom: clear opened when stream enable fails
On enable, subs->opened is set before the service_interval is validated; an invalid interval jumps to the response label without clearing it, so the substream is wedged at -EBUSY until a disable or disconnect. Clear subs->opened on the enable error path. Fixes: 326bbc348298a ("ALSA: usb-audio: qcom: Introduce QC USB SND offloading support") Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Michael Bommarito <michael.bommarito@gmail.com> Link: https://patch.msgid.link/20260618025126.1862954-3-michael.bommarito@gmail.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/usb/qcom/qc_audio_offload.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sound/usb/qcom/qc_audio_offload.c b/sound/usb/qcom/qc_audio_offload.c
index 3b05dadbbeae..3a586fd16e72 100644
--- a/sound/usb/qcom/qc_audio_offload.c
+++ b/sound/usb/qcom/qc_audio_offload.c
@@ -1620,8 +1620,13 @@ static void handle_uaudio_stream_req(struct qmi_handle *handle,
if (req_msg->service_interval_valid) {
ret = get_data_interval_from_si(subs,
req_msg->service_interval);
- if (ret == -EINVAL)
+ if (ret == -EINVAL) {
+ if (req_msg->enable) {
+ guard(mutex)(&chip->mutex);
+ subs->opened = 0;
+ }
goto response;
+ }
datainterval = ret;
}