linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] usb: gadget: u_audio: Subdevice 0 for capture ctls
@ 2021-12-27  6:51 Pavel Hofman
  2021-12-27  9:22 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Pavel Hofman @ 2021-12-27  6:51 UTC (permalink / raw)
  To: linux-usb
  Cc: Pavel Hofman, Ruslan Bilovol, Felipe Balbi, Jerome Brunet,
	Greg Kroah-Hartman

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.

Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
---
 drivers/usb/gadget/function/u_audio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c
index c46400be5464..4f6c0049c534 100644
--- a/drivers/usb/gadget/function/u_audio.c
+++ b/drivers/usb/gadget/function/u_audio.c
@@ -1145,7 +1145,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)
@@ -1168,7 +1168,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;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] usb: gadget: u_audio: Subdevice 0 for capture ctls
  2021-12-27  6:51 [PATCH] usb: gadget: u_audio: Subdevice 0 for capture ctls Pavel Hofman
@ 2021-12-27  9:22 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Kroah-Hartman @ 2021-12-27  9:22 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: linux-usb, Ruslan Bilovol, Felipe Balbi, Jerome Brunet

On Mon, Dec 27, 2021 at 07:51:00AM +0100, Pavel Hofman wrote:
> 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.
> 
> Signed-off-by: Pavel Hofman <pavel.hofman@ivitera.com>
> ---
>  drivers/usb/gadget/function/u_audio.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/usb/gadget/function/u_audio.c b/drivers/usb/gadget/function/u_audio.c
> index c46400be5464..4f6c0049c534 100644
> --- a/drivers/usb/gadget/function/u_audio.c
> +++ b/drivers/usb/gadget/function/u_audio.c
> @@ -1145,7 +1145,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)
> @@ -1168,7 +1168,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;
> -- 
> 2.25.1
> 

Does this fix a specific bug/issue?  If so, what commit does this fix?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-12-27  9:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-12-27  6:51 [PATCH] usb: gadget: u_audio: Subdevice 0 for capture ctls Pavel Hofman
2021-12-27  9:22 ` Greg Kroah-Hartman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).