diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-25 11:01:34 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:26 -0500 |
commit | 26bc6964f97b3a7d3c86fd4887cbfcb8e7c3d7ce (patch) | |
tree | 6b649fe8d0a15d912141a025ed9da71da4ea95a8 /sound | |
parent | ece7a36d407d4ad1e9a1ddfb920a7007cf86a9d3 (diff) |
ALSA: emu10k1x: Use standard printk helpers
Convert with dev_err() and co from snd_printk(), etc.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/pci/emu10k1/emu10k1x.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/sound/pci/emu10k1/emu10k1x.c b/sound/pci/emu10k1/emu10k1x.c index 3988eaa778cf..efe017526977 100644 --- a/sound/pci/emu10k1/emu10k1x.c +++ b/sound/pci/emu10k1/emu10k1x.c | |||
@@ -369,7 +369,8 @@ static void snd_emu10k1x_pcm_interrupt(struct emu10k1x *emu, struct emu10k1x_voi | |||
369 | if (epcm->substream == NULL) | 369 | if (epcm->substream == NULL) |
370 | return; | 370 | return; |
371 | #if 0 | 371 | #if 0 |
372 | snd_printk(KERN_INFO "IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n", | 372 | dev_info(emu->card->dev, |
373 | "IRQ: position = 0x%x, period = 0x%x, size = 0x%x\n", | ||
373 | epcm->substream->ops->pointer(epcm->substream), | 374 | epcm->substream->ops->pointer(epcm->substream), |
374 | snd_pcm_lib_period_bytes(epcm->substream), | 375 | snd_pcm_lib_period_bytes(epcm->substream), |
375 | snd_pcm_lib_buffer_bytes(epcm->substream)); | 376 | snd_pcm_lib_buffer_bytes(epcm->substream)); |
@@ -487,7 +488,11 @@ static int snd_emu10k1x_pcm_trigger(struct snd_pcm_substream *substream, | |||
487 | int channel = epcm->voice->number; | 488 | int channel = epcm->voice->number; |
488 | int result = 0; | 489 | int result = 0; |
489 | 490 | ||
490 | // snd_printk(KERN_INFO "trigger - emu10k1x = 0x%x, cmd = %i, pointer = %d\n", (int)emu, cmd, (int)substream->ops->pointer(substream)); | 491 | /* |
492 | dev_dbg(emu->card->dev, | ||
493 | "trigger - emu10k1x = 0x%x, cmd = %i, pointer = %d\n", | ||
494 | (int)emu, cmd, (int)substream->ops->pointer(substream)); | ||
495 | */ | ||
491 | 496 | ||
492 | switch (cmd) { | 497 | switch (cmd) { |
493 | case SNDRV_PCM_TRIGGER_START: | 498 | case SNDRV_PCM_TRIGGER_START: |
@@ -826,7 +831,7 @@ static irqreturn_t snd_emu10k1x_interrupt(int irq, void *dev_id) | |||
826 | // acknowledge the interrupt if necessary | 831 | // acknowledge the interrupt if necessary |
827 | outl(status, chip->port + IPR); | 832 | outl(status, chip->port + IPR); |
828 | 833 | ||
829 | // snd_printk(KERN_INFO "interrupt %08x\n", status); | 834 | /* dev_dbg(chip->card->dev, "interrupt %08x\n", status); */ |
830 | return IRQ_HANDLED; | 835 | return IRQ_HANDLED; |
831 | } | 836 | } |
832 | 837 | ||
@@ -919,7 +924,7 @@ static int snd_emu10k1x_create(struct snd_card *card, | |||
919 | return err; | 924 | return err; |
920 | if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || | 925 | if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || |
921 | pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { | 926 | pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { |
922 | snd_printk(KERN_ERR "error to set 28bit mask DMA\n"); | 927 | dev_err(card->dev, "error to set 28bit mask DMA\n"); |
923 | pci_disable_device(pci); | 928 | pci_disable_device(pci); |
924 | return -ENXIO; | 929 | return -ENXIO; |
925 | } | 930 | } |
@@ -940,14 +945,15 @@ static int snd_emu10k1x_create(struct snd_card *card, | |||
940 | chip->port = pci_resource_start(pci, 0); | 945 | chip->port = pci_resource_start(pci, 0); |
941 | if ((chip->res_port = request_region(chip->port, 8, | 946 | if ((chip->res_port = request_region(chip->port, 8, |
942 | "EMU10K1X")) == NULL) { | 947 | "EMU10K1X")) == NULL) { |
943 | snd_printk(KERN_ERR "emu10k1x: cannot allocate the port 0x%lx\n", chip->port); | 948 | dev_err(card->dev, "cannot allocate the port 0x%lx\n", |
949 | chip->port); | ||
944 | snd_emu10k1x_free(chip); | 950 | snd_emu10k1x_free(chip); |
945 | return -EBUSY; | 951 | return -EBUSY; |
946 | } | 952 | } |
947 | 953 | ||
948 | if (request_irq(pci->irq, snd_emu10k1x_interrupt, | 954 | if (request_irq(pci->irq, snd_emu10k1x_interrupt, |
949 | IRQF_SHARED, KBUILD_MODNAME, chip)) { | 955 | IRQF_SHARED, KBUILD_MODNAME, chip)) { |
950 | snd_printk(KERN_ERR "emu10k1x: cannot grab irq %d\n", pci->irq); | 956 | dev_err(card->dev, "cannot grab irq %d\n", pci->irq); |
951 | snd_emu10k1x_free(chip); | 957 | snd_emu10k1x_free(chip); |
952 | return -EBUSY; | 958 | return -EBUSY; |
953 | } | 959 | } |
@@ -964,7 +970,7 @@ static int snd_emu10k1x_create(struct snd_card *card, | |||
964 | chip->revision = pci->revision; | 970 | chip->revision = pci->revision; |
965 | pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial); | 971 | pci_read_config_dword(pci, PCI_SUBSYSTEM_VENDOR_ID, &chip->serial); |
966 | pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model); | 972 | pci_read_config_word(pci, PCI_SUBSYSTEM_ID, &chip->model); |
967 | snd_printk(KERN_INFO "Model %04x Rev %08x Serial %08x\n", chip->model, | 973 | dev_info(card->dev, "Model %04x Rev %08x Serial %08x\n", chip->model, |
968 | chip->revision, chip->serial); | 974 | chip->revision, chip->serial); |
969 | 975 | ||
970 | outl(0, chip->port + INTE); | 976 | outl(0, chip->port + INTE); |
@@ -1248,7 +1254,9 @@ static void mpu401_clear_rx(struct emu10k1x *emu, struct emu10k1x_midi *mpu) | |||
1248 | mpu401_read_data(emu, mpu); | 1254 | mpu401_read_data(emu, mpu); |
1249 | #ifdef CONFIG_SND_DEBUG | 1255 | #ifdef CONFIG_SND_DEBUG |
1250 | if (timeout <= 0) | 1256 | if (timeout <= 0) |
1251 | snd_printk(KERN_ERR "cmd: clear rx timeout (status = 0x%x)\n", mpu401_read_stat(emu, mpu)); | 1257 | dev_err(emu->card->dev, |
1258 | "cmd: clear rx timeout (status = 0x%x)\n", | ||
1259 | mpu401_read_stat(emu, mpu)); | ||
1252 | #endif | 1260 | #endif |
1253 | } | 1261 | } |
1254 | 1262 | ||
@@ -1322,7 +1330,8 @@ static int snd_emu10k1x_midi_cmd(struct emu10k1x * emu, | |||
1322 | } | 1330 | } |
1323 | spin_unlock_irqrestore(&midi->input_lock, flags); | 1331 | spin_unlock_irqrestore(&midi->input_lock, flags); |
1324 | if (!ok) { | 1332 | if (!ok) { |
1325 | snd_printk(KERN_ERR "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", | 1333 | dev_err(emu->card->dev, |
1334 | "midi_cmd: 0x%x failed at 0x%lx (status = 0x%x, data = 0x%x)!!!\n", | ||
1326 | cmd, emu->port, | 1335 | cmd, emu->port, |
1327 | mpu401_read_stat(emu, midi), | 1336 | mpu401_read_stat(emu, midi), |
1328 | mpu401_read_data(emu, midi)); | 1337 | mpu401_read_data(emu, midi)); |