From 78b79004307ab106266e91aafbfe41b2ef2140af Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 17 Jun 2011 14:55:02 +0200 Subject: [PATCH] --- yaml --- r: 257659 b: refs/heads/master c: 5f4b36d64d1f1ba1da46bee3ec4f0519dfaf68e6 h: refs/heads/master i: 257657: f5f1832fac6b2e7f18313a79cf7c319186cdc34c 257655: 9ad8bb27d9f54dc4d7a10013039e7a2c9672ee82 v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/patch_via.c | 27 +++++++++------------------ 2 files changed, 10 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index 6c1a4109bae8..2e8fe5fa8cfd 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b13e552d374a9cbee20ba24635608289cc8a7c97 +refs/heads/master: 5f4b36d64d1f1ba1da46bee3ec4f0519dfaf68e6 diff --git a/trunk/sound/pci/hda/patch_via.c b/trunk/sound/pci/hda/patch_via.c index 89a0f2a3d269..995974d0b120 100644 --- a/trunk/sound/pci/hda/patch_via.c +++ b/trunk/sound/pci/hda/patch_via.c @@ -1003,19 +1003,13 @@ static int via_smart51_put(struct snd_kcontrol *kcontrol, return 1; } -static const struct snd_kcontrol_new via_smart51_mixer[2] = { - { - .iface = SNDRV_CTL_ELEM_IFACE_MIXER, - .name = "Smart 5.1", - .count = 1, - .info = via_smart51_info, - .get = via_smart51_get, - .put = via_smart51_put, - }, - { - .iface = NID_MAPPING, - .name = "Smart 5.1", - } +static const struct snd_kcontrol_new via_smart51_mixer = { + .iface = SNDRV_CTL_ELEM_IFACE_MIXER, + .name = "Smart 5.1", + .count = 1, + .info = via_smart51_info, + .get = via_smart51_get, + .put = via_smart51_put, }; static int via_smart51_build(struct via_spec *spec) @@ -1030,17 +1024,14 @@ static int via_smart51_build(struct via_spec *spec) if (cfg->line_outs > 2) return 0; - knew = via_clone_control(spec, &via_smart51_mixer[0]); + knew = via_clone_control(spec, &via_smart51_mixer); if (knew == NULL) return -ENOMEM; for (i = 0; i < cfg->num_inputs; i++) { nid = cfg->inputs[i].pin; if (cfg->inputs[i].type <= AUTO_PIN_LINE_IN) { - knew = via_clone_control(spec, &via_smart51_mixer[1]); - if (knew == NULL) - return -ENOMEM; - knew->subdevice = nid; + knew->subdevice = HDA_SUBDEV_NID_FLAG | nid; break; } }