alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
From: Mark Hills <mark@pogo.org.uk>
To: alsa-devel@alsa-project.org
Subject: [RFC 1/2] snd-usb-audio: Skip un-parseable mixer units instead of erroring
Date: Mon,  9 Apr 2012 19:39:36 +0100	[thread overview]
Message-ID: <1333996777-24938-1-git-send-email-mark@pogo.org.uk> (raw)

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.

Signed-off-by: Mark Hills <mark@pogo.org.uk>
---
 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

             reply	other threads:[~2012-04-09 18:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-09 18:39 Mark Hills [this message]
2012-04-09 18:39 ` [RFC 2/2] snd-usb-audio: Replace mixer for Electrix Ebox-44 Mark Hills

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=1333996777-24938-1-git-send-email-mark@pogo.org.uk \
    --to=mark@pogo.org.uk \
    --cc=alsa-devel@alsa-project.org \
    /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;
as well as URLs for NNTP newsgroup(s).