diff options
-rw-r--r-- | sound/pci/hda/hda_intel.c | 125 |
1 files changed, 64 insertions, 61 deletions
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c index 22ecadcf22dd..eb481090d372 100644 --- a/sound/pci/hda/hda_intel.c +++ b/sound/pci/hda/hda_intel.c | |||
@@ -192,7 +192,7 @@ MODULE_DESCRIPTION("Intel HDA driver"); | |||
192 | #ifdef CONFIG_SND_VERBOSE_PRINTK | 192 | #ifdef CONFIG_SND_VERBOSE_PRINTK |
193 | #define SFX /* nop */ | 193 | #define SFX /* nop */ |
194 | #else | 194 | #else |
195 | #define SFX "hda-intel: " | 195 | #define SFX "hda-intel " |
196 | #endif | 196 | #endif |
197 | 197 | ||
198 | #if defined(CONFIG_PM) && defined(CONFIG_VGA_SWITCHEROO) | 198 | #if defined(CONFIG_PM) && defined(CONFIG_VGA_SWITCHEROO) |
@@ -717,7 +717,7 @@ static int azx_alloc_cmd_io(struct azx *chip) | |||
717 | snd_dma_pci_data(chip->pci), | 717 | snd_dma_pci_data(chip->pci), |
718 | PAGE_SIZE, &chip->rb); | 718 | PAGE_SIZE, &chip->rb); |
719 | if (err < 0) { | 719 | if (err < 0) { |
720 | snd_printk(KERN_ERR SFX "cannot allocate CORB/RIRB\n"); | 720 | snd_printk(KERN_ERR SFX "%s: cannot allocate CORB/RIRB\n", pci_name(chip->pci)); |
721 | return err; | 721 | return err; |
722 | } | 722 | } |
723 | mark_pages_wc(chip, &chip->rb, true); | 723 | mark_pages_wc(chip, &chip->rb, true); |
@@ -894,9 +894,9 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, | |||
894 | } | 894 | } |
895 | 895 | ||
896 | if (!chip->polling_mode && chip->poll_count < 2) { | 896 | if (!chip->polling_mode && chip->poll_count < 2) { |
897 | snd_printdd(SFX "azx_get_response timeout, " | 897 | snd_printdd(SFX "%s: azx_get_response timeout, " |
898 | "polling the codec once: last cmd=0x%08x\n", | 898 | "polling the codec once: last cmd=0x%08x\n", |
899 | chip->last_cmd[addr]); | 899 | pci_name(chip->pci), chip->last_cmd[addr]); |
900 | do_poll = 1; | 900 | do_poll = 1; |
901 | chip->poll_count++; | 901 | chip->poll_count++; |
902 | goto again; | 902 | goto again; |
@@ -904,17 +904,17 @@ static unsigned int azx_rirb_get_response(struct hda_bus *bus, | |||
904 | 904 | ||
905 | 905 | ||
906 | if (!chip->polling_mode) { | 906 | if (!chip->polling_mode) { |
907 | snd_printk(KERN_WARNING SFX "azx_get_response timeout, " | 907 | snd_printk(KERN_WARNING SFX "%s: azx_get_response timeout, " |
908 | "switching to polling mode: last cmd=0x%08x\n", | 908 | "switching to polling mode: last cmd=0x%08x\n", |
909 | chip->last_cmd[addr]); | 909 | pci_name(chip->pci), chip->last_cmd[addr]); |
910 | chip->polling_mode = 1; | 910 | chip->polling_mode = 1; |
911 | goto again; | 911 | goto again; |
912 | } | 912 | } |
913 | 913 | ||
914 | if (chip->msi) { | 914 | if (chip->msi) { |
915 | snd_printk(KERN_WARNING SFX "No response from codec, " | 915 | snd_printk(KERN_WARNING SFX "%s: No response from codec, " |
916 | "disabling MSI: last cmd=0x%08x\n", | 916 | "disabling MSI: last cmd=0x%08x\n", |
917 | chip->last_cmd[addr]); | 917 | pci_name(chip->pci), chip->last_cmd[addr]); |
918 | free_irq(chip->irq, chip); | 918 | free_irq(chip->irq, chip); |
919 | chip->irq = -1; | 919 | chip->irq = -1; |
920 | pci_disable_msi(chip->pci); | 920 | pci_disable_msi(chip->pci); |
@@ -980,8 +980,8 @@ static int azx_single_wait_for_response(struct azx *chip, unsigned int addr) | |||
980 | udelay(1); | 980 | udelay(1); |
981 | } | 981 | } |
982 | if (printk_ratelimit()) | 982 | if (printk_ratelimit()) |
983 | snd_printd(SFX "get_response timeout: IRS=0x%x\n", | 983 | snd_printd(SFX "%s: get_response timeout: IRS=0x%x\n", |
984 | azx_readw(chip, IRS)); | 984 | pci_name(chip->pci), azx_readw(chip, IRS)); |
985 | chip->rirb.res[addr] = -1; | 985 | chip->rirb.res[addr] = -1; |
986 | return -EIO; | 986 | return -EIO; |
987 | } | 987 | } |
@@ -1008,8 +1008,8 @@ static int azx_single_send_cmd(struct hda_bus *bus, u32 val) | |||
1008 | udelay(1); | 1008 | udelay(1); |
1009 | } | 1009 | } |
1010 | if (printk_ratelimit()) | 1010 | if (printk_ratelimit()) |
1011 | snd_printd(SFX "send_cmd timeout: IRS=0x%x, val=0x%x\n", | 1011 | snd_printd(SFX "%s: send_cmd timeout: IRS=0x%x, val=0x%x\n", |
1012 | azx_readw(chip, IRS), val); | 1012 | pci_name(chip->pci), azx_readw(chip, IRS), val); |
1013 | return -EIO; | 1013 | return -EIO; |
1014 | } | 1014 | } |
1015 | 1015 | ||
@@ -1095,7 +1095,7 @@ static int azx_reset(struct azx *chip, int full_reset) | |||
1095 | __skip: | 1095 | __skip: |
1096 | /* check to see if controller is ready */ | 1096 | /* check to see if controller is ready */ |
1097 | if (!azx_readb(chip, GCTL)) { | 1097 | if (!azx_readb(chip, GCTL)) { |
1098 | snd_printd(SFX "azx_reset: controller not ready!\n"); | 1098 | snd_printd(SFX "%s: azx_reset: controller not ready!\n", pci_name(chip->pci)); |
1099 | return -EBUSY; | 1099 | return -EBUSY; |
1100 | } | 1100 | } |
1101 | 1101 | ||
@@ -1107,7 +1107,7 @@ static int azx_reset(struct azx *chip, int full_reset) | |||
1107 | /* detect codecs */ | 1107 | /* detect codecs */ |
1108 | if (!chip->codec_mask) { | 1108 | if (!chip->codec_mask) { |
1109 | chip->codec_mask = azx_readw(chip, STATESTS); | 1109 | chip->codec_mask = azx_readw(chip, STATESTS); |
1110 | snd_printdd(SFX "codec_mask = 0x%x\n", chip->codec_mask); | 1110 | snd_printdd(SFX "%s: codec_mask = 0x%x\n", pci_name(chip->pci), chip->codec_mask); |
1111 | } | 1111 | } |
1112 | 1112 | ||
1113 | return 0; | 1113 | return 0; |
@@ -1251,7 +1251,7 @@ static void azx_init_pci(struct azx *chip) | |||
1251 | * The PCI register TCSEL is defined in the Intel manuals. | 1251 | * The PCI register TCSEL is defined in the Intel manuals. |
1252 | */ | 1252 | */ |
1253 | if (!(chip->driver_caps & AZX_DCAPS_NO_TCSEL)) { | 1253 | if (!(chip->driver_caps & AZX_DCAPS_NO_TCSEL)) { |
1254 | snd_printdd(SFX "Clearing TCSEL\n"); | 1254 | snd_printdd(SFX "%s: Clearing TCSEL\n", pci_name(chip->pci)); |
1255 | update_pci_byte(chip->pci, ICH6_PCIREG_TCSEL, 0x07, 0); | 1255 | update_pci_byte(chip->pci, ICH6_PCIREG_TCSEL, 0x07, 0); |
1256 | } | 1256 | } |
1257 | 1257 | ||
@@ -1259,7 +1259,7 @@ static void azx_init_pci(struct azx *chip) | |||
1259 | * we need to enable snoop. | 1259 | * we need to enable snoop. |
1260 | */ | 1260 | */ |
1261 | if (chip->driver_caps & AZX_DCAPS_ATI_SNOOP) { | 1261 | if (chip->driver_caps & AZX_DCAPS_ATI_SNOOP) { |
1262 | snd_printdd(SFX "Setting ATI snoop: %d\n", azx_snoop(chip)); | 1262 | snd_printdd(SFX "%s: Setting ATI snoop: %d\n", pci_name(chip->pci), azx_snoop(chip)); |
1263 | update_pci_byte(chip->pci, | 1263 | update_pci_byte(chip->pci, |
1264 | ATI_SB450_HDAUDIO_MISC_CNTR2_ADDR, 0x07, | 1264 | ATI_SB450_HDAUDIO_MISC_CNTR2_ADDR, 0x07, |
1265 | azx_snoop(chip) ? ATI_SB450_HDAUDIO_ENABLE_SNOOP : 0); | 1265 | azx_snoop(chip) ? ATI_SB450_HDAUDIO_ENABLE_SNOOP : 0); |
@@ -1267,7 +1267,7 @@ static void azx_init_pci(struct azx *chip) | |||
1267 | 1267 | ||
1268 | /* For NVIDIA HDA, enable snoop */ | 1268 | /* For NVIDIA HDA, enable snoop */ |
1269 | if (chip->driver_caps & AZX_DCAPS_NVIDIA_SNOOP) { | 1269 | if (chip->driver_caps & AZX_DCAPS_NVIDIA_SNOOP) { |
1270 | snd_printdd(SFX "Setting Nvidia snoop: %d\n", azx_snoop(chip)); | 1270 | snd_printdd(SFX "%s: Setting Nvidia snoop: %d\n", pci_name(chip->pci), azx_snoop(chip)); |
1271 | update_pci_byte(chip->pci, | 1271 | update_pci_byte(chip->pci, |
1272 | NVIDIA_HDA_TRANSREG_ADDR, | 1272 | NVIDIA_HDA_TRANSREG_ADDR, |
1273 | 0x0f, NVIDIA_HDA_ENABLE_COHBITS); | 1273 | 0x0f, NVIDIA_HDA_ENABLE_COHBITS); |
@@ -1292,8 +1292,8 @@ static void azx_init_pci(struct azx *chip) | |||
1292 | pci_read_config_word(chip->pci, | 1292 | pci_read_config_word(chip->pci, |
1293 | INTEL_SCH_HDA_DEVC, &snoop); | 1293 | INTEL_SCH_HDA_DEVC, &snoop); |
1294 | } | 1294 | } |
1295 | snd_printdd(SFX "SCH snoop: %s\n", | 1295 | snd_printdd(SFX "%s: SCH snoop: %s\n", |
1296 | (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) | 1296 | pci_name(chip->pci), (snoop & INTEL_SCH_HDA_DEVC_NOSNOOP) |
1297 | ? "Disabled" : "Enabled"); | 1297 | ? "Disabled" : "Enabled"); |
1298 | } | 1298 | } |
1299 | } | 1299 | } |
@@ -1453,8 +1453,8 @@ static int azx_setup_periods(struct azx *chip, | |||
1453 | pos_align; | 1453 | pos_align; |
1454 | pos_adj = frames_to_bytes(runtime, pos_adj); | 1454 | pos_adj = frames_to_bytes(runtime, pos_adj); |
1455 | if (pos_adj >= period_bytes) { | 1455 | if (pos_adj >= period_bytes) { |
1456 | snd_printk(KERN_WARNING SFX "Too big adjustment %d\n", | 1456 | snd_printk(KERN_WARNING SFX "%s: Too big adjustment %d\n", |
1457 | bdl_pos_adj[chip->dev_index]); | 1457 | pci_name(chip->pci), bdl_pos_adj[chip->dev_index]); |
1458 | pos_adj = 0; | 1458 | pos_adj = 0; |
1459 | } else { | 1459 | } else { |
1460 | ofs = setup_bdle(chip, substream, azx_dev, | 1460 | ofs = setup_bdle(chip, substream, azx_dev, |
@@ -1478,8 +1478,8 @@ static int azx_setup_periods(struct azx *chip, | |||
1478 | return 0; | 1478 | return 0; |
1479 | 1479 | ||
1480 | error: | 1480 | error: |
1481 | snd_printk(KERN_ERR SFX "Too many BDL entries: buffer=%d, period=%d\n", | 1481 | snd_printk(KERN_ERR SFX "%s: Too many BDL entries: buffer=%d, period=%d\n", |
1482 | azx_dev->bufsize, period_bytes); | 1482 | pci_name(chip->pci), azx_dev->bufsize, period_bytes); |
1483 | return -EINVAL; | 1483 | return -EINVAL; |
1484 | } | 1484 | } |
1485 | 1485 | ||
@@ -1576,7 +1576,7 @@ static int probe_codec(struct azx *chip, int addr) | |||
1576 | mutex_unlock(&chip->bus->cmd_mutex); | 1576 | mutex_unlock(&chip->bus->cmd_mutex); |
1577 | if (res == -1) | 1577 | if (res == -1) |
1578 | return -EIO; | 1578 | return -EIO; |
1579 | snd_printdd(SFX "codec #%d probed OK\n", addr); | 1579 | snd_printdd(SFX "%s: codec #%d probed OK\n", pci_name(chip->pci), addr); |
1580 | return 0; | 1580 | return 0; |
1581 | } | 1581 | } |
1582 | 1582 | ||
@@ -1653,7 +1653,7 @@ static int DELAYED_INIT_MARK azx_codec_create(struct azx *chip, const char *mode | |||
1653 | return err; | 1653 | return err; |
1654 | 1654 | ||
1655 | if (chip->driver_caps & AZX_DCAPS_RIRB_DELAY) { | 1655 | if (chip->driver_caps & AZX_DCAPS_RIRB_DELAY) { |
1656 | snd_printd(SFX "Enable delay in RIRB handling\n"); | 1656 | snd_printd(SFX "%s: Enable delay in RIRB handling\n", pci_name(chip->pci)); |
1657 | chip->bus->needs_damn_long_delay = 1; | 1657 | chip->bus->needs_damn_long_delay = 1; |
1658 | } | 1658 | } |
1659 | 1659 | ||
@@ -1670,8 +1670,8 @@ static int DELAYED_INIT_MARK azx_codec_create(struct azx *chip, const char *mode | |||
1670 | * that don't exist | 1670 | * that don't exist |
1671 | */ | 1671 | */ |
1672 | snd_printk(KERN_WARNING SFX | 1672 | snd_printk(KERN_WARNING SFX |
1673 | "Codec #%d probe error; " | 1673 | "%s: Codec #%d probe error; " |
1674 | "disabling it...\n", c); | 1674 | "disabling it...\n", pci_name(chip->pci), c); |
1675 | chip->codec_mask &= ~(1 << c); | 1675 | chip->codec_mask &= ~(1 << c); |
1676 | /* More badly, accessing to a non-existing | 1676 | /* More badly, accessing to a non-existing |
1677 | * codec often screws up the controller chip, | 1677 | * codec often screws up the controller chip, |
@@ -1691,7 +1691,8 @@ static int DELAYED_INIT_MARK azx_codec_create(struct azx *chip, const char *mode | |||
1691 | * access works around the stall. Grrr... | 1691 | * access works around the stall. Grrr... |
1692 | */ | 1692 | */ |
1693 | if (chip->driver_caps & AZX_DCAPS_SYNC_WRITE) { | 1693 | if (chip->driver_caps & AZX_DCAPS_SYNC_WRITE) { |
1694 | snd_printd(SFX "Enable sync_write for stable communication\n"); | 1694 | snd_printd(SFX "%s: Enable sync_write for stable communication\n", |
1695 | pci_name(chip->pci)); | ||
1695 | chip->bus->sync_write = 1; | 1696 | chip->bus->sync_write = 1; |
1696 | chip->bus->allow_bus_reset = 1; | 1697 | chip->bus->allow_bus_reset = 1; |
1697 | } | 1698 | } |
@@ -1709,7 +1710,7 @@ static int DELAYED_INIT_MARK azx_codec_create(struct azx *chip, const char *mode | |||
1709 | } | 1710 | } |
1710 | } | 1711 | } |
1711 | if (!codecs) { | 1712 | if (!codecs) { |
1712 | snd_printk(KERN_ERR SFX "no codecs initialized\n"); | 1713 | snd_printk(KERN_ERR SFX "%s: no codecs initialized\n", pci_name(chip->pci)); |
1713 | return -ENXIO; | 1714 | return -ENXIO; |
1714 | } | 1715 | } |
1715 | return 0; | 1716 | return 0; |
@@ -2019,16 +2020,16 @@ static int azx_pcm_prepare(struct snd_pcm_substream *substream) | |||
2019 | ctls); | 2020 | ctls); |
2020 | if (!format_val) { | 2021 | if (!format_val) { |
2021 | snd_printk(KERN_ERR SFX | 2022 | snd_printk(KERN_ERR SFX |
2022 | "invalid format_val, rate=%d, ch=%d, format=%d\n", | 2023 | "%s: invalid format_val, rate=%d, ch=%d, format=%d\n", |
2023 | runtime->rate, runtime->channels, runtime->format); | 2024 | pci_name(chip->pci), runtime->rate, runtime->channels, runtime->format); |
2024 | return -EINVAL; | 2025 | return -EINVAL; |
2025 | } | 2026 | } |
2026 | 2027 | ||
2027 | bufsize = snd_pcm_lib_buffer_bytes(substream); | 2028 | bufsize = snd_pcm_lib_buffer_bytes(substream); |
2028 | period_bytes = snd_pcm_lib_period_bytes(substream); | 2029 | period_bytes = snd_pcm_lib_period_bytes(substream); |
2029 | 2030 | ||
2030 | snd_printdd(SFX "azx_pcm_prepare: bufsize=0x%x, format=0x%x\n", | 2031 | snd_printdd(SFX "%s: azx_pcm_prepare: bufsize=0x%x, format=0x%x\n", |
2031 | bufsize, format_val); | 2032 | pci_name(chip->pci), bufsize, format_val); |
2032 | 2033 | ||
2033 | if (bufsize != azx_dev->bufsize || | 2034 | if (bufsize != azx_dev->bufsize || |
2034 | period_bytes != azx_dev->period_bytes || | 2035 | period_bytes != azx_dev->period_bytes || |
@@ -2287,9 +2288,9 @@ static unsigned int azx_get_position(struct azx *chip, | |||
2287 | delay += azx_dev->bufsize; | 2288 | delay += azx_dev->bufsize; |
2288 | if (delay >= azx_dev->period_bytes) { | 2289 | if (delay >= azx_dev->period_bytes) { |
2289 | snd_printk(KERN_WARNING SFX | 2290 | snd_printk(KERN_WARNING SFX |
2290 | "Unstable LPIB (%d >= %d); " | 2291 | "%s: Unstable LPIB (%d >= %d); " |
2291 | "disabling LPIB delay counting\n", | 2292 | "disabling LPIB delay counting\n", |
2292 | delay, azx_dev->period_bytes); | 2293 | pci_name(chip->pci), delay, azx_dev->period_bytes); |
2293 | delay = 0; | 2294 | delay = 0; |
2294 | chip->driver_caps &= ~AZX_DCAPS_COUNT_LPIB_DELAY; | 2295 | chip->driver_caps &= ~AZX_DCAPS_COUNT_LPIB_DELAY; |
2295 | } | 2296 | } |
@@ -2446,7 +2447,8 @@ azx_attach_pcm_stream(struct hda_bus *bus, struct hda_codec *codec, | |||
2446 | 2447 | ||
2447 | list_for_each_entry(apcm, &chip->pcm_list, list) { | 2448 | list_for_each_entry(apcm, &chip->pcm_list, list) { |
2448 | if (apcm->pcm->device == pcm_dev) { | 2449 | if (apcm->pcm->device == pcm_dev) { |
2449 | snd_printk(KERN_ERR SFX "PCM %d already exists\n", pcm_dev); | 2450 | snd_printk(KERN_ERR SFX "%s: PCM %d already exists\n", |
2451 | pci_name(chip->pci), pcm_dev); | ||
2450 | return -EBUSY; | 2452 | return -EBUSY; |
2451 | } | 2453 | } |
2452 | } | 2454 | } |
@@ -2771,15 +2773,14 @@ static void azx_vs_set_state(struct pci_dev *pci, | |||
2771 | } | 2773 | } |
2772 | } else { | 2774 | } else { |
2773 | snd_printk(KERN_INFO SFX | 2775 | snd_printk(KERN_INFO SFX |
2774 | "%s %s via VGA-switcheroo\n", | 2776 | "%s: %s via VGA-switcheroo\n", pci_name(chip->pci), |
2775 | disabled ? "Disabling" : "Enabling", | 2777 | disabled ? "Disabling" : "Enabling"); |
2776 | pci_name(chip->pci)); | ||
2777 | if (disabled) { | 2778 | if (disabled) { |
2778 | azx_suspend(&pci->dev); | 2779 | azx_suspend(&pci->dev); |
2779 | chip->disabled = true; | 2780 | chip->disabled = true; |
2780 | if (snd_hda_lock_devices(chip->bus)) | 2781 | if (snd_hda_lock_devices(chip->bus)) |
2781 | snd_printk(KERN_WARNING SFX | 2782 | snd_printk(KERN_WARNING SFX "%s: Cannot lock devices!\n", |
2782 | "Cannot lock devices!\n"); | 2783 | pci_name(chip->pci)); |
2783 | } else { | 2784 | } else { |
2784 | snd_hda_unlock_devices(chip->bus); | 2785 | snd_hda_unlock_devices(chip->bus); |
2785 | chip->disabled = false; | 2786 | chip->disabled = false; |
@@ -2998,11 +2999,11 @@ static int __devinit check_position_fix(struct azx *chip, int fix) | |||
2998 | 2999 | ||
2999 | /* Check VIA/ATI HD Audio Controller exist */ | 3000 | /* Check VIA/ATI HD Audio Controller exist */ |
3000 | if (chip->driver_caps & AZX_DCAPS_POSFIX_VIA) { | 3001 | if (chip->driver_caps & AZX_DCAPS_POSFIX_VIA) { |
3001 | snd_printd(SFX "Using VIACOMBO position fix\n"); | 3002 | snd_printd(SFX "%s: Using VIACOMBO position fix\n", pci_name(chip->pci)); |
3002 | return POS_FIX_VIACOMBO; | 3003 | return POS_FIX_VIACOMBO; |
3003 | } | 3004 | } |
3004 | if (chip->driver_caps & AZX_DCAPS_POSFIX_LPIB) { | 3005 | if (chip->driver_caps & AZX_DCAPS_POSFIX_LPIB) { |
3005 | snd_printd(SFX "Using LPIB position fix\n"); | 3006 | snd_printd(SFX "%s: Using LPIB position fix\n", pci_name(chip->pci)); |
3006 | return POS_FIX_LPIB; | 3007 | return POS_FIX_LPIB; |
3007 | } | 3008 | } |
3008 | return POS_FIX_AUTO; | 3009 | return POS_FIX_AUTO; |
@@ -3118,8 +3119,8 @@ static void __devinit azx_check_snoop_available(struct azx *chip) | |||
3118 | } | 3119 | } |
3119 | 3120 | ||
3120 | if (snoop != chip->snoop) { | 3121 | if (snoop != chip->snoop) { |
3121 | snd_printk(KERN_INFO SFX "Force to %s mode\n", | 3122 | snd_printk(KERN_INFO SFX "%s: Force to %s mode\n", |
3122 | snoop ? "snoop" : "non-snoop"); | 3123 | pci_name(chip->pci), snoop ? "snoop" : "non-snoop"); |
3123 | chip->snoop = snoop; | 3124 | chip->snoop = snoop; |
3124 | } | 3125 | } |
3125 | } | 3126 | } |
@@ -3145,7 +3146,7 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
3145 | 3146 | ||
3146 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 3147 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
3147 | if (!chip) { | 3148 | if (!chip) { |
3148 | snd_printk(KERN_ERR SFX "cannot allocate chip\n"); | 3149 | snd_printk(KERN_ERR SFX "%s: Cannot allocate chip\n", pci_name(pci)); |
3149 | pci_disable_device(pci); | 3150 | pci_disable_device(pci); |
3150 | return -ENOMEM; | 3151 | return -ENOMEM; |
3151 | } | 3152 | } |
@@ -3193,7 +3194,8 @@ static int __devinit azx_create(struct snd_card *card, struct pci_dev *pci, | |||
3193 | 3194 | ||
3194 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); | 3195 | err = snd_device_new(card, SNDRV_DEV_LOWLEVEL, chip, &ops); |
3195 | if (err < 0) { | 3196 | if (err < 0) { |
3196 | snd_printk(KERN_ERR SFX "Error creating device [card]!\n"); | 3197 | snd_printk(KERN_ERR SFX "%s: Error creating device [card]!\n", |
3198 | pci_name(chip->pci)); | ||
3197 | azx_free(chip); | 3199 | azx_free(chip); |
3198 | return err; | 3200 | return err; |
3199 | } | 3201 | } |
@@ -3228,7 +3230,7 @@ static int DELAYED_INIT_MARK azx_first_init(struct azx *chip) | |||
3228 | chip->addr = pci_resource_start(pci, 0); | 3230 | chip->addr = pci_resource_start(pci, 0); |
3229 | chip->remap_addr = pci_ioremap_bar(pci, 0); | 3231 | chip->remap_addr = pci_ioremap_bar(pci, 0); |
3230 | if (chip->remap_addr == NULL) { | 3232 | if (chip->remap_addr == NULL) { |
3231 | snd_printk(KERN_ERR SFX "ioremap error\n"); | 3233 | snd_printk(KERN_ERR SFX "%s: ioremap error\n", pci_name(chip->pci)); |
3232 | return -ENXIO; | 3234 | return -ENXIO; |
3233 | } | 3235 | } |
3234 | 3236 | ||
@@ -3243,7 +3245,7 @@ static int DELAYED_INIT_MARK azx_first_init(struct azx *chip) | |||
3243 | synchronize_irq(chip->irq); | 3245 | synchronize_irq(chip->irq); |
3244 | 3246 | ||
3245 | gcap = azx_readw(chip, GCAP); | 3247 | gcap = azx_readw(chip, GCAP); |
3246 | snd_printdd(SFX "chipset global capabilities = 0x%x\n", gcap); | 3248 | snd_printdd(SFX "%s: chipset global capabilities = 0x%x\n", pci_name(chip->pci), gcap); |
3247 | 3249 | ||
3248 | /* disable SB600 64bit support for safety */ | 3250 | /* disable SB600 64bit support for safety */ |
3249 | if (chip->pci->vendor == PCI_VENDOR_ID_ATI) { | 3251 | if (chip->pci->vendor == PCI_VENDOR_ID_ATI) { |
@@ -3260,7 +3262,7 @@ static int DELAYED_INIT_MARK azx_first_init(struct azx *chip) | |||
3260 | 3262 | ||
3261 | /* disable 64bit DMA address on some devices */ | 3263 | /* disable 64bit DMA address on some devices */ |
3262 | if (chip->driver_caps & AZX_DCAPS_NO_64BIT) { | 3264 | if (chip->driver_caps & AZX_DCAPS_NO_64BIT) { |
3263 | snd_printd(SFX "Disabling 64bit DMA\n"); | 3265 | snd_printd(SFX "%s: Disabling 64bit DMA\n", pci_name(chip->pci)); |
3264 | gcap &= ~ICH6_GCAP_64OK; | 3266 | gcap &= ~ICH6_GCAP_64OK; |
3265 | } | 3267 | } |
3266 | 3268 | ||
@@ -3315,7 +3317,7 @@ static int DELAYED_INIT_MARK azx_first_init(struct azx *chip) | |||
3315 | chip->azx_dev = kcalloc(chip->num_streams, sizeof(*chip->azx_dev), | 3317 | chip->azx_dev = kcalloc(chip->num_streams, sizeof(*chip->azx_dev), |
3316 | GFP_KERNEL); | 3318 | GFP_KERNEL); |
3317 | if (!chip->azx_dev) { | 3319 | if (!chip->azx_dev) { |
3318 | snd_printk(KERN_ERR SFX "cannot malloc azx_dev\n"); | 3320 | snd_printk(KERN_ERR SFX "%s: cannot malloc azx_dev\n", pci_name(chip->pci)); |
3319 | return -ENOMEM; | 3321 | return -ENOMEM; |
3320 | } | 3322 | } |
3321 | 3323 | ||
@@ -3325,7 +3327,7 @@ static int DELAYED_INIT_MARK azx_first_init(struct azx *chip) | |||
3325 | snd_dma_pci_data(chip->pci), | 3327 | snd_dma_pci_data(chip->pci), |
3326 | BDL_SIZE, &chip->azx_dev[i].bdl); | 3328 | BDL_SIZE, &chip->azx_dev[i].bdl); |
3327 | if (err < 0) { | 3329 | if (err < 0) { |
3328 | snd_printk(KERN_ERR SFX "cannot allocate BDL\n"); | 3330 | snd_printk(KERN_ERR SFX "%s: cannot allocate BDL\n", pci_name(chip->pci)); |
3329 | return -ENOMEM; | 3331 | return -ENOMEM; |
3330 | } | 3332 | } |
3331 | mark_pages_wc(chip, &chip->azx_dev[i].bdl, true); | 3333 | mark_pages_wc(chip, &chip->azx_dev[i].bdl, true); |
@@ -3335,7 +3337,7 @@ static int DELAYED_INIT_MARK azx_first_init(struct azx *chip) | |||
3335 | snd_dma_pci_data(chip->pci), | 3337 | snd_dma_pci_data(chip->pci), |
3336 | chip->num_streams * 8, &chip->posbuf); | 3338 | chip->num_streams * 8, &chip->posbuf); |
3337 | if (err < 0) { | 3339 | if (err < 0) { |
3338 | snd_printk(KERN_ERR SFX "cannot allocate posbuf\n"); | 3340 | snd_printk(KERN_ERR SFX "%s: cannot allocate posbuf\n", pci_name(chip->pci)); |
3339 | return -ENOMEM; | 3341 | return -ENOMEM; |
3340 | } | 3342 | } |
3341 | mark_pages_wc(chip, &chip->posbuf, true); | 3343 | mark_pages_wc(chip, &chip->posbuf, true); |
@@ -3353,7 +3355,7 @@ static int DELAYED_INIT_MARK azx_first_init(struct azx *chip) | |||
3353 | 3355 | ||
3354 | /* codec detection */ | 3356 | /* codec detection */ |
3355 | if (!chip->codec_mask) { | 3357 | if (!chip->codec_mask) { |
3356 | snd_printk(KERN_ERR SFX "no codecs found!\n"); | 3358 | snd_printk(KERN_ERR SFX "%s: no codecs found!\n", pci_name(chip->pci)); |
3357 | return -ENODEV; | 3359 | return -ENODEV; |
3358 | } | 3360 | } |
3359 | 3361 | ||
@@ -3389,7 +3391,8 @@ static void azx_firmware_cb(const struct firmware *fw, void *context) | |||
3389 | struct pci_dev *pci = chip->pci; | 3391 | struct pci_dev *pci = chip->pci; |
3390 | 3392 | ||
3391 | if (!fw) { | 3393 | if (!fw) { |
3392 | snd_printk(KERN_ERR SFX "Cannot load firmware, aborting\n"); | 3394 | snd_printk(KERN_ERR SFX "%s: Cannot load firmware, aborting\n", |
3395 | pci_name(chip->pci)); | ||
3393 | goto error; | 3396 | goto error; |
3394 | } | 3397 | } |
3395 | 3398 | ||
@@ -3425,7 +3428,7 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
3425 | 3428 | ||
3426 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); | 3429 | err = snd_card_create(index[dev], id[dev], THIS_MODULE, 0, &card); |
3427 | if (err < 0) { | 3430 | if (err < 0) { |
3428 | snd_printk(KERN_ERR SFX "Error creating card!\n"); | 3431 | snd_printk(KERN_ERR "hda-intel: Error creating card!\n"); |
3429 | return err; | 3432 | return err; |
3430 | } | 3433 | } |
3431 | 3434 | ||
@@ -3441,14 +3444,14 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
3441 | err = register_vga_switcheroo(chip); | 3444 | err = register_vga_switcheroo(chip); |
3442 | if (err < 0) { | 3445 | if (err < 0) { |
3443 | snd_printk(KERN_ERR SFX | 3446 | snd_printk(KERN_ERR SFX |
3444 | "Error registering VGA-switcheroo client\n"); | 3447 | "%s: Error registering VGA-switcheroo client\n", pci_name(pci)); |
3445 | goto out_free; | 3448 | goto out_free; |
3446 | } | 3449 | } |
3447 | 3450 | ||
3448 | if (check_hdmi_disabled(pci)) { | 3451 | if (check_hdmi_disabled(pci)) { |
3449 | snd_printk(KERN_INFO SFX "VGA controller for %s is disabled\n", | 3452 | snd_printk(KERN_INFO SFX "%s: VGA controller is disabled\n", |
3450 | pci_name(pci)); | 3453 | pci_name(pci)); |
3451 | snd_printk(KERN_INFO SFX "Delaying initialization\n"); | 3454 | snd_printk(KERN_INFO SFX "%s: Delaying initialization\n", pci_name(pci)); |
3452 | chip->disabled = true; | 3455 | chip->disabled = true; |
3453 | } | 3456 | } |
3454 | 3457 | ||
@@ -3461,8 +3464,8 @@ static int __devinit azx_probe(struct pci_dev *pci, | |||
3461 | 3464 | ||
3462 | #ifdef CONFIG_SND_HDA_PATCH_LOADER | 3465 | #ifdef CONFIG_SND_HDA_PATCH_LOADER |
3463 | if (patch[dev] && *patch[dev]) { | 3466 | if (patch[dev] && *patch[dev]) { |
3464 | snd_printk(KERN_ERR SFX "Applying patch firmware '%s'\n", | 3467 | snd_printk(KERN_ERR SFX "%s: Applying patch firmware '%s'\n", |
3465 | patch[dev]); | 3468 | pci_name(pci), patch[dev]); |
3466 | err = request_firmware_nowait(THIS_MODULE, true, patch[dev], | 3469 | err = request_firmware_nowait(THIS_MODULE, true, patch[dev], |
3467 | &pci->dev, GFP_KERNEL, card, | 3470 | &pci->dev, GFP_KERNEL, card, |
3468 | azx_firmware_cb); | 3471 | azx_firmware_cb); |