aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-05-16 04:00:49 -0400
committerTakashi Iwai <tiwai@suse.de>2009-05-16 04:00:49 -0400
commit812a2cca295ee7f56cd1b988a0f93646285c214a (patch)
tree814133d9216d3da4707aceda00e24f3b83f8f910 /sound/pci
parent2fc998907947f92b1b9113faad531d7f5a857987 (diff)
ALSA: hda - Split codec->name to vendor and chip name strings
Split the name string in hda_codec struct to vendor_name and chip_name strings to be stored directly from the preset name. Since mostly only the chip name is referred in many patch_*.c, this results in the reduction of many codes in the end. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/hda/hda_codec.c36
-rw-r--r--sound/pci/hda/hda_codec.h3
-rw-r--r--sound/pci/hda/hda_hwdep.c9
-rw-r--r--sound/pci/hda/hda_proc.c8
-rw-r--r--sound/pci/hda/patch_realtek.c63
5 files changed, 46 insertions, 73 deletions
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index b91f6ed5cc58..77385de01744 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -623,7 +623,10 @@ static int get_codec_name(struct hda_codec *codec)
623 const struct hda_vendor_id *c; 623 const struct hda_vendor_id *c;
624 const char *vendor = NULL; 624 const char *vendor = NULL;
625 u16 vendor_id = codec->vendor_id >> 16; 625 u16 vendor_id = codec->vendor_id >> 16;
626 char tmp[16], name[32]; 626 char tmp[16];
627
628 if (codec->vendor_name)
629 goto get_chip_name;
627 630
628 for (c = hda_vendor_ids; c->id; c++) { 631 for (c = hda_vendor_ids; c->id; c++) {
629 if (c->id == vendor_id) { 632 if (c->id == vendor_id) {
@@ -635,14 +638,21 @@ static int get_codec_name(struct hda_codec *codec)
635 sprintf(tmp, "Generic %04x", vendor_id); 638 sprintf(tmp, "Generic %04x", vendor_id);
636 vendor = tmp; 639 vendor = tmp;
637 } 640 }
641 codec->vendor_name = kstrdup(vendor, GFP_KERNEL);
642 if (!codec->vendor_name)
643 return -ENOMEM;
644
645 get_chip_name:
646 if (codec->chip_name)
647 return 0;
648
638 if (codec->preset && codec->preset->name) 649 if (codec->preset && codec->preset->name)
639 snprintf(name, sizeof(name), "%s %s", vendor, 650 codec->chip_name = kstrdup(codec->preset->name, GFP_KERNEL);
640 codec->preset->name); 651 else {
641 else 652 sprintf(tmp, "ID %x", codec->vendor_id & 0xffff);
642 snprintf(name, sizeof(name), "%s ID %x", vendor, 653 codec->chip_name = kstrdup(tmp, GFP_KERNEL);
643 codec->vendor_id & 0xffff); 654 }
644 codec->name = kstrdup(name, GFP_KERNEL); 655 if (!codec->chip_name)
645 if (!codec->name)
646 return -ENOMEM; 656 return -ENOMEM;
647 return 0; 657 return 0;
648} 658}
@@ -848,7 +858,8 @@ static void snd_hda_codec_free(struct hda_codec *codec)
848 module_put(codec->owner); 858 module_put(codec->owner);
849 free_hda_cache(&codec->amp_cache); 859 free_hda_cache(&codec->amp_cache);
850 free_hda_cache(&codec->cmd_cache); 860 free_hda_cache(&codec->cmd_cache);
851 kfree(codec->name); 861 kfree(codec->vendor_name);
862 kfree(codec->chip_name);
852 kfree(codec->modelname); 863 kfree(codec->modelname);
853 kfree(codec->wcaps); 864 kfree(codec->wcaps);
854 kfree(codec); 865 kfree(codec);
@@ -989,15 +1000,16 @@ int snd_hda_codec_configure(struct hda_codec *codec)
989 int err; 1000 int err;
990 1001
991 codec->preset = find_codec_preset(codec); 1002 codec->preset = find_codec_preset(codec);
992 if (!codec->name) { 1003 if (!codec->vendor_name || !codec->chip_name) {
993 err = get_codec_name(codec); 1004 err = get_codec_name(codec);
994 if (err < 0) 1005 if (err < 0)
995 return err; 1006 return err;
996 } 1007 }
997 /* audio codec should override the mixer name */ 1008 /* audio codec should override the mixer name */
998 if (codec->afg || !*codec->bus->card->mixername) 1009 if (codec->afg || !*codec->bus->card->mixername)
999 strlcpy(codec->bus->card->mixername, codec->name, 1010 snprintf(codec->bus->card->mixername,
1000 sizeof(codec->bus->card->mixername)); 1011 sizeof(codec->bus->card->mixername),
1012 "%s %s", codec->vendor_name, codec->chip_name);
1001 1013
1002 if (is_generic_config(codec)) { 1014 if (is_generic_config(codec)) {
1003 err = snd_hda_parse_generic_codec(codec); 1015 err = snd_hda_parse_generic_codec(codec);
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index cd8979c7670b..c5bd40f77bb9 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -748,7 +748,8 @@ struct hda_codec {
748 /* detected preset */ 748 /* detected preset */
749 const struct hda_codec_preset *preset; 749 const struct hda_codec_preset *preset;
750 struct module *owner; 750 struct module *owner;
751 const char *name; /* codec name */ 751 const char *vendor_name; /* codec vendor name */
752 const char *chip_name; /* codec chip name */
752 const char *modelname; /* model name for preset */ 753 const char *modelname; /* model name for preset */
753 754
754 /* set by patch */ 755 /* set by patch */
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c
index 1c57505c2874..6812fbe80fa4 100644
--- a/sound/pci/hda/hda_hwdep.c
+++ b/sound/pci/hda/hda_hwdep.c
@@ -242,7 +242,8 @@ CODEC_INFO_SHOW(subsystem_id);
242CODEC_INFO_SHOW(revision_id); 242CODEC_INFO_SHOW(revision_id);
243CODEC_INFO_SHOW(afg); 243CODEC_INFO_SHOW(afg);
244CODEC_INFO_SHOW(mfg); 244CODEC_INFO_SHOW(mfg);
245CODEC_INFO_STR_SHOW(name); 245CODEC_INFO_STR_SHOW(vendor_name);
246CODEC_INFO_STR_SHOW(chip_name);
246CODEC_INFO_STR_SHOW(modelname); 247CODEC_INFO_STR_SHOW(modelname);
247 248
248#define CODEC_INFO_STORE(type) \ 249#define CODEC_INFO_STORE(type) \
@@ -275,7 +276,8 @@ static ssize_t type##_store(struct device *dev, \
275CODEC_INFO_STORE(vendor_id); 276CODEC_INFO_STORE(vendor_id);
276CODEC_INFO_STORE(subsystem_id); 277CODEC_INFO_STORE(subsystem_id);
277CODEC_INFO_STORE(revision_id); 278CODEC_INFO_STORE(revision_id);
278CODEC_INFO_STR_STORE(name); 279CODEC_INFO_STR_STORE(vendor_name);
280CODEC_INFO_STR_STORE(chip_name);
279CODEC_INFO_STR_STORE(modelname); 281CODEC_INFO_STR_STORE(modelname);
280 282
281#define CODEC_ACTION_STORE(type) \ 283#define CODEC_ACTION_STORE(type) \
@@ -499,7 +501,8 @@ static struct device_attribute codec_attrs[] = {
499 CODEC_ATTR_RW(revision_id), 501 CODEC_ATTR_RW(revision_id),
500 CODEC_ATTR_RO(afg), 502 CODEC_ATTR_RO(afg),
501 CODEC_ATTR_RO(mfg), 503 CODEC_ATTR_RO(mfg),
502 CODEC_ATTR_RW(name), 504 CODEC_ATTR_RW(vendor_name),
505 CODEC_ATTR_RW(chip_name),
503 CODEC_ATTR_RW(modelname), 506 CODEC_ATTR_RW(modelname),
504 CODEC_ATTR_RW(init_verbs), 507 CODEC_ATTR_RW(init_verbs),
505 CODEC_ATTR_RW(hints), 508 CODEC_ATTR_RW(hints),
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index 93d7499350c6..418c5d1badaa 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -466,8 +466,12 @@ static void print_codec_info(struct snd_info_entry *entry,
466 hda_nid_t nid; 466 hda_nid_t nid;
467 int i, nodes; 467 int i, nodes;
468 468
469 snd_iprintf(buffer, "Codec: %s\n", 469 snd_iprintf(buffer, "Codec: ");
470 codec->name ? codec->name : "Not Set"); 470 if (codec->vendor_name && codec->chip_name)
471 snd_iprintf(buffer, "%s %s\n",
472 codec->vendor_name, codec->chip_name);
473 else
474 snd_iprintf(buffer, "Not Set\n");
471 snd_iprintf(buffer, "Address: %d\n", codec->addr); 475 snd_iprintf(buffer, "Address: %d\n", codec->addr);
472 snd_iprintf(buffer, "Function Id: 0x%x\n", codec->function_id); 476 snd_iprintf(buffer, "Function Id: 0x%x\n", codec->function_id);
473 snd_iprintf(buffer, "Vendor Id: 0x%08x\n", codec->vendor_id); 477 snd_iprintf(buffer, "Vendor Id: 0x%08x\n", codec->vendor_id);
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 1bf9d054aae6..4bc3e7e53555 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -277,13 +277,13 @@ struct alc_spec {
277 */ 277 */
278 unsigned int num_init_verbs; 278 unsigned int num_init_verbs;
279 279
280 char *stream_name_analog; /* analog PCM stream */ 280 char stream_name_analog[16]; /* analog PCM stream */
281 struct hda_pcm_stream *stream_analog_playback; 281 struct hda_pcm_stream *stream_analog_playback;
282 struct hda_pcm_stream *stream_analog_capture; 282 struct hda_pcm_stream *stream_analog_capture;
283 struct hda_pcm_stream *stream_analog_alt_playback; 283 struct hda_pcm_stream *stream_analog_alt_playback;
284 struct hda_pcm_stream *stream_analog_alt_capture; 284 struct hda_pcm_stream *stream_analog_alt_capture;
285 285
286 char *stream_name_digital; /* digital PCM stream */ 286 char stream_name_digital[16]; /* digital PCM stream */
287 struct hda_pcm_stream *stream_digital_playback; 287 struct hda_pcm_stream *stream_digital_playback;
288 struct hda_pcm_stream *stream_digital_capture; 288 struct hda_pcm_stream *stream_digital_capture;
289 289
@@ -3169,7 +3169,10 @@ static int alc_build_pcms(struct hda_codec *codec)
3169 if (spec->no_analog) 3169 if (spec->no_analog)
3170 goto skip_analog; 3170 goto skip_analog;
3171 3171
3172 snprintf(spec->stream_name_analog, sizeof(spec->stream_name_analog),
3173 "%s Analog", codec->chip_name);
3172 info->name = spec->stream_name_analog; 3174 info->name = spec->stream_name_analog;
3175
3173 if (spec->stream_analog_playback) { 3176 if (spec->stream_analog_playback) {
3174 if (snd_BUG_ON(!spec->multiout.dac_nids)) 3177 if (snd_BUG_ON(!spec->multiout.dac_nids))
3175 return -EINVAL; 3178 return -EINVAL;
@@ -3195,6 +3198,9 @@ static int alc_build_pcms(struct hda_codec *codec)
3195 skip_analog: 3198 skip_analog:
3196 /* SPDIF for stream index #1 */ 3199 /* SPDIF for stream index #1 */
3197 if (spec->multiout.dig_out_nid || spec->dig_in_nid) { 3200 if (spec->multiout.dig_out_nid || spec->dig_in_nid) {
3201 snprintf(spec->stream_name_digital,
3202 sizeof(spec->stream_name_digital),
3203 "%s Digital", codec->chip_name);
3198 codec->num_pcms = 2; 3204 codec->num_pcms = 2;
3199 codec->slave_dig_outs = spec->multiout.slave_dig_outs; 3205 codec->slave_dig_outs = spec->multiout.slave_dig_outs;
3200 info = spec->pcm_rec + 1; 3206 info = spec->pcm_rec + 1;
@@ -4432,12 +4438,10 @@ static int patch_alc880(struct hda_codec *codec)
4432 if (board_config != ALC880_AUTO) 4438 if (board_config != ALC880_AUTO)
4433 setup_preset(spec, &alc880_presets[board_config]); 4439 setup_preset(spec, &alc880_presets[board_config]);
4434 4440
4435 spec->stream_name_analog = "ALC880 Analog";
4436 spec->stream_analog_playback = &alc880_pcm_analog_playback; 4441 spec->stream_analog_playback = &alc880_pcm_analog_playback;
4437 spec->stream_analog_capture = &alc880_pcm_analog_capture; 4442 spec->stream_analog_capture = &alc880_pcm_analog_capture;
4438 spec->stream_analog_alt_capture = &alc880_pcm_analog_alt_capture; 4443 spec->stream_analog_alt_capture = &alc880_pcm_analog_alt_capture;
4439 4444
4440 spec->stream_name_digital = "ALC880 Digital";
4441 spec->stream_digital_playback = &alc880_pcm_digital_playback; 4445 spec->stream_digital_playback = &alc880_pcm_digital_playback;
4442 spec->stream_digital_capture = &alc880_pcm_digital_capture; 4446 spec->stream_digital_capture = &alc880_pcm_digital_capture;
4443 4447
@@ -6078,11 +6082,9 @@ static int patch_alc260(struct hda_codec *codec)
6078 if (board_config != ALC260_AUTO) 6082 if (board_config != ALC260_AUTO)
6079 setup_preset(spec, &alc260_presets[board_config]); 6083 setup_preset(spec, &alc260_presets[board_config]);
6080 6084
6081 spec->stream_name_analog = "ALC260 Analog";
6082 spec->stream_analog_playback = &alc260_pcm_analog_playback; 6085 spec->stream_analog_playback = &alc260_pcm_analog_playback;
6083 spec->stream_analog_capture = &alc260_pcm_analog_capture; 6086 spec->stream_analog_capture = &alc260_pcm_analog_capture;
6084 6087
6085 spec->stream_name_digital = "ALC260 Digital";
6086 spec->stream_digital_playback = &alc260_pcm_digital_playback; 6088 spec->stream_digital_playback = &alc260_pcm_digital_playback;
6087 spec->stream_digital_capture = &alc260_pcm_digital_capture; 6089 spec->stream_digital_capture = &alc260_pcm_digital_capture;
6088 6090
@@ -7337,14 +7339,6 @@ static int patch_alc882(struct hda_codec *codec)
7337 if (board_config != ALC882_AUTO) 7339 if (board_config != ALC882_AUTO)
7338 setup_preset(spec, &alc882_presets[board_config]); 7340 setup_preset(spec, &alc882_presets[board_config]);
7339 7341
7340 if (codec->vendor_id == 0x10ec0885) {
7341 spec->stream_name_analog = "ALC885 Analog";
7342 spec->stream_name_digital = "ALC885 Digital";
7343 } else {
7344 spec->stream_name_analog = "ALC882 Analog";
7345 spec->stream_name_digital = "ALC882 Digital";
7346 }
7347
7348 spec->stream_analog_playback = &alc882_pcm_analog_playback; 7342 spec->stream_analog_playback = &alc882_pcm_analog_playback;
7349 spec->stream_analog_capture = &alc882_pcm_analog_capture; 7343 spec->stream_analog_capture = &alc882_pcm_analog_capture;
7350 /* FIXME: setup DAC5 */ 7344 /* FIXME: setup DAC5 */
@@ -9232,13 +9226,6 @@ static int patch_alc883(struct hda_codec *codec)
9232 9226
9233 switch (codec->vendor_id) { 9227 switch (codec->vendor_id) {
9234 case 0x10ec0888: 9228 case 0x10ec0888:
9235 if (codec->revision_id == 0x100101) {
9236 spec->stream_name_analog = "ALC1200 Analog";
9237 spec->stream_name_digital = "ALC1200 Digital";
9238 } else {
9239 spec->stream_name_analog = "ALC888 Analog";
9240 spec->stream_name_digital = "ALC888 Digital";
9241 }
9242 if (!spec->num_adc_nids) { 9229 if (!spec->num_adc_nids) {
9243 spec->num_adc_nids = ARRAY_SIZE(alc883_adc_nids); 9230 spec->num_adc_nids = ARRAY_SIZE(alc883_adc_nids);
9244 spec->adc_nids = alc883_adc_nids; 9231 spec->adc_nids = alc883_adc_nids;
@@ -9249,8 +9236,6 @@ static int patch_alc883(struct hda_codec *codec)
9249 spec->init_amp = ALC_INIT_DEFAULT; /* always initialize */ 9236 spec->init_amp = ALC_INIT_DEFAULT; /* always initialize */
9250 break; 9237 break;
9251 case 0x10ec0889: 9238 case 0x10ec0889:
9252 spec->stream_name_analog = "ALC889 Analog";
9253 spec->stream_name_digital = "ALC889 Digital";
9254 if (!spec->num_adc_nids) { 9239 if (!spec->num_adc_nids) {
9255 spec->num_adc_nids = ARRAY_SIZE(alc889_adc_nids); 9240 spec->num_adc_nids = ARRAY_SIZE(alc889_adc_nids);
9256 spec->adc_nids = alc889_adc_nids; 9241 spec->adc_nids = alc889_adc_nids;
@@ -9261,8 +9246,6 @@ static int patch_alc883(struct hda_codec *codec)
9261 capture */ 9246 capture */
9262 break; 9247 break;
9263 default: 9248 default:
9264 spec->stream_name_analog = "ALC883 Analog";
9265 spec->stream_name_digital = "ALC883 Digital";
9266 if (!spec->num_adc_nids) { 9249 if (!spec->num_adc_nids) {
9267 spec->num_adc_nids = ARRAY_SIZE(alc883_adc_nids); 9250 spec->num_adc_nids = ARRAY_SIZE(alc883_adc_nids);
9268 spec->adc_nids = alc883_adc_nids; 9251 spec->adc_nids = alc883_adc_nids;
@@ -11087,11 +11070,9 @@ static int patch_alc262(struct hda_codec *codec)
11087 if (board_config != ALC262_AUTO) 11070 if (board_config != ALC262_AUTO)
11088 setup_preset(spec, &alc262_presets[board_config]); 11071 setup_preset(spec, &alc262_presets[board_config]);
11089 11072
11090 spec->stream_name_analog = "ALC262 Analog";
11091 spec->stream_analog_playback = &alc262_pcm_analog_playback; 11073 spec->stream_analog_playback = &alc262_pcm_analog_playback;
11092 spec->stream_analog_capture = &alc262_pcm_analog_capture; 11074 spec->stream_analog_capture = &alc262_pcm_analog_capture;
11093 11075
11094 spec->stream_name_digital = "ALC262 Digital";
11095 spec->stream_digital_playback = &alc262_pcm_digital_playback; 11076 spec->stream_digital_playback = &alc262_pcm_digital_playback;
11096 spec->stream_digital_capture = &alc262_pcm_digital_capture; 11077 spec->stream_digital_capture = &alc262_pcm_digital_capture;
11097 11078
@@ -12117,14 +12098,6 @@ static int patch_alc268(struct hda_codec *codec)
12117 if (board_config != ALC268_AUTO) 12098 if (board_config != ALC268_AUTO)
12118 setup_preset(spec, &alc268_presets[board_config]); 12099 setup_preset(spec, &alc268_presets[board_config]);
12119 12100
12120 if (codec->vendor_id == 0x10ec0267) {
12121 spec->stream_name_analog = "ALC267 Analog";
12122 spec->stream_name_digital = "ALC267 Digital";
12123 } else {
12124 spec->stream_name_analog = "ALC268 Analog";
12125 spec->stream_name_digital = "ALC268 Digital";
12126 }
12127
12128 spec->stream_analog_playback = &alc268_pcm_analog_playback; 12101 spec->stream_analog_playback = &alc268_pcm_analog_playback;
12129 spec->stream_analog_capture = &alc268_pcm_analog_capture; 12102 spec->stream_analog_capture = &alc268_pcm_analog_capture;
12130 spec->stream_analog_alt_capture = &alc268_pcm_analog_alt_capture; 12103 spec->stream_analog_alt_capture = &alc268_pcm_analog_alt_capture;
@@ -12979,7 +12952,6 @@ static int patch_alc269(struct hda_codec *codec)
12979 if (board_config != ALC269_AUTO) 12952 if (board_config != ALC269_AUTO)
12980 setup_preset(spec, &alc269_presets[board_config]); 12953 setup_preset(spec, &alc269_presets[board_config]);
12981 12954
12982 spec->stream_name_analog = "ALC269 Analog";
12983 if (codec->subsystem_id == 0x17aa3bf8) { 12955 if (codec->subsystem_id == 0x17aa3bf8) {
12984 /* Due to a hardware problem on Lenovo Ideadpad, we need to 12956 /* Due to a hardware problem on Lenovo Ideadpad, we need to
12985 * fix the sample rate of analog I/O to 44.1kHz 12957 * fix the sample rate of analog I/O to 44.1kHz
@@ -12990,7 +12962,6 @@ static int patch_alc269(struct hda_codec *codec)
12990 spec->stream_analog_playback = &alc269_pcm_analog_playback; 12962 spec->stream_analog_playback = &alc269_pcm_analog_playback;
12991 spec->stream_analog_capture = &alc269_pcm_analog_capture; 12963 spec->stream_analog_capture = &alc269_pcm_analog_capture;
12992 } 12964 }
12993 spec->stream_name_digital = "ALC269 Digital";
12994 spec->stream_digital_playback = &alc269_pcm_digital_playback; 12965 spec->stream_digital_playback = &alc269_pcm_digital_playback;
12995 spec->stream_digital_capture = &alc269_pcm_digital_capture; 12966 spec->stream_digital_capture = &alc269_pcm_digital_capture;
12996 12967
@@ -14080,11 +14051,9 @@ static int patch_alc861(struct hda_codec *codec)
14080 if (board_config != ALC861_AUTO) 14051 if (board_config != ALC861_AUTO)
14081 setup_preset(spec, &alc861_presets[board_config]); 14052 setup_preset(spec, &alc861_presets[board_config]);
14082 14053
14083 spec->stream_name_analog = "ALC861 Analog";
14084 spec->stream_analog_playback = &alc861_pcm_analog_playback; 14054 spec->stream_analog_playback = &alc861_pcm_analog_playback;
14085 spec->stream_analog_capture = &alc861_pcm_analog_capture; 14055 spec->stream_analog_capture = &alc861_pcm_analog_capture;
14086 14056
14087 spec->stream_name_digital = "ALC861 Digital";
14088 spec->stream_digital_playback = &alc861_pcm_digital_playback; 14057 spec->stream_digital_playback = &alc861_pcm_digital_playback;
14089 spec->stream_digital_capture = &alc861_pcm_digital_capture; 14058 spec->stream_digital_capture = &alc861_pcm_digital_capture;
14090 14059
@@ -15007,13 +14976,8 @@ static int patch_alc861vd(struct hda_codec *codec)
15007 setup_preset(spec, &alc861vd_presets[board_config]); 14976 setup_preset(spec, &alc861vd_presets[board_config]);
15008 14977
15009 if (codec->vendor_id == 0x10ec0660) { 14978 if (codec->vendor_id == 0x10ec0660) {
15010 spec->stream_name_analog = "ALC660-VD Analog";
15011 spec->stream_name_digital = "ALC660-VD Digital";
15012 /* always turn on EAPD */ 14979 /* always turn on EAPD */
15013 add_verb(spec, alc660vd_eapd_verbs); 14980 add_verb(spec, alc660vd_eapd_verbs);
15014 } else {
15015 spec->stream_name_analog = "ALC861VD Analog";
15016 spec->stream_name_digital = "ALC861VD Digital";
15017 } 14981 }
15018 14982
15019 spec->stream_analog_playback = &alc861vd_pcm_analog_playback; 14983 spec->stream_analog_playback = &alc861vd_pcm_analog_playback;
@@ -16936,17 +16900,6 @@ static int patch_alc662(struct hda_codec *codec)
16936 if (board_config != ALC662_AUTO) 16900 if (board_config != ALC662_AUTO)
16937 setup_preset(spec, &alc662_presets[board_config]); 16901 setup_preset(spec, &alc662_presets[board_config]);
16938 16902
16939 if (codec->vendor_id == 0x10ec0663) {
16940 spec->stream_name_analog = "ALC663 Analog";
16941 spec->stream_name_digital = "ALC663 Digital";
16942 } else if (codec->vendor_id == 0x10ec0272) {
16943 spec->stream_name_analog = "ALC272 Analog";
16944 spec->stream_name_digital = "ALC272 Digital";
16945 } else {
16946 spec->stream_name_analog = "ALC662 Analog";
16947 spec->stream_name_digital = "ALC662 Digital";
16948 }
16949
16950 spec->stream_analog_playback = &alc662_pcm_analog_playback; 16903 spec->stream_analog_playback = &alc662_pcm_analog_playback;
16951 spec->stream_analog_capture = &alc662_pcm_analog_capture; 16904 spec->stream_analog_capture = &alc662_pcm_analog_capture;
16952 16905