aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/patch_realtek.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-25 06:21:03 -0500
committerTakashi Iwai <tiwai@suse.de>2014-02-25 06:27:32 -0500
commit4e76a8833fac8dc1735aa5be7d1b3c92c65e209e (patch)
tree69978ef2eca15fcfc79e42e467be616262d1ff89 /sound/pci/hda/patch_realtek.c
parentb989d0444bd4999f9130d262b5ab7123d4077df8 (diff)
ALSA: hda - Replace with standard printk
Use dev_err() and co for messages from HD-audio controller and codec drivers. The codec drivers are mostly bound with codec objects, so some helper macros, codec_err(), codec_info(), etc, are provided. They merely wrap the corresponding dev_xxx(). There are a few places still calling snd_printk() and its variants as they are called without the codec or device context. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/patch_realtek.c')
-rw-r--r--sound/pci/hda/patch_realtek.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index ee1ba2293b23..c2322209d6c3 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -407,8 +407,8 @@ static int alc_auto_parse_customize_define(struct hda_codec *codec)
407 ass = snd_hda_codec_get_pincfg(codec, nid); 407 ass = snd_hda_codec_get_pincfg(codec, nid);
408 408
409 if (!(ass & 1)) { 409 if (!(ass & 1)) {
410 printk(KERN_INFO "hda_codec: %s: SKU not ready 0x%08x\n", 410 codec_info(codec, "%s: SKU not ready 0x%08x\n",
411 codec->chip_name, ass); 411 codec->chip_name, ass);
412 return -1; 412 return -1;
413 } 413 }
414 414
@@ -432,17 +432,17 @@ do_sku:
432 spec->cdefine.swap = (ass & 0x2) >> 1; 432 spec->cdefine.swap = (ass & 0x2) >> 1;
433 spec->cdefine.override = ass & 0x1; 433 spec->cdefine.override = ass & 0x1;
434 434
435 snd_printd("SKU: Nid=0x%x sku_cfg=0x%08x\n", 435 codec_dbg(codec, "SKU: Nid=0x%x sku_cfg=0x%08x\n",
436 nid, spec->cdefine.sku_cfg); 436 nid, spec->cdefine.sku_cfg);
437 snd_printd("SKU: port_connectivity=0x%x\n", 437 codec_dbg(codec, "SKU: port_connectivity=0x%x\n",
438 spec->cdefine.port_connectivity); 438 spec->cdefine.port_connectivity);
439 snd_printd("SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep); 439 codec_dbg(codec, "SKU: enable_pcbeep=0x%x\n", spec->cdefine.enable_pcbeep);
440 snd_printd("SKU: check_sum=0x%08x\n", spec->cdefine.check_sum); 440 codec_dbg(codec, "SKU: check_sum=0x%08x\n", spec->cdefine.check_sum);
441 snd_printd("SKU: customization=0x%08x\n", spec->cdefine.customization); 441 codec_dbg(codec, "SKU: customization=0x%08x\n", spec->cdefine.customization);
442 snd_printd("SKU: external_amp=0x%x\n", spec->cdefine.external_amp); 442 codec_dbg(codec, "SKU: external_amp=0x%x\n", spec->cdefine.external_amp);
443 snd_printd("SKU: platform_type=0x%x\n", spec->cdefine.platform_type); 443 codec_dbg(codec, "SKU: platform_type=0x%x\n", spec->cdefine.platform_type);
444 snd_printd("SKU: swap=0x%x\n", spec->cdefine.swap); 444 codec_dbg(codec, "SKU: swap=0x%x\n", spec->cdefine.swap);
445 snd_printd("SKU: override=0x%x\n", spec->cdefine.override); 445 codec_dbg(codec, "SKU: override=0x%x\n", spec->cdefine.override);
446 446
447 return 0; 447 return 0;
448} 448}
@@ -502,8 +502,8 @@ static int alc_subsystem_id(struct hda_codec *codec, const hda_nid_t *ports)
502 if (codec->vendor_id == 0x10ec0260) 502 if (codec->vendor_id == 0x10ec0260)
503 nid = 0x17; 503 nid = 0x17;
504 ass = snd_hda_codec_get_pincfg(codec, nid); 504 ass = snd_hda_codec_get_pincfg(codec, nid);
505 snd_printd("realtek: No valid SSID, " 505 codec_dbg(codec,
506 "checking pincfg 0x%08x for NID 0x%x\n", 506 "realtek: No valid SSID, checking pincfg 0x%08x for NID 0x%x\n",
507 ass, nid); 507 ass, nid);
508 if (!(ass & 1)) 508 if (!(ass & 1))
509 return 0; 509 return 0;
@@ -519,7 +519,7 @@ static int alc_subsystem_id(struct hda_codec *codec, const hda_nid_t *ports)
519 if (((ass >> 16) & 0xf) != tmp) 519 if (((ass >> 16) & 0xf) != tmp)
520 return 0; 520 return 0;
521do_sku: 521do_sku:
522 snd_printd("realtek: Enabling init ASM_ID=0x%04x CODEC_ID=%08x\n", 522 codec_dbg(codec, "realtek: Enabling init ASM_ID=0x%04x CODEC_ID=%08x\n",
523 ass & 0xffff, codec->vendor_id); 523 ass & 0xffff, codec->vendor_id);
524 /* 524 /*
525 * 0 : override 525 * 0 : override
@@ -577,8 +577,8 @@ static void alc_ssid_check(struct hda_codec *codec, const hda_nid_t *ports)
577{ 577{
578 if (!alc_subsystem_id(codec, ports)) { 578 if (!alc_subsystem_id(codec, ports)) {
579 struct alc_spec *spec = codec->spec; 579 struct alc_spec *spec = codec->spec;
580 snd_printd("realtek: " 580 codec_dbg(codec,
581 "Enable default setup for auto mode as fallback\n"); 581 "realtek: Enable default setup for auto mode as fallback\n");
582 spec->init_amp = ALC_INIT_DEFAULT; 582 spec->init_amp = ALC_INIT_DEFAULT;
583 } 583 }
584} 584}
@@ -3170,7 +3170,8 @@ static void alc269_fixup_hp_mute_led(struct hda_codec *codec,
3170 spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook; 3170 spec->gen.vmaster_mute.hook = alc269_fixup_mic_mute_hook;
3171 spec->gen.vmaster_mute_enum = 1; 3171 spec->gen.vmaster_mute_enum = 1;
3172 codec->power_filter = led_power_filter; 3172 codec->power_filter = led_power_filter;
3173 snd_printd("Detected mute LED for %x:%d\n", spec->mute_led_nid, 3173 codec_dbg(codec,
3174 "Detected mute LED for %x:%d\n", spec->mute_led_nid,
3174 spec->mute_led_polarity); 3175 spec->mute_led_polarity);
3175 break; 3176 break;
3176 } 3177 }
@@ -3296,7 +3297,7 @@ static void alc_headset_mode_unplugged(struct hda_codec *codec)
3296 alc_write_coef_idx(codec, 0xb7, 0x802b); 3297 alc_write_coef_idx(codec, 0xb7, 0x802b);
3297 break; 3298 break;
3298 } 3299 }
3299 snd_printdd("Headset jack set to unplugged mode.\n"); 3300 codec_dbg(codec, "Headset jack set to unplugged mode.\n");
3300} 3301}
3301 3302
3302 3303
@@ -3339,7 +3340,7 @@ static void alc_headset_mode_mic_in(struct hda_codec *codec, hda_nid_t hp_pin,
3339 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50); 3340 snd_hda_set_pin_ctl_cache(codec, mic_pin, PIN_VREF50);
3340 break; 3341 break;
3341 } 3342 }
3342 snd_printdd("Headset jack set to mic-in mode.\n"); 3343 codec_dbg(codec, "Headset jack set to mic-in mode.\n");
3343} 3344}
3344 3345
3345static void alc_headset_mode_default(struct hda_codec *codec) 3346static void alc_headset_mode_default(struct hda_codec *codec)
@@ -3367,7 +3368,7 @@ static void alc_headset_mode_default(struct hda_codec *codec)
3367 alc_write_coef_idx(codec, 0xb7, 0x802b); 3368 alc_write_coef_idx(codec, 0xb7, 0x802b);
3368 break; 3369 break;
3369 } 3370 }
3370 snd_printdd("Headset jack set to headphone (default) mode.\n"); 3371 codec_dbg(codec, "Headset jack set to headphone (default) mode.\n");
3371} 3372}
3372 3373
3373/* Iphone type */ 3374/* Iphone type */
@@ -3396,7 +3397,7 @@ static void alc_headset_mode_ctia(struct hda_codec *codec)
3396 alc_write_coef_idx(codec, 0xc3, 0x0000); 3397 alc_write_coef_idx(codec, 0xc3, 0x0000);
3397 break; 3398 break;
3398 } 3399 }
3399 snd_printdd("Headset jack set to iPhone-style headset mode.\n"); 3400 codec_dbg(codec, "Headset jack set to iPhone-style headset mode.\n");
3400} 3401}
3401 3402
3402/* Nokia type */ 3403/* Nokia type */
@@ -3425,7 +3426,7 @@ static void alc_headset_mode_omtp(struct hda_codec *codec)
3425 alc_write_coef_idx(codec, 0xc3, 0x0000); 3426 alc_write_coef_idx(codec, 0xc3, 0x0000);
3426 break; 3427 break;
3427 } 3428 }
3428 snd_printdd("Headset jack set to Nokia-style headset mode.\n"); 3429 codec_dbg(codec, "Headset jack set to Nokia-style headset mode.\n");
3429} 3430}
3430 3431
3431static void alc_determine_headset_type(struct hda_codec *codec) 3432static void alc_determine_headset_type(struct hda_codec *codec)
@@ -3467,7 +3468,7 @@ static void alc_determine_headset_type(struct hda_codec *codec)
3467 break; 3468 break;
3468 } 3469 }
3469 3470
3470 snd_printdd("Headset jack detected iPhone-style headset: %s\n", 3471 codec_dbg(codec, "Headset jack detected iPhone-style headset: %s\n",
3471 is_ctia ? "yes" : "no"); 3472 is_ctia ? "yes" : "no");
3472 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP; 3473 spec->current_headset_type = is_ctia ? ALC_HEADSET_TYPE_CTIA : ALC_HEADSET_TYPE_OMTP;
3473} 3474}
@@ -4901,8 +4902,7 @@ static void alc272_fixup_mario(struct hda_codec *codec,
4901 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT) | 4902 (0x3b << AC_AMPCAP_NUM_STEPS_SHIFT) |
4902 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT) | 4903 (0x03 << AC_AMPCAP_STEP_SIZE_SHIFT) |
4903 (0 << AC_AMPCAP_MUTE_SHIFT))) 4904 (0 << AC_AMPCAP_MUTE_SHIFT)))
4904 printk(KERN_WARNING 4905 codec_warn(codec, "failed to override amp caps for NID 0x2\n");
4905 "hda_codec: failed to override amp caps for NID 0x2\n");
4906} 4906}
4907 4907
4908static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = { 4908static const struct snd_pcm_chmap_elem asus_pcm_2_1_chmaps[] = {