From: Takashi Iwai Subject: Re: [PATCH 1/2] snd-usb-audio: Skip un-parseable mixer units instead of erroring Date: Sun, 15 Apr 2012 15:41:47 +0200 Message-ID: References: <1334420364-30700-1-git-send-email-mark@pogo.org.uk> 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 15F7224645 for ; Sun, 15 Apr 2012 15:41:49 +0200 (CEST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: alsa-devel-bounces@alsa-project.org Errors-To: alsa-devel-bounces@alsa-project.org To: Mark Hills Cc: alsa-devel@alsa-project.org List-Id: alsa-devel@alsa-project.org At Sat, 14 Apr 2012 21:38:42 +0100 (BST), Mark Hills wrote: > > On Sat, 14 Apr 2012, Takashi Iwai wrote: > > > At Sat, 14 Apr 2012 17:19:23 +0100, > > Mark Hills wrote: > > > > > > Some interfaces reference endpoints which do not exists. To > > > accomodate these, do not fail completely, but skip over them. > > > > > > This allows the Electrix Ebox-44 with earlier firmware to be > > > detected and used for audio. > > > > Does the driver warn something? Ignoring silently doesn't sound > > right... > > Yes, parse_audio_unit already reports the error. Though I didn't do an > exhaustive check for all cases. > > The suggestion to do this came from Clemens (see thread "usb-audio: > Correct way to do a mixer quirk?"). Originally I was hoping to just quirk > this for the specific device, but the rest of the driver does also seem to > be fairly tolerant of errors if it means more devices can be used. OK, I merged your patches now to sound git tree topic/misc branch. Thanks! Takashi > > > > > Takashi > > > > > > > > Signed-off-by: Mark Hills > > > --- > > > sound/usb/mixer.c | 2 +- > > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > > > diff --git a/sound/usb/mixer.c b/sound/usb/mixer.c > > > index ab23869..c374c72 100644 > > > --- a/sound/usb/mixer.c > > > +++ b/sound/usb/mixer.c > > > @@ -1388,7 +1388,7 @@ static int parse_audio_mixer_unit(struct mixer_build *state, int unitid, void *r > > > for (pin = 0; pin < input_pins; pin++) { > > > err = parse_audio_unit(state, desc->baSourceID[pin]); > > > if (err < 0) > > > - return err; > > > + continue; > > > err = check_input_term(state, desc->baSourceID[pin], &iterm); > > > if (err < 0) > > > return err; > > > -- > > > 1.7.4.4 > > > > > > > -- > Mark >