Skip to content

Commit

Permalink
usb: gadget: u_audio: Subdevice 0 for capture ctls
Browse files Browse the repository at this point in the history
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 <pavel.hofman@ivitera.com>
Link: https://lore.kernel.org/r/20220105104643.90125-1-pavel.hofman@ivitera.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
pavhofman authored and gregkh committed Jan 6, 2022
1 parent f2f69bf commit 601a5bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/usb/gadget/function/u_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,7 @@ int g_audio_setup(struct g_audio *g_audio, const char *pcm_name,
}

kctl->id.device = pcm->device;
kctl->id.subdevice = i;
kctl->id.subdevice = 0;

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

kctl->id.device = pcm->device;
kctl->id.subdevice = i;
kctl->id.subdevice = 0;


kctl->tlv.c = u_audio_volume_tlv;
Expand Down

0 comments on commit 601a5bc

Please sign in to comment.