From: Takashi Iwai Subject: Re: [PATCH] ALSA: usb-audio: fix regression for fixed stream quirk Date: Wed, 10 Jul 2013 17:54:20 +0200 Message-ID: References: <1373394975-1811-1-git-send-email-eldad@fogrefinery.com> Mime-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id C2958264F06 for ; Wed, 10 Jul 2013 17:53:03 +0200 (CEST) In-Reply-To: <1373394975-1811-1-git-send-email-eldad@fogrefinery.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Eldad Zack Cc: alsa-devel@alsa-project.org, Clemens Ladisch List-Id: alsa-devel@alsa-project.org At Tue, 9 Jul 2013 20:36:15 +0200, Eldad Zack wrote: > > Commit 8f898e92aea2c24c7f379ee265d178f69ebb9c07 removed the redundant > reads of bInterfaceProtocol from the descriptors, but introduced a > regression to devices with quirks of type QUIRK_AUDIO_FIXED_ENDPOINT, > since fp->protocol is not set in setup process. > > As a consequence, audio streams would not get initialized, as the > following logs show: > > [ 48.923043] setting usb interface 3:1 > [ 48.923056] Creating new capture data endpoint #81 > [ 48.923484] 4:3:1: cannot set freq 48000 to ep 0x81 > > This patch sets fp->protocol in create_fixed_stream_quirk() and > resolves the regression. > > Signed-off-by: Eldad Zack Thanks, applied now. Takashi > --- > sound/usb/quirks.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c > index 5b01330..1bc45e7 100644 > --- a/sound/usb/quirks.c > +++ b/sound/usb/quirks.c > @@ -129,6 +129,7 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, > { > struct audioformat *fp; > struct usb_host_interface *alts; > + struct usb_interface_descriptor *altsd; > int stream, err; > unsigned *rate_table = NULL; > > @@ -166,6 +167,9 @@ static int create_fixed_stream_quirk(struct snd_usb_audio *chip, > return -EINVAL; > } > alts = &iface->altsetting[fp->altset_idx]; > + altsd = get_iface_desc(alts); > + fp->protocol = altsd->bInterfaceProtocol; > + > if (fp->datainterval == 0) > fp->datainterval = snd_usb_parse_datainterval(chip, alts); > if (fp->maxpacksize == 0) > -- > 1.8.1.5 >