Skip to content

Commit 3c7af07

Browse files
mjbommartiwai
authored andcommitted
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: 326bbc3 ("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>
1 parent bdb640b commit 3c7af07

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

sound/usb/qcom/qc_audio_offload.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1620,8 +1620,13 @@ static void handle_uaudio_stream_req(struct qmi_handle *handle,
16201620
if (req_msg->service_interval_valid) {
16211621
ret = get_data_interval_from_si(subs,
16221622
req_msg->service_interval);
1623-
if (ret == -EINVAL)
1623+
if (ret == -EINVAL) {
1624+
if (req_msg->enable) {
1625+
guard(mutex)(&chip->mutex);
1626+
subs->opened = 0;
1627+
}
16241628
goto response;
1629+
}
16251630

16261631
datainterval = ret;
16271632
}

0 commit comments

Comments
 (0)