aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_hwdep.c
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/hda/hda_hwdep.c
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/hda/hda_hwdep.c')
-rw-r--r--sound/pci/hda/hda_hwdep.c9
1 files changed, 6 insertions, 3 deletions
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),