From: David Henningsson <david.henningsson@canonical.com>
To: tiwai@suse.de, alsa-devel@alsa-project.org
Cc: David Henningsson <david.henningsson@canonical.com>
Subject: [PATCH 1/3] ALSA: hda - make sure there are enough input labels and paths
Date: Fri, 18 Jan 2013 15:43:01 +0100 [thread overview]
Message-ID: <1358520183-2908-2-git-send-email-david.henningsson@canonical.com> (raw)
In-Reply-To: <1358520183-2908-1-git-send-email-david.henningsson@canonical.com>
I found a codec configuration which had six inputs, so the max of
five was not appropriate.
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
---
sound/pci/hda/hda_generic.c | 2 +-
sound/pci/hda/hda_generic.h | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c
index cadfe65..13e13df 100644
--- a/sound/pci/hda/hda_generic.c
+++ b/sound/pci/hda/hda_generic.c
@@ -2649,7 +2649,7 @@ static struct nid_path *get_input_path(struct hda_codec *codec, int adc_idx, int
}
if (spec->dyn_adc_switch)
adc_idx = spec->dyn_adc_idx[imux_idx];
- if (adc_idx < 0 || adc_idx >= AUTO_CFG_MAX_OUTS) {
+ if (adc_idx < 0 || adc_idx >= AUTO_CFG_MAX_INS) {
snd_BUG();
return NULL;
}
diff --git a/sound/pci/hda/hda_generic.h b/sound/pci/hda/hda_generic.h
index f6b88cd..94bf4bc 100644
--- a/sound/pci/hda/hda_generic.h
+++ b/sound/pci/hda/hda_generic.h
@@ -105,8 +105,8 @@ struct hda_gen_spec {
hda_nid_t adc_nids[AUTO_CFG_MAX_OUTS];
hda_nid_t dig_in_nid; /* digital-in NID; optional */
hda_nid_t mixer_nid; /* analog-mixer NID */
- const char *input_labels[AUTO_CFG_MAX_OUTS];
- int input_label_idxs[AUTO_CFG_MAX_OUTS];
+ const char *input_labels[AUTO_CFG_MAX_INS];
+ int input_label_idxs[AUTO_CFG_MAX_INS];
/* capture setup for dynamic dual-adc switch */
hda_nid_t cur_adc;
@@ -159,7 +159,7 @@ struct hda_gen_spec {
int speaker_paths[AUTO_CFG_MAX_OUTS];
int aamix_out_paths[3];
int digout_paths[AUTO_CFG_MAX_OUTS];
- int input_paths[HDA_MAX_NUM_INPUTS][AUTO_CFG_MAX_OUTS];
+ int input_paths[HDA_MAX_NUM_INPUTS][AUTO_CFG_MAX_INS];
int loopback_paths[HDA_MAX_NUM_INPUTS];
int digin_path;
--
1.7.9.5
next prev parent reply other threads:[~2013-01-18 14:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-18 14:43 [PATCH 0/3] You guessed it, it's generic parser patches David Henningsson
2013-01-18 14:43 ` David Henningsson [this message]
2013-01-18 14:43 ` [PATCH 2/3] ALSA: hda - don't compare with yourself in fill_input_pin_labels David Henningsson
2013-01-18 14:43 ` [PATCH 3/3] ALSA: hda - Don't add unnecessary indices on HDMI and SPDIF David Henningsson
2013-01-18 15:31 ` [PATCH 0/3] You guessed it, it's generic parser patches Takashi Iwai
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=1358520183-2908-2-git-send-email-david.henningsson@canonical.com \
--to=david.henningsson@canonical.com \
--cc=alsa-devel@alsa-project.org \
--cc=tiwai@suse.de \
/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).