lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <s5hr4jlkr2a.wl%tiwai@suse.de>
Date:	Tue, 12 Mar 2013 08:36:29 +0100
From:	Takashi Iwai <tiwai@...e.de>
To:	Clemens Ladisch <clemens@...isch.de>
Cc:	Dave Helstroom <helstroom@...gle.com>, perex@...ex.cz,
	eldad@...refinery.com, damien@...audio.com, pete.leigh@...il.com,
	alsa-devel@...a-project.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH][RESEND] Add a USB audio quirk for the NuForce UDH-100 device.

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@...gle.com>
> Signed-off-by: Clemens Ladisch <clemens@...isch.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;
>  		}
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ