summaryrefslogtreecommitdiff
path: root/sound/pci/hda/patch_via.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2013-02-07 10:45:11 +0100
committerTakashi Iwai <tiwai@suse.de>2013-02-07 10:45:11 +0100
commit0186f4f4f248d00a2bfcd7c305cfec12fa8e5e30 (patch)
tree82ad54f92327772ed6fee19638b396d9eb54f0d0 /sound/pci/hda/patch_via.c
parent46a144818acd8b340bdc6ccf12255c7fb301f0ee (diff)
ALSA: hda - Use generic array for loopback list management
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_via.c')
-rw-r--r--sound/pci/hda/patch_via.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index ca7d962a08a6..c35338a8771d 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -355,10 +355,12 @@ static bool is_aa_path_mute(struct hda_codec *codec)
{
struct via_spec *spec = codec->spec;
const struct hda_amp_list *p;
- int i, ch, v;
+ int ch, v;
- for (i = 0; i < spec->gen.num_loopbacks; i++) {
- p = &spec->gen.loopback_list[i];
+ p = spec->gen.loopback.amplist;
+ if (!p)
+ return true;
+ for (; p->nid; p++) {
for (ch = 0; ch < 2; ch++) {
v = snd_hda_codec_amp_read(codec, p->nid, ch, p->dir,
p->idx);