aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_intel.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2009-05-19 06:16:46 -0400
committerTakashi Iwai <tiwai@suse.de>2009-05-19 06:16:46 -0400
commit4abc1cc2f9fe4b6bb3acc1d78e2c15af47b8133d (patch)
tree66d9a6e1ec6d31e8c42864081b9db5d230263f83 /sound/pci/hda/hda_intel.c
parenteb4c41d30ba1f973c8b10be3644571ab997ae0d6 (diff)
ALSA: hda - Add prefix to kernel messages
Add proper prefix to each kernel message in hda_intel.c. Also, avoid the unneeded prefix when CONFIG_SND_VERBOSE_PRINTK is used together with snd_print*(). Reference: bko#13207 http://bugzilla.kernel.org/show_bug.cgi?id=13207 Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_intel.c')
-rw-r--r--sound/pci/hda/hda_intel.c37
1 files changed, 20 insertions, 17 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index 7bb6dd2cb6cc..49fd973b85cc 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -128,8 +128,11 @@ MODULE_SUPPORTED_DEVICE("{{Intel, ICH6},"
128 "{ULI, M5461}}"); 128 "{ULI, M5461}}");
129MODULE_DESCRIPTION("Intel HDA driver"); 129MODULE_DESCRIPTION("Intel HDA driver");
130 130
131#ifdef CONFIG_SND_VERBOSE_PRINTK
132#define SFX /* nop */
133#else
131#define SFX "hda-intel: " 134#define SFX "hda-intel: "
132 135#endif
133 136
134/* 137/*
135 * registers 138 * registers
@@ -620,7 +623,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
620 } 623 }
621 624
622 if (chip->msi) { 625 if (chip->msi) {
623 snd_printk(KERN_WARNING "hda_intel: No response from codec, " 626 snd_printk(KERN_WARNING SFX "No response from codec, "
624 "disabling MSI: last cmd=0x%08x\n", chip->last_cmd); 627 "disabling MSI: last cmd=0x%08x\n", chip->last_cmd);
625 free_irq(chip->irq, chip); 628 free_irq(chip->irq, chip);
626 chip->irq = -1; 629 chip->irq = -1;
@@ -634,7 +637,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
634 } 637 }
635 638
636 if (!chip->polling_mode) { 639 if (!chip->polling_mode) {
637 snd_printk(KERN_WARNING "hda_intel: azx_get_response timeout, " 640 snd_printk(KERN_WARNING SFX "azx_get_response timeout, "
638 "switching to polling mode: last cmd=0x%08x\n", 641 "switching to polling mode: last cmd=0x%08x\n",
639 chip->last_cmd); 642 chip->last_cmd);
640 chip->polling_mode = 1; 643 chip->polling_mode = 1;
@@ -649,7 +652,7 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus)
649 return -1; 652 return -1;
650 } 653 }
651 654
652 snd_printk(KERN_ERR "hda_intel: azx_get_response timeout (ERROR): " 655 snd_printk(KERN_ERR SFX "azx_get_response timeout (ERROR): "
653 "last cmd=0x%08x\n", chip->last_cmd); 656 "last cmd=0x%08x\n", chip->last_cmd);
654 spin_lock_irq(&chip->reg_lock); 657 spin_lock_irq(&chip->reg_lock);
655 chip->rirb.cmds = 0; /* reset the index */ 658 chip->rirb.cmds = 0; /* reset the index */
@@ -776,7 +779,7 @@ static int azx_reset(struct azx *chip)
776 779
777 /* check to see if controller is ready */ 780 /* check to see if controller is ready */
778 if (!azx_readb(chip, GCTL)) { 781 if (!azx_readb(chip, GCTL)) {
779 snd_printd("azx_reset: controller not ready!\n"); 782 snd_printd(SFX "azx_reset: controller not ready!\n");
780 return -EBUSY; 783 return -EBUSY;
781 } 784 }
782 785
@@ -786,7 +789,7 @@ static int azx_reset(struct azx *chip)
786 /* detect codecs */ 789 /* detect codecs */
787 if (!chip->codec_mask) { 790 if (!chip->codec_mask) {
788 chip->codec_mask = azx_readw(chip, STATESTS); 791 chip->codec_mask = azx_readw(chip, STATESTS);
789 snd_printdd("codec_mask = 0x%x\n", chip->codec_mask); 792 snd_printdd(SFX "codec_mask = 0x%x\n", chip->codec_mask);
790 } 793 }
791 794
792 return 0; 795 return 0;
@@ -954,12 +957,12 @@ static void azx_init_pci(struct azx *chip)
954 case AZX_DRIVER_SCH: 957 case AZX_DRIVER_SCH:
955 pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop); 958 pci_read_config_word(chip->pci, INTEL_SCH_HDA_DEVC, &snoop);
956 if (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) { 959 if (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) {
957 pci_write_config_word(chip->pci, INTEL_SCH_HDA_DEVC, \ 960 pci_write_config_word(chip->pci, INTEL_SCH_HDA_DEVC,
958 snoop & (~INTEL_SCH_HDA_DEVC_NOSNOOP)); 961 snoop & (~INTEL_SCH_HDA_DEVC_NOSNOOP));
959 pci_read_config_word(chip->pci, 962 pci_read_config_word(chip->pci,
960 INTEL_SCH_HDA_DEVC, &snoop); 963 INTEL_SCH_HDA_DEVC, &snoop);
961 snd_printdd("HDA snoop disabled, enabling ... %s\n",\ 964 snd_printdd(SFX "HDA snoop disabled, enabling ... %s\n",
962 (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) \ 965 (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP)
963 ? "Failed" : "OK"); 966 ? "Failed" : "OK");
964 } 967 }
965 break; 968 break;
@@ -1099,7 +1102,7 @@ static int azx_setup_periods(struct azx *chip,
1099 pos_align; 1102 pos_align;
1100 pos_adj = frames_to_bytes(runtime, pos_adj); 1103 pos_adj = frames_to_bytes(runtime, pos_adj);
1101 if (pos_adj >= period_bytes) { 1104 if (pos_adj >= period_bytes) {
1102 snd_printk(KERN_WARNING "Too big adjustment %d\n", 1105 snd_printk(KERN_WARNING SFX "Too big adjustment %d\n",
1103 bdl_pos_adj[chip->dev_index]); 1106 bdl_pos_adj[chip->dev_index]);
1104 pos_adj = 0; 1107 pos_adj = 0;
1105 } else { 1108 } else {
@@ -1123,7 +1126,7 @@ static int azx_setup_periods(struct azx *chip,
1123 return 0; 1126 return 0;
1124 1127
1125 error: 1128 error:
1126 snd_printk(KERN_ERR "Too many BDL entries: buffer=%d, period=%d\n", 1129 snd_printk(KERN_ERR SFX "Too many BDL entries: buffer=%d, period=%d\n",
1127 azx_dev->bufsize, period_bytes); 1130 azx_dev->bufsize, period_bytes);
1128 return -EINVAL; 1131 return -EINVAL;
1129} 1132}
@@ -1216,7 +1219,7 @@ static int probe_codec(struct azx *chip, int addr)
1216 chip->probing = 0; 1219 chip->probing = 0;
1217 if (res == -1) 1220 if (res == -1)
1218 return -EIO; 1221 return -EIO;
1219 snd_printdd("hda_intel: codec #%d probed OK\n", addr); 1222 snd_printdd(SFX "codec #%d probed OK\n", addr);
1220 return 0; 1223 return 0;
1221} 1224}
1222 1225
@@ -1271,8 +1274,8 @@ static int __devinit azx_codec_create(struct azx *chip, const char *model,
1271 /* Some BIOSen give you wrong codec addresses 1274 /* Some BIOSen give you wrong codec addresses
1272 * that don't exist 1275 * that don't exist
1273 */ 1276 */
1274 snd_printk(KERN_WARNING 1277 snd_printk(KERN_WARNING SFX
1275 "hda_intel: Codec #%d probe error; " 1278 "Codec #%d probe error; "
1276 "disabling it...\n", c); 1279 "disabling it...\n", c);
1277 chip->codec_mask &= ~(1 << c); 1280 chip->codec_mask &= ~(1 << c);
1278 /* More badly, accessing to a non-existing 1281 /* More badly, accessing to a non-existing
@@ -1488,7 +1491,7 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream)
1488 bufsize = snd_pcm_lib_buffer_bytes(substream); 1491 bufsize = snd_pcm_lib_buffer_bytes(substream);
1489 period_bytes = snd_pcm_lib_period_bytes(substream); 1492 period_bytes = snd_pcm_lib_period_bytes(substream);
1490 1493
1491 snd_printdd("azx_pcm_prepare: bufsize=0x%x, format=0x%x\n", 1494 snd_printdd(SFX "azx_pcm_prepare: bufsize=0x%x, format=0x%x\n",
1492 bufsize, format_val); 1495 bufsize, format_val);
1493 1496
1494 if (bufsize != azx_dev->bufsize || 1497 if (bufsize != azx_dev->bufsize ||
@@ -2265,7 +2268,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
2265 synchronize_irq(chip->irq); 2268 synchronize_irq(chip->irq);
2266 2269
2267 gcap = azx_readw(chip, GCAP); 2270 gcap = azx_readw(chip, GCAP);
2268 snd_printdd("chipset global capabilities = 0x%x\n", gcap); 2271 snd_printdd(SFX "chipset global capabilities = 0x%x\n", gcap);
2269 2272
2270 /* ATI chips seems buggy about 64bit DMA addresses */ 2273 /* ATI chips seems buggy about 64bit DMA addresses */
2271 if (chip->driver_type == AZX_DRIVER_ATI) 2274 if (chip->driver_type == AZX_DRIVER_ATI)
@@ -2309,7 +2312,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci,
2309 chip->azx_dev = kcalloc(chip->num_streams, sizeof(*chip->azx_dev), 2312 chip->azx_dev = kcalloc(chip->num_streams, sizeof(*chip->azx_dev),
2310 GFP_KERNEL); 2313 GFP_KERNEL);
2311 if (!chip->azx_dev) { 2314 if (!chip->azx_dev) {
2312 snd_printk(KERN_ERR "cannot malloc azx_dev\n"); 2315 snd_printk(KERN_ERR SFX "cannot malloc azx_dev\n");
2313 goto errout; 2316 goto errout;
2314 } 2317 }
2315 2318