Skip to content

Commit 601a5bc

Browse files
pavhofmangregkh
authored andcommitted
usb: gadget: u_audio: Subdevice 0 for capture ctls
Both capture and playback alsa devices use subdevice 0. Yet capture-side ctls are defined for subdevice 1. The patch sets subdevice 0 for them. Fixes: 02de698 ("usb: gadget: u_audio: add bi-directional volume and mute support") Signed-off-by: Pavel Hofman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent f2f69bf commit 601a5bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/usb/gadget/function/u_audio.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1147,7 +1147,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name,
11471147
}
11481148

11491149
kctl->id.device = pcm->device;
1150-
kctl->id.subdevice = i;
1150+
kctl->id.subdevice = 0;
11511151

11521152
err = snd_ctl_add(card, kctl);
11531153
if (err < 0)
@@ -1170,7 +1170,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name,
11701170
}
11711171

11721172
kctl->id.device = pcm->device;
1173-
kctl->id.subdevice = i;
1173+
kctl->id.subdevice = 0;
11741174

11751175

11761176
kctl->tlv.c = u_audio_volume_tlv;

0 commit comments

Comments
 (0)