aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2015-02-27 10:09:22 -0500
committerTakashi Iwai <tiwai@suse.de>2015-03-03 05:25:16 -0500
commit6efdd8513f182492c21fb7238592d4539d5c751a (patch)
treec399158c210875a0d5f235abf2b6154fc2a9bb13 /sound/pci/hda
parent1a4ba30cced3002add8459eadcd65b8d3cd1515e (diff)
ALSA: hda - Add card field to hda_codec struct
Allow the codec object to have an individual card pointer. Not only this simplifies the redirections in many places, also this will allow us to make each codec assigned to a different card object. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda')
-rw-r--r--sound/pci/hda/hda_beep.c4
-rw-r--r--sound/pci/hda/hda_bind.c6
-rw-r--r--sound/pci/hda/hda_codec.c30
-rw-r--r--sound/pci/hda/hda_codec.h5
-rw-r--r--sound/pci/hda/hda_controller.c2
-rw-r--r--sound/pci/hda/hda_hwdep.c2
-rw-r--r--sound/pci/hda/hda_jack.c8
-rw-r--r--sound/pci/hda/hda_proc.c2
-rw-r--r--sound/pci/hda/hda_sysfs.c2
-rw-r--r--sound/pci/hda/hda_trace.h4
-rw-r--r--sound/pci/hda/patch_ca0132.c2
-rw-r--r--sound/pci/hda/patch_hdmi.c6
-rw-r--r--sound/pci/hda/patch_via.c8
13 files changed, 41 insertions, 40 deletions
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c
index e98438e95e79..581b7fdef0e3 100644
--- a/sound/pci/hda/hda_beep.c
+++ b/sound/pci/hda/hda_beep.c
@@ -160,7 +160,7 @@ static int snd_hda_do_attach(struct hda_beep *beep)
160 input_dev->name = "HDA Digital PCBeep"; 160 input_dev->name = "HDA Digital PCBeep";
161 input_dev->phys = beep->phys; 161 input_dev->phys = beep->phys;
162 input_dev->id.bustype = BUS_PCI; 162 input_dev->id.bustype = BUS_PCI;
163 input_dev->dev.parent = &codec->bus->card->card_dev; 163 input_dev->dev.parent = &codec->card->card_dev;
164 164
165 input_dev->id.vendor = codec->vendor_id >> 16; 165 input_dev->id.vendor = codec->vendor_id >> 16;
166 input_dev->id.product = codec->vendor_id & 0xffff; 166 input_dev->id.product = codec->vendor_id & 0xffff;
@@ -224,7 +224,7 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
224 if (beep == NULL) 224 if (beep == NULL)
225 return -ENOMEM; 225 return -ENOMEM;
226 snprintf(beep->phys, sizeof(beep->phys), 226 snprintf(beep->phys, sizeof(beep->phys),
227 "card%d/codec#%d/beep0", codec->bus->card->number, codec->addr); 227 "card%d/codec#%d/beep0", codec->card->number, codec->addr);
228 /* enable linear scale */ 228 /* enable linear scale */
229 snd_hda_codec_write_cache(codec, nid, 0, 229 snd_hda_codec_write_cache(codec, nid, 0,
230 AC_VERB_SET_DIGI_CONVERT_2, 0x01); 230 AC_VERB_SET_DIGI_CONVERT_2, 0x01);
diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c
index ce2dd7b0dc07..2d00417494e2 100644
--- a/sound/pci/hda/hda_bind.c
+++ b/sound/pci/hda/hda_bind.c
@@ -287,9 +287,9 @@ int snd_hda_codec_configure(struct hda_codec *codec)
287 } 287 }
288 288
289 /* audio codec should override the mixer name */ 289 /* audio codec should override the mixer name */
290 if (codec->afg || !*codec->bus->card->mixername) 290 if (codec->afg || !*codec->card->mixername)
291 snprintf(codec->bus->card->mixername, 291 snprintf(codec->card->mixername,
292 sizeof(codec->bus->card->mixername), 292 sizeof(codec->card->mixername),
293 "%s %s", codec->vendor_name, codec->chip_name); 293 "%s %s", codec->vendor_name, codec->chip_name);
294 return 0; 294 return 0;
295 295
diff --git a/sound/pci/hda/hda_codec.c b/sound/pci/hda/hda_codec.c
index 40300fcc5308..0533c862b539 100644
--- a/sound/pci/hda/hda_codec.c
+++ b/sound/pci/hda/hda_codec.c
@@ -1196,9 +1196,8 @@ static void snd_hda_codec_dev_release(struct device *dev)
1196 * 1196 *
1197 * Returns 0 if successful, or a negative error code. 1197 * Returns 0 if successful, or a negative error code.
1198 */ 1198 */
1199int snd_hda_codec_new(struct hda_bus *bus, 1199int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
1200 unsigned int codec_addr, 1200 unsigned int codec_addr, struct hda_codec **codecp)
1201 struct hda_codec **codecp)
1202{ 1201{
1203 struct hda_codec *codec; 1202 struct hda_codec *codec;
1204 struct device *dev; 1203 struct device *dev;
@@ -1217,7 +1216,7 @@ int snd_hda_codec_new(struct hda_bus *bus,
1217 return -EINVAL; 1216 return -EINVAL;
1218 1217
1219 if (bus->caddr_tbl[codec_addr]) { 1218 if (bus->caddr_tbl[codec_addr]) {
1220 dev_err(bus->card->dev, 1219 dev_err(card->dev,
1221 "address 0x%x is already occupied\n", 1220 "address 0x%x is already occupied\n",
1222 codec_addr); 1221 codec_addr);
1223 return -EBUSY; 1222 return -EBUSY;
@@ -1225,21 +1224,22 @@ int snd_hda_codec_new(struct hda_bus *bus,
1225 1224
1226 codec = kzalloc(sizeof(*codec), GFP_KERNEL); 1225 codec = kzalloc(sizeof(*codec), GFP_KERNEL);
1227 if (codec == NULL) { 1226 if (codec == NULL) {
1228 dev_err(bus->card->dev, "can't allocate struct hda_codec\n"); 1227 dev_err(card->dev, "can't allocate struct hda_codec\n");
1229 return -ENOMEM; 1228 return -ENOMEM;
1230 } 1229 }
1231 1230
1232 dev = hda_codec_dev(codec); 1231 dev = hda_codec_dev(codec);
1233 device_initialize(dev); 1232 device_initialize(dev);
1234 dev->parent = bus->card->dev; 1233 dev->parent = card->dev;
1235 dev->bus = &snd_hda_bus_type; 1234 dev->bus = &snd_hda_bus_type;
1236 dev->release = snd_hda_codec_dev_release; 1235 dev->release = snd_hda_codec_dev_release;
1237 dev->groups = snd_hda_dev_attr_groups; 1236 dev->groups = snd_hda_dev_attr_groups;
1238 dev_set_name(dev, "hdaudioC%dD%d", bus->card->number, codec_addr); 1237 dev_set_name(dev, "hdaudioC%dD%d", card->number, codec_addr);
1239 dev_set_drvdata(dev, codec); /* for sysfs */ 1238 dev_set_drvdata(dev, codec); /* for sysfs */
1240 device_enable_async_suspend(dev); 1239 device_enable_async_suspend(dev);
1241 1240
1242 codec->bus = bus; 1241 codec->bus = bus;
1242 codec->card = card;
1243 codec->addr = codec_addr; 1243 codec->addr = codec_addr;
1244 mutex_init(&codec->spdif_mutex); 1244 mutex_init(&codec->spdif_mutex);
1245 mutex_init(&codec->control_mutex); 1245 mutex_init(&codec->control_mutex);
@@ -1300,7 +1300,7 @@ int snd_hda_codec_new(struct hda_bus *bus,
1300 1300
1301 setup_fg_nodes(codec); 1301 setup_fg_nodes(codec);
1302 if (!codec->afg && !codec->mfg) { 1302 if (!codec->afg && !codec->mfg) {
1303 dev_err(bus->card->dev, "no AFG or MFG node found\n"); 1303 dev_err(card->dev, "no AFG or MFG node found\n");
1304 err = -ENODEV; 1304 err = -ENODEV;
1305 goto error; 1305 goto error;
1306 } 1306 }
@@ -1308,7 +1308,7 @@ int snd_hda_codec_new(struct hda_bus *bus,
1308 fg = codec->afg ? codec->afg : codec->mfg; 1308 fg = codec->afg ? codec->afg : codec->mfg;
1309 err = read_widget_caps(codec, fg); 1309 err = read_widget_caps(codec, fg);
1310 if (err < 0) { 1310 if (err < 0) {
1311 dev_err(bus->card->dev, "cannot malloc\n"); 1311 dev_err(card->dev, "cannot malloc\n");
1312 goto error; 1312 goto error;
1313 } 1313 }
1314 err = read_pin_defaults(codec); 1314 err = read_pin_defaults(codec);
@@ -1337,9 +1337,9 @@ int snd_hda_codec_new(struct hda_bus *bus,
1337 1337
1338 sprintf(component, "HDA:%08x,%08x,%08x", codec->vendor_id, 1338 sprintf(component, "HDA:%08x,%08x,%08x", codec->vendor_id,
1339 codec->subsystem_id, codec->revision_id); 1339 codec->subsystem_id, codec->revision_id);
1340 snd_component_add(codec->bus->card, component); 1340 snd_component_add(card, component);
1341 1341
1342 err = snd_device_new(bus->card, SNDRV_DEV_CODEC, codec, &dev_ops); 1342 err = snd_device_new(card, SNDRV_DEV_CODEC, codec, &dev_ops);
1343 if (err < 0) 1343 if (err < 0)
1344 goto error; 1344 goto error;
1345 1345
@@ -2237,7 +2237,7 @@ find_mixer_ctl(struct hda_codec *codec, const char *name, int dev, int idx)
2237 if (snd_BUG_ON(strlen(name) >= sizeof(id.name))) 2237 if (snd_BUG_ON(strlen(name) >= sizeof(id.name)))
2238 return NULL; 2238 return NULL;
2239 strcpy(id.name, name); 2239 strcpy(id.name, name);
2240 return snd_ctl_find_id(codec->bus->card, &id); 2240 return snd_ctl_find_id(codec->card, &id);
2241} 2241}
2242 2242
2243/** 2243/**
@@ -2301,7 +2301,7 @@ int snd_hda_ctl_add(struct hda_codec *codec, hda_nid_t nid,
2301 nid = kctl->id.subdevice & 0xffff; 2301 nid = kctl->id.subdevice & 0xffff;
2302 if (kctl->id.subdevice & (HDA_SUBDEV_NID_FLAG|HDA_SUBDEV_AMP_FLAG)) 2302 if (kctl->id.subdevice & (HDA_SUBDEV_NID_FLAG|HDA_SUBDEV_AMP_FLAG))
2303 kctl->id.subdevice = 0; 2303 kctl->id.subdevice = 0;
2304 err = snd_ctl_add(codec->bus->card, kctl); 2304 err = snd_ctl_add(codec->card, kctl);
2305 if (err < 0) 2305 if (err < 0)
2306 return err; 2306 return err;
2307 item = snd_array_new(&codec->mixers); 2307 item = snd_array_new(&codec->mixers);
@@ -2354,7 +2354,7 @@ void snd_hda_ctls_clear(struct hda_codec *codec)
2354 int i; 2354 int i;
2355 struct hda_nid_item *items = codec->mixers.list; 2355 struct hda_nid_item *items = codec->mixers.list;
2356 for (i = 0; i < codec->mixers.used; i++) 2356 for (i = 0; i < codec->mixers.used; i++)
2357 snd_ctl_remove(codec->bus->card, items[i].kctl); 2357 snd_ctl_remove(codec->card, items[i].kctl);
2358 snd_array_free(&codec->mixers); 2358 snd_array_free(&codec->mixers);
2359 snd_array_free(&codec->nids); 2359 snd_array_free(&codec->nids);
2360} 2360}
@@ -2427,7 +2427,7 @@ EXPORT_SYMBOL_GPL(snd_hda_unlock_devices);
2427int snd_hda_codec_reset(struct hda_codec *codec) 2427int snd_hda_codec_reset(struct hda_codec *codec)
2428{ 2428{
2429 struct hda_bus *bus = codec->bus; 2429 struct hda_bus *bus = codec->bus;
2430 struct snd_card *card = bus->card; 2430 struct snd_card *card = codec->card;
2431 int i; 2431 int i;
2432 2432
2433 if (snd_hda_lock_devices(bus) < 0) 2433 if (snd_hda_lock_devices(bus) < 0)
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h
index 8cf70369cd10..8908a0768736 100644
--- a/sound/pci/hda/hda_codec.h
+++ b/sound/pci/hda/hda_codec.h
@@ -274,6 +274,7 @@ struct hda_pcm {
274struct hda_codec { 274struct hda_codec {
275 struct device dev; 275 struct device dev;
276 struct hda_bus *bus; 276 struct hda_bus *bus;
277 struct snd_card *card;
277 unsigned int addr; /* codec addr*/ 278 unsigned int addr; /* codec addr*/
278 struct list_head list; /* list point */ 279 struct list_head list; /* list point */
279 280
@@ -420,8 +421,8 @@ enum {
420 * constructors 421 * constructors
421 */ 422 */
422int snd_hda_bus_new(struct snd_card *card, struct hda_bus **busp); 423int snd_hda_bus_new(struct snd_card *card, struct hda_bus **busp);
423int snd_hda_codec_new(struct hda_bus *bus, unsigned int codec_addr, 424int snd_hda_codec_new(struct hda_bus *bus, struct snd_card *card,
424 struct hda_codec **codecp); 425 unsigned int codec_addr, struct hda_codec **codecp);
425int snd_hda_codec_configure(struct hda_codec *codec); 426int snd_hda_codec_configure(struct hda_codec *codec);
426int snd_hda_codec_update_widgets(struct hda_codec *codec); 427int snd_hda_codec_update_widgets(struct hda_codec *codec);
427 428
diff --git a/sound/pci/hda/hda_controller.c b/sound/pci/hda/hda_controller.c
index 1695f0e2bd9d..f50863a5159d 100644
--- a/sound/pci/hda/hda_controller.c
+++ b/sound/pci/hda/hda_controller.c
@@ -1898,7 +1898,7 @@ int azx_probe_codecs(struct azx *chip, unsigned int max_slots)
1898 for (c = 0; c < max_slots; c++) { 1898 for (c = 0; c < max_slots; c++) {
1899 if ((chip->codec_mask & (1 << c)) & chip->codec_probe_mask) { 1899 if ((chip->codec_mask & (1 << c)) & chip->codec_probe_mask) {
1900 struct hda_codec *codec; 1900 struct hda_codec *codec;
1901 err = snd_hda_codec_new(bus, c, &codec); 1901 err = snd_hda_codec_new(bus, bus->card, c, &codec);
1902 if (err < 0) 1902 if (err < 0)
1903 continue; 1903 continue;
1904 codec->jackpoll_interval = get_jackpoll_interval(chip); 1904 codec->jackpoll_interval = get_jackpoll_interval(chip);
diff --git a/sound/pci/hda/hda_hwdep.c b/sound/pci/hda/hda_hwdep.c
index 125f3420fa6a..57df06e76968 100644
--- a/sound/pci/hda/hda_hwdep.c
+++ b/sound/pci/hda/hda_hwdep.c
@@ -101,7 +101,7 @@ int snd_hda_create_hwdep(struct hda_codec *codec)
101 int err; 101 int err;
102 102
103 sprintf(hwname, "HDA Codec %d", codec->addr); 103 sprintf(hwname, "HDA Codec %d", codec->addr);
104 err = snd_hwdep_new(codec->bus->card, hwname, codec->addr, &hwdep); 104 err = snd_hwdep_new(codec->card, hwname, codec->addr, &hwdep);
105 if (err < 0) 105 if (err < 0)
106 return err; 106 return err;
107 codec->hwdep = hwdep; 107 codec->hwdep = hwdep;
diff --git a/sound/pci/hda/hda_jack.c b/sound/pci/hda/hda_jack.c
index e664307617bd..d7cfe7b8c32b 100644
--- a/sound/pci/hda/hda_jack.c
+++ b/sound/pci/hda/hda_jack.c
@@ -135,7 +135,7 @@ void snd_hda_jack_tbl_clear(struct hda_codec *codec)
135#ifdef CONFIG_SND_HDA_INPUT_JACK 135#ifdef CONFIG_SND_HDA_INPUT_JACK
136 /* free jack instances manually when clearing/reconfiguring */ 136 /* free jack instances manually when clearing/reconfiguring */
137 if (!codec->bus->shutdown && jack->jack) 137 if (!codec->bus->shutdown && jack->jack)
138 snd_device_free(codec->bus->card, jack->jack); 138 snd_device_free(codec->card, jack->jack);
139#endif 139#endif
140 for (cb = jack->callback; cb; cb = next) { 140 for (cb = jack->callback; cb; cb = next) {
141 next = cb->next; 141 next = cb->next;
@@ -340,7 +340,7 @@ void snd_hda_jack_report_sync(struct hda_codec *codec)
340 if (!jack->kctl || jack->block_report) 340 if (!jack->kctl || jack->block_report)
341 continue; 341 continue;
342 state = get_jack_plug_state(jack->pin_sense); 342 state = get_jack_plug_state(jack->pin_sense);
343 snd_kctl_jack_report(codec->bus->card, jack->kctl, state); 343 snd_kctl_jack_report(codec->card, jack->kctl, state);
344#ifdef CONFIG_SND_HDA_INPUT_JACK 344#ifdef CONFIG_SND_HDA_INPUT_JACK
345 if (jack->jack) 345 if (jack->jack)
346 snd_jack_report(jack->jack, 346 snd_jack_report(jack->jack,
@@ -412,11 +412,11 @@ static int __snd_hda_jack_add_kctl(struct hda_codec *codec, hda_nid_t nid,
412 jack->phantom_jack = !!phantom_jack; 412 jack->phantom_jack = !!phantom_jack;
413 413
414 state = snd_hda_jack_detect(codec, nid); 414 state = snd_hda_jack_detect(codec, nid);
415 snd_kctl_jack_report(codec->bus->card, kctl, state); 415 snd_kctl_jack_report(codec->card, kctl, state);
416#ifdef CONFIG_SND_HDA_INPUT_JACK 416#ifdef CONFIG_SND_HDA_INPUT_JACK
417 if (!phantom_jack) { 417 if (!phantom_jack) {
418 jack->type = get_input_jack_type(codec, nid); 418 jack->type = get_input_jack_type(codec, nid);
419 err = snd_jack_new(codec->bus->card, name, jack->type, 419 err = snd_jack_new(codec->card, name, jack->type,
420 &jack->jack); 420 &jack->jack);
421 if (err < 0) 421 if (err < 0)
422 return err; 422 return err;
diff --git a/sound/pci/hda/hda_proc.c b/sound/pci/hda/hda_proc.c
index ce5a6da83419..cc32b878ae2e 100644
--- a/sound/pci/hda/hda_proc.c
+++ b/sound/pci/hda/hda_proc.c
@@ -839,7 +839,7 @@ int snd_hda_codec_proc_new(struct hda_codec *codec)
839 int err; 839 int err;
840 840
841 snprintf(name, sizeof(name), "codec#%d", codec->addr); 841 snprintf(name, sizeof(name), "codec#%d", codec->addr);
842 err = snd_card_proc_new(codec->bus->card, name, &entry); 842 err = snd_card_proc_new(codec->card, name, &entry);
843 if (err < 0) 843 if (err < 0)
844 return err; 844 return err;
845 845
diff --git a/sound/pci/hda/hda_sysfs.c b/sound/pci/hda/hda_sysfs.c
index ccc962a1699f..e13c75d67847 100644
--- a/sound/pci/hda/hda_sysfs.c
+++ b/sound/pci/hda/hda_sysfs.c
@@ -149,7 +149,7 @@ static int reconfig_codec(struct hda_codec *codec)
149 err = snd_hda_codec_build_controls(codec); 149 err = snd_hda_codec_build_controls(codec);
150 if (err < 0) 150 if (err < 0)
151 goto error; 151 goto error;
152 err = snd_card_register(codec->bus->card); 152 err = snd_card_register(codec->card);
153 error: 153 error:
154 snd_hda_power_down(codec); 154 snd_hda_power_down(codec);
155 return err; 155 return err;
diff --git a/sound/pci/hda/hda_trace.h b/sound/pci/hda/hda_trace.h
index c0e1c7d24dbe..7fedfa862419 100644
--- a/sound/pci/hda/hda_trace.h
+++ b/sound/pci/hda/hda_trace.h
@@ -23,7 +23,7 @@ DECLARE_EVENT_CLASS(hda_cmd,
23 ), 23 ),
24 24
25 TP_fast_assign( 25 TP_fast_assign(
26 __entry->card = (codec)->bus->card->number; 26 __entry->card = (codec)->card->number;
27 __entry->addr = (codec)->addr; 27 __entry->addr = (codec)->addr;
28 __entry->val = (val); 28 __entry->val = (val);
29 ), 29 ),
@@ -71,7 +71,7 @@ DECLARE_EVENT_CLASS(hda_power,
71 ), 71 ),
72 72
73 TP_fast_assign( 73 TP_fast_assign(
74 __entry->card = (codec)->bus->card->number; 74 __entry->card = (codec)->card->number;
75 __entry->addr = (codec)->addr; 75 __entry->addr = (codec)->addr;
76 ), 76 ),
77 77
diff --git a/sound/pci/hda/patch_ca0132.c b/sound/pci/hda/patch_ca0132.c
index 81991b4134cd..ced3e82d9e23 100644
--- a/sound/pci/hda/patch_ca0132.c
+++ b/sound/pci/hda/patch_ca0132.c
@@ -4352,7 +4352,7 @@ static bool ca0132_download_dsp_images(struct hda_codec *codec)
4352 const struct dsp_image_seg *dsp_os_image; 4352 const struct dsp_image_seg *dsp_os_image;
4353 const struct firmware *fw_entry; 4353 const struct firmware *fw_entry;
4354 4354
4355 if (request_firmware(&fw_entry, EFX_FILE, codec->bus->card->dev) != 0) 4355 if (request_firmware(&fw_entry, EFX_FILE, codec->card->dev) != 0)
4356 return false; 4356 return false;
4357 4357
4358 dsp_os_image = (struct dsp_image_seg *)(fw_entry->data); 4358 dsp_os_image = (struct dsp_image_seg *)(fw_entry->data);
diff --git a/sound/pci/hda/patch_hdmi.c b/sound/pci/hda/patch_hdmi.c
index f1812aabd63e..0f8354cbc7a7 100644
--- a/sound/pci/hda/patch_hdmi.c
+++ b/sound/pci/hda/patch_hdmi.c
@@ -579,7 +579,7 @@ static int eld_proc_new(struct hdmi_spec_per_pin *per_pin, int index)
579 int err; 579 int err;
580 580
581 snprintf(name, sizeof(name), "eld#%d.%d", codec->addr, index); 581 snprintf(name, sizeof(name), "eld#%d.%d", codec->addr, index);
582 err = snd_card_proc_new(codec->bus->card, name, &entry); 582 err = snd_card_proc_new(codec->card, name, &entry);
583 if (err < 0) 583 if (err < 0)
584 return err; 584 return err;
585 585
@@ -594,7 +594,7 @@ static int eld_proc_new(struct hdmi_spec_per_pin *per_pin, int index)
594static void eld_proc_free(struct hdmi_spec_per_pin *per_pin) 594static void eld_proc_free(struct hdmi_spec_per_pin *per_pin)
595{ 595{
596 if (!per_pin->codec->bus->shutdown && per_pin->proc_entry) { 596 if (!per_pin->codec->bus->shutdown && per_pin->proc_entry) {
597 snd_device_free(per_pin->codec->bus->card, per_pin->proc_entry); 597 snd_device_free(per_pin->codec->card, per_pin->proc_entry);
598 per_pin->proc_entry = NULL; 598 per_pin->proc_entry = NULL;
599 } 599 }
600} 600}
@@ -1624,7 +1624,7 @@ static bool hdmi_present_sense(struct hdmi_spec_per_pin *per_pin, int repoll)
1624 } 1624 }
1625 1625
1626 if (eld_changed) 1626 if (eld_changed)
1627 snd_ctl_notify(codec->bus->card, 1627 snd_ctl_notify(codec->card,
1628 SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO, 1628 SNDRV_CTL_EVENT_MASK_VALUE | SNDRV_CTL_EVENT_MASK_INFO,
1629 &per_pin->eld_ctl->id); 1629 &per_pin->eld_ctl->id);
1630 unlock: 1630 unlock:
diff --git a/sound/pci/hda/patch_via.c b/sound/pci/hda/patch_via.c
index 2045f33b1ace..57ad503ff940 100644
--- a/sound/pci/hda/patch_via.c
+++ b/sound/pci/hda/patch_via.c
@@ -907,16 +907,16 @@ static int patch_vt1708S(struct hda_codec *codec)
907 if (get_codec_type(codec) == VT1708BCE) { 907 if (get_codec_type(codec) == VT1708BCE) {
908 kfree(codec->chip_name); 908 kfree(codec->chip_name);
909 codec->chip_name = kstrdup("VT1708BCE", GFP_KERNEL); 909 codec->chip_name = kstrdup("VT1708BCE", GFP_KERNEL);
910 snprintf(codec->bus->card->mixername, 910 snprintf(codec->card->mixername,
911 sizeof(codec->bus->card->mixername), 911 sizeof(codec->card->mixername),
912 "%s %s", codec->vendor_name, codec->chip_name); 912 "%s %s", codec->vendor_name, codec->chip_name);
913 } 913 }
914 /* correct names for VT1705 */ 914 /* correct names for VT1705 */
915 if (codec->vendor_id == 0x11064397) { 915 if (codec->vendor_id == 0x11064397) {
916 kfree(codec->chip_name); 916 kfree(codec->chip_name);
917 codec->chip_name = kstrdup("VT1705", GFP_KERNEL); 917 codec->chip_name = kstrdup("VT1705", GFP_KERNEL);
918 snprintf(codec->bus->card->mixername, 918 snprintf(codec->card->mixername,
919 sizeof(codec->bus->card->mixername), 919 sizeof(codec->card->mixername),
920 "%s %s", codec->vendor_name, codec->chip_name); 920 "%s %s", codec->vendor_name, codec->chip_name);
921 } 921 }
922 922