mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Clemens Ladisch <clemens@ladisch.de>
Cc: Dave Helstroom <helstroom@google.com>,
	perex@perex.cz, eldad@fogrefinery.com, damien@zamaudio.com,
	pete.leigh@gmail.com, alsa-devel@alsa-project.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][RESEND] Add a USB audio quirk for the NuForce UDH-100 device.
Date: Tue, 12 Mar 2013 08:36:29 +0100	[thread overview]
Message-ID: <s5hr4jlkr2a.wl%tiwai@suse.de> (raw)
In-Reply-To: <513E2D56.8070902@ladisch.de>

At Mon, 11 Mar 2013 20:15:34 +0100,
Clemens Ladisch wrote:
> 
> >> David Helstroom wrote:
> >>> Interface 1 does not exist
> 
> Please try the patch below.

Since the patch seems working, I merge it now.


thanks,

Takashi

> 
> 
> Regards,
> Clemens
> 
> 
> --8<---------------------------------------------------------------->8--
> ALSA: usb-audio: add a workaround for the NuForce UDH-100
> 
> The NuForce UDH-100 numbers its interfaces incorrectly, which makes the
> interface associations come out wrong, which results in the driver
> erroring out with the message "Audio class v2 interfaces need an
> interface association".
> 
> Work around this by searching for the interface association descriptor
> also in some other place where it might have ended up.
> 
> Reported-by: Dave Helstroom <helstroom@google.com>
> Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
> ---
>  sound/usb/card.c |   15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/sound/usb/card.c b/sound/usb/card.c
> index df2f6d0..34dc3e8 100644
> --- a/sound/usb/card.c
> +++ b/sound/usb/card.c
> @@ -245,6 +245,21 @@ static int snd_usb_create_streams(struct snd_usb_audio *chip, int ctrlif)
>  			usb_ifnum_to_if(dev, ctrlif)->intf_assoc;
> 
>  		if (!assoc) {
> +			/*
> +			 * Firmware writers cannot count to three.  So to find
> +			 * the IAD on the NuForce UDH-100, also check the next
> +			 * interface.
> +			 */
> +			struct usb_interface *iface =
> +				usb_ifnum_to_if(dev, ctrlif + 1);
> +			if (iface &&
> +			    iface->intf_assoc &&
> +			    iface->intf_assoc->bFunctionClass == USB_CLASS_AUDIO &&
> +			    iface->intf_assoc->bFunctionProtocol == UAC_VERSION_2)
> +				assoc = iface->intf_assoc;
> +		}
> +
> +		if (!assoc) {
>  			snd_printk(KERN_ERR "Audio class v2 interfaces need an interface association\n");
>  			return -EINVAL;
>  		}
> 

      parent reply	other threads:[~2013-03-12  7:36 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-11  3:52 David Helstroom
2013-03-11  8:32 ` Clemens Ladisch
2013-03-11 18:03   ` Dave Helstroom
2013-03-11 19:15     ` Clemens Ladisch
2013-03-11 23:58       ` Dave Helstroom
2013-03-12  7:36       ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hr4jlkr2a.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=alsa-devel@alsa-project.org \
    --cc=clemens@ladisch.de \
    --cc=damien@zamaudio.com \
    --cc=eldad@fogrefinery.com \
    --cc=helstroom@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=perex@perex.cz \
    --cc=pete.leigh@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®