diff options
author | Takashi Iwai <tiwai@suse.de> | 2014-02-26 05:47:55 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2014-02-26 10:45:30 -0500 |
commit | b59bb8efd1c1f2eaeed13eccf1fa4e564d2383ae (patch) | |
tree | 016210bd23d234e4d27ede7425e812fb984959be /sound/pci/pcxhr | |
parent | 03d3ac21780be4d78f8d7679e428bb98fa9411ea (diff) |
ALSA: pcxhr: 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/pci/pcxhr')
-rw-r--r-- | sound/pci/pcxhr/pcxhr.c | 54 | ||||
-rw-r--r-- | sound/pci/pcxhr/pcxhr_core.c | 108 | ||||
-rw-r--r-- | sound/pci/pcxhr/pcxhr_hwdep.c | 31 | ||||
-rw-r--r-- | sound/pci/pcxhr/pcxhr_mix22.c | 23 | ||||
-rw-r--r-- | sound/pci/pcxhr/pcxhr_mixer.c | 13 |
5 files changed, 131 insertions, 98 deletions
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c index 3880f6da9a87..8d09444ff88b 100644 --- a/sound/pci/pcxhr/pcxhr.c +++ b/sound/pci/pcxhr/pcxhr.c | |||
@@ -284,7 +284,7 @@ static int pcxhr_get_clock_reg(struct pcxhr_mgr *mgr, unsigned int rate, | |||
284 | rmh.cmd_len = 3; | 284 | rmh.cmd_len = 3; |
285 | err = pcxhr_send_msg(mgr, &rmh); | 285 | err = pcxhr_send_msg(mgr, &rmh); |
286 | if (err < 0) { | 286 | if (err < 0) { |
287 | snd_printk(KERN_ERR | 287 | dev_err(&mgr->pci->dev, |
288 | "error CMD_ACCESS_IO_WRITE " | 288 | "error CMD_ACCESS_IO_WRITE " |
289 | "for PLL register : %x!\n", err); | 289 | "for PLL register : %x!\n", err); |
290 | return err; | 290 | return err; |
@@ -357,7 +357,7 @@ static int pcxhr_sub_set_clock(struct pcxhr_mgr *mgr, | |||
357 | return err; | 357 | return err; |
358 | } | 358 | } |
359 | /* set the new frequency */ | 359 | /* set the new frequency */ |
360 | snd_printdd("clock register : set %x\n", val); | 360 | dev_dbg(&mgr->pci->dev, "clock register : set %x\n", val); |
361 | err = pcxhr_write_io_num_reg_cont(mgr, PCXHR_FREQ_REG_MASK, | 361 | err = pcxhr_write_io_num_reg_cont(mgr, PCXHR_FREQ_REG_MASK, |
362 | val, changed); | 362 | val, changed); |
363 | if (err) | 363 | if (err) |
@@ -380,7 +380,7 @@ static int pcxhr_sub_set_clock(struct pcxhr_mgr *mgr, | |||
380 | mgr->codec_speed = speed; /* save new codec speed */ | 380 | mgr->codec_speed = speed; /* save new codec speed */ |
381 | } | 381 | } |
382 | 382 | ||
383 | snd_printdd("pcxhr_sub_set_clock to %dHz (realfreq=%d)\n", | 383 | dev_dbg(&mgr->pci->dev, "pcxhr_sub_set_clock to %dHz (realfreq=%d)\n", |
384 | rate, realfreq); | 384 | rate, realfreq); |
385 | return 0; | 385 | return 0; |
386 | } | 386 | } |
@@ -480,7 +480,7 @@ static int pcxhr_sub_get_external_clock(struct pcxhr_mgr *mgr, | |||
480 | case REG_STATUS_SYNC_192000 : rate = 192000; break; | 480 | case REG_STATUS_SYNC_192000 : rate = 192000; break; |
481 | default: rate = 0; | 481 | default: rate = 0; |
482 | } | 482 | } |
483 | snd_printdd("External clock is at %d Hz\n", rate); | 483 | dev_dbg(&mgr->pci->dev, "External clock is at %d Hz\n", rate); |
484 | *sample_rate = rate; | 484 | *sample_rate = rate; |
485 | return 0; | 485 | return 0; |
486 | } | 486 | } |
@@ -537,8 +537,8 @@ static int pcxhr_set_stream_state(struct pcxhr_stream *stream) | |||
537 | 537 | ||
538 | err = pcxhr_send_msg(chip->mgr, &rmh); | 538 | err = pcxhr_send_msg(chip->mgr, &rmh); |
539 | if (err) | 539 | if (err) |
540 | snd_printk(KERN_ERR "ERROR pcxhr_set_stream_state err=%x;\n", | 540 | dev_err(chip->card->dev, |
541 | err); | 541 | "ERROR pcxhr_set_stream_state err=%x;\n", err); |
542 | stream->status = | 542 | stream->status = |
543 | start ? PCXHR_STREAM_STATUS_STARTED : PCXHR_STREAM_STATUS_STOPPED; | 543 | start ? PCXHR_STREAM_STATUS_STARTED : PCXHR_STREAM_STATUS_STOPPED; |
544 | return err; | 544 | return err; |
@@ -628,7 +628,8 @@ static int pcxhr_set_format(struct pcxhr_stream *stream) | |||
628 | rmh.cmd[rmh.cmd_len++] = (header & 0xff) << 16; | 628 | rmh.cmd[rmh.cmd_len++] = (header & 0xff) << 16; |
629 | err = pcxhr_send_msg(chip->mgr, &rmh); | 629 | err = pcxhr_send_msg(chip->mgr, &rmh); |
630 | if (err) | 630 | if (err) |
631 | snd_printk(KERN_ERR "ERROR pcxhr_set_format err=%x;\n", err); | 631 | dev_err(chip->card->dev, |
632 | "ERROR pcxhr_set_format err=%x;\n", err); | ||
632 | return err; | 633 | return err; |
633 | } | 634 | } |
634 | 635 | ||
@@ -665,7 +666,7 @@ static int pcxhr_update_r_buffer(struct pcxhr_stream *stream) | |||
665 | rmh.cmd_len = 4; | 666 | rmh.cmd_len = 4; |
666 | err = pcxhr_send_msg(chip->mgr, &rmh); | 667 | err = pcxhr_send_msg(chip->mgr, &rmh); |
667 | if (err) | 668 | if (err) |
668 | snd_printk(KERN_ERR | 669 | dev_err(chip->card->dev, |
669 | "ERROR CMD_UPDATE_R_BUFFERS err=%x;\n", err); | 670 | "ERROR CMD_UPDATE_R_BUFFERS err=%x;\n", err); |
670 | return err; | 671 | return err; |
671 | } | 672 | } |
@@ -735,11 +736,11 @@ static void pcxhr_trigger_tasklet(unsigned long arg) | |||
735 | } | 736 | } |
736 | if (capture_mask == 0 && playback_mask == 0) { | 737 | if (capture_mask == 0 && playback_mask == 0) { |
737 | mutex_unlock(&mgr->setup_mutex); | 738 | mutex_unlock(&mgr->setup_mutex); |
738 | snd_printk(KERN_ERR "pcxhr_trigger_tasklet : no pipes\n"); | 739 | dev_err(&mgr->pci->dev, "pcxhr_trigger_tasklet : no pipes\n"); |
739 | return; | 740 | return; |
740 | } | 741 | } |
741 | 742 | ||
742 | snd_printdd("pcxhr_trigger_tasklet : " | 743 | dev_dbg(&mgr->pci->dev, "pcxhr_trigger_tasklet : " |
743 | "playback_mask=%x capture_mask=%x\n", | 744 | "playback_mask=%x capture_mask=%x\n", |
744 | playback_mask, capture_mask); | 745 | playback_mask, capture_mask); |
745 | 746 | ||
@@ -747,7 +748,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg) | |||
747 | err = pcxhr_set_pipe_state(mgr, playback_mask, capture_mask, 0); | 748 | err = pcxhr_set_pipe_state(mgr, playback_mask, capture_mask, 0); |
748 | if (err) { | 749 | if (err) { |
749 | mutex_unlock(&mgr->setup_mutex); | 750 | mutex_unlock(&mgr->setup_mutex); |
750 | snd_printk(KERN_ERR "pcxhr_trigger_tasklet : " | 751 | dev_err(&mgr->pci->dev, "pcxhr_trigger_tasklet : " |
751 | "error stop pipes (P%x C%x)\n", | 752 | "error stop pipes (P%x C%x)\n", |
752 | playback_mask, capture_mask); | 753 | playback_mask, capture_mask); |
753 | return; | 754 | return; |
@@ -792,7 +793,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg) | |||
792 | err = pcxhr_set_pipe_state(mgr, playback_mask, capture_mask, 1); | 793 | err = pcxhr_set_pipe_state(mgr, playback_mask, capture_mask, 1); |
793 | if (err) { | 794 | if (err) { |
794 | mutex_unlock(&mgr->setup_mutex); | 795 | mutex_unlock(&mgr->setup_mutex); |
795 | snd_printk(KERN_ERR "pcxhr_trigger_tasklet : " | 796 | dev_err(&mgr->pci->dev, "pcxhr_trigger_tasklet : " |
796 | "error start pipes (P%x C%x)\n", | 797 | "error start pipes (P%x C%x)\n", |
797 | playback_mask, capture_mask); | 798 | playback_mask, capture_mask); |
798 | return; | 799 | return; |
@@ -825,7 +826,7 @@ static void pcxhr_trigger_tasklet(unsigned long arg) | |||
825 | 826 | ||
826 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 827 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
827 | do_gettimeofday(&my_tv2); | 828 | do_gettimeofday(&my_tv2); |
828 | snd_printdd("***TRIGGER TASKLET*** TIME = %ld (err = %x)\n", | 829 | dev_dbg(&mgr->pci->dev, "***TRIGGER TASKLET*** TIME = %ld (err = %x)\n", |
829 | (long)(my_tv2.tv_usec - my_tv1.tv_usec), err); | 830 | (long)(my_tv2.tv_usec - my_tv1.tv_usec), err); |
830 | #endif | 831 | #endif |
831 | } | 832 | } |
@@ -902,7 +903,7 @@ static int pcxhr_hardware_timer(struct pcxhr_mgr *mgr, int start) | |||
902 | } | 903 | } |
903 | err = pcxhr_send_msg(mgr, &rmh); | 904 | err = pcxhr_send_msg(mgr, &rmh); |
904 | if (err < 0) | 905 | if (err < 0) |
905 | snd_printk(KERN_ERR "error pcxhr_hardware_timer err(%x)\n", | 906 | dev_err(&mgr->pci->dev, "error pcxhr_hardware_timer err(%x)\n", |
906 | err); | 907 | err); |
907 | return err; | 908 | return err; |
908 | } | 909 | } |
@@ -916,7 +917,8 @@ static int pcxhr_prepare(struct snd_pcm_substream *subs) | |||
916 | struct pcxhr_mgr *mgr = chip->mgr; | 917 | struct pcxhr_mgr *mgr = chip->mgr; |
917 | int err = 0; | 918 | int err = 0; |
918 | 919 | ||
919 | snd_printdd("pcxhr_prepare : period_size(%lx) periods(%x) buffer_size(%lx)\n", | 920 | dev_dbg(chip->card->dev, |
921 | "pcxhr_prepare : period_size(%lx) periods(%x) buffer_size(%lx)\n", | ||
920 | subs->runtime->period_size, subs->runtime->periods, | 922 | subs->runtime->period_size, subs->runtime->periods, |
921 | subs->runtime->buffer_size); | 923 | subs->runtime->buffer_size); |
922 | 924 | ||
@@ -1025,11 +1027,11 @@ static int pcxhr_open(struct snd_pcm_substream *subs) | |||
1025 | runtime->hw = pcxhr_caps; | 1027 | runtime->hw = pcxhr_caps; |
1026 | 1028 | ||
1027 | if( subs->stream == SNDRV_PCM_STREAM_PLAYBACK ) { | 1029 | if( subs->stream == SNDRV_PCM_STREAM_PLAYBACK ) { |
1028 | snd_printdd("pcxhr_open playback chip%d subs%d\n", | 1030 | dev_dbg(chip->card->dev, "pcxhr_open playback chip%d subs%d\n", |
1029 | chip->chip_idx, subs->number); | 1031 | chip->chip_idx, subs->number); |
1030 | stream = &chip->playback_stream[subs->number]; | 1032 | stream = &chip->playback_stream[subs->number]; |
1031 | } else { | 1033 | } else { |
1032 | snd_printdd("pcxhr_open capture chip%d subs%d\n", | 1034 | dev_dbg(chip->card->dev, "pcxhr_open capture chip%d subs%d\n", |
1033 | chip->chip_idx, subs->number); | 1035 | chip->chip_idx, subs->number); |
1034 | if (mgr->mono_capture) | 1036 | if (mgr->mono_capture) |
1035 | runtime->hw.channels_max = 1; | 1037 | runtime->hw.channels_max = 1; |
@@ -1039,7 +1041,7 @@ static int pcxhr_open(struct snd_pcm_substream *subs) | |||
1039 | } | 1041 | } |
1040 | if (stream->status != PCXHR_STREAM_STATUS_FREE){ | 1042 | if (stream->status != PCXHR_STREAM_STATUS_FREE){ |
1041 | /* streams in use */ | 1043 | /* streams in use */ |
1042 | snd_printk(KERN_ERR "pcxhr_open chip%d subs%d in use\n", | 1044 | dev_err(chip->card->dev, "pcxhr_open chip%d subs%d in use\n", |
1043 | chip->chip_idx, subs->number); | 1045 | chip->chip_idx, subs->number); |
1044 | mutex_unlock(&mgr->setup_mutex); | 1046 | mutex_unlock(&mgr->setup_mutex); |
1045 | return -EBUSY; | 1047 | return -EBUSY; |
@@ -1105,7 +1107,7 @@ static int pcxhr_close(struct snd_pcm_substream *subs) | |||
1105 | 1107 | ||
1106 | mutex_lock(&mgr->setup_mutex); | 1108 | mutex_lock(&mgr->setup_mutex); |
1107 | 1109 | ||
1108 | snd_printdd("pcxhr_close chip%d subs%d\n", | 1110 | dev_dbg(chip->card->dev, "pcxhr_close chip%d subs%d\n", |
1109 | chip->chip_idx, subs->number); | 1111 | chip->chip_idx, subs->number); |
1110 | 1112 | ||
1111 | /* sample rate released */ | 1113 | /* sample rate released */ |
@@ -1168,7 +1170,7 @@ int pcxhr_create_pcm(struct snd_pcxhr *chip) | |||
1168 | if ((err = snd_pcm_new(chip->card, name, 0, | 1170 | if ((err = snd_pcm_new(chip->card, name, 0, |
1169 | chip->nb_streams_play, | 1171 | chip->nb_streams_play, |
1170 | chip->nb_streams_capt, &pcm)) < 0) { | 1172 | chip->nb_streams_capt, &pcm)) < 0) { |
1171 | snd_printk(KERN_ERR "cannot create pcm %s\n", name); | 1173 | dev_err(chip->card->dev, "cannot create pcm %s\n", name); |
1172 | return err; | 1174 | return err; |
1173 | } | 1175 | } |
1174 | pcm->private_data = chip; | 1176 | pcm->private_data = chip; |
@@ -1214,7 +1216,7 @@ static int pcxhr_create(struct pcxhr_mgr *mgr, | |||
1214 | 1216 | ||
1215 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); | 1217 | chip = kzalloc(sizeof(*chip), GFP_KERNEL); |
1216 | if (! chip) { | 1218 | if (! chip) { |
1217 | snd_printk(KERN_ERR "cannot allocate chip\n"); | 1219 | dev_err(card->dev, "cannot allocate chip\n"); |
1218 | return -ENOMEM; | 1220 | return -ENOMEM; |
1219 | } | 1221 | } |
1220 | 1222 | ||
@@ -1487,7 +1489,7 @@ static int pcxhr_free(struct pcxhr_mgr *mgr) | |||
1487 | /* reset board if some firmware was loaded */ | 1489 | /* reset board if some firmware was loaded */ |
1488 | if(mgr->dsp_loaded) { | 1490 | if(mgr->dsp_loaded) { |
1489 | pcxhr_reset_board(mgr); | 1491 | pcxhr_reset_board(mgr); |
1490 | snd_printdd("reset pcxhr !\n"); | 1492 | dev_dbg(&mgr->pci->dev, "reset pcxhr !\n"); |
1491 | } | 1493 | } |
1492 | 1494 | ||
1493 | /* release irq */ | 1495 | /* release irq */ |
@@ -1536,8 +1538,8 @@ static int pcxhr_probe(struct pci_dev *pci, | |||
1536 | 1538 | ||
1537 | /* check if we can restrict PCI DMA transfers to 32 bits */ | 1539 | /* check if we can restrict PCI DMA transfers to 32 bits */ |
1538 | if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { | 1540 | if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { |
1539 | snd_printk(KERN_ERR "architecture does not support " | 1541 | dev_err(&pci->dev, |
1540 | "32bit PCI busmaster DMA\n"); | 1542 | "architecture does not support 32bit PCI busmaster DMA\n"); |
1541 | pci_disable_device(pci); | 1543 | pci_disable_device(pci); |
1542 | return -ENXIO; | 1544 | return -ENXIO; |
1543 | } | 1545 | } |
@@ -1588,7 +1590,7 @@ static int pcxhr_probe(struct pci_dev *pci, | |||
1588 | 1590 | ||
1589 | if (request_irq(pci->irq, pcxhr_interrupt, IRQF_SHARED, | 1591 | if (request_irq(pci->irq, pcxhr_interrupt, IRQF_SHARED, |
1590 | KBUILD_MODNAME, mgr)) { | 1592 | KBUILD_MODNAME, mgr)) { |
1591 | snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq); | 1593 | dev_err(&pci->dev, "unable to grab IRQ %d\n", pci->irq); |
1592 | pcxhr_free(mgr); | 1594 | pcxhr_free(mgr); |
1593 | return -EBUSY; | 1595 | return -EBUSY; |
1594 | } | 1596 | } |
@@ -1641,7 +1643,7 @@ static int pcxhr_probe(struct pci_dev *pci, | |||
1641 | 0, &card); | 1643 | 0, &card); |
1642 | 1644 | ||
1643 | if (err < 0) { | 1645 | if (err < 0) { |
1644 | snd_printk(KERN_ERR "cannot allocate the card %d\n", i); | 1646 | dev_err(card->dev, "cannot allocate the card %d\n", i); |
1645 | pcxhr_free(mgr); | 1647 | pcxhr_free(mgr); |
1646 | return err; | 1648 | return err; |
1647 | } | 1649 | } |
diff --git a/sound/pci/pcxhr/pcxhr_core.c b/sound/pci/pcxhr/pcxhr_core.c index 37b431b9b69d..df9371918601 100644 --- a/sound/pci/pcxhr/pcxhr_core.c +++ b/sound/pci/pcxhr/pcxhr_core.c | |||
@@ -23,6 +23,7 @@ | |||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/firmware.h> | 24 | #include <linux/firmware.h> |
25 | #include <linux/interrupt.h> | 25 | #include <linux/interrupt.h> |
26 | #include <linux/pci.h> | ||
26 | #include <asm/io.h> | 27 | #include <asm/io.h> |
27 | #include <sound/core.h> | 28 | #include <sound/core.h> |
28 | #include "pcxhr.h" | 29 | #include "pcxhr.h" |
@@ -132,14 +133,14 @@ static int pcxhr_check_reg_bit(struct pcxhr_mgr *mgr, unsigned int reg, | |||
132 | *read = PCXHR_INPB(mgr, reg); | 133 | *read = PCXHR_INPB(mgr, reg); |
133 | if ((*read & mask) == bit) { | 134 | if ((*read & mask) == bit) { |
134 | if (i > 100) | 135 | if (i > 100) |
135 | snd_printdd("ATTENTION! check_reg(%x) " | 136 | dev_dbg(&mgr->pci->dev, |
136 | "loopcount=%d\n", | 137 | "ATTENTION! check_reg(%x) loopcount=%d\n", |
137 | reg, i); | 138 | reg, i); |
138 | return 0; | 139 | return 0; |
139 | } | 140 | } |
140 | i++; | 141 | i++; |
141 | } while (time_after_eq(end_time, jiffies)); | 142 | } while (time_after_eq(end_time, jiffies)); |
142 | snd_printk(KERN_ERR | 143 | dev_err(&mgr->pci->dev, |
143 | "pcxhr_check_reg_bit: timeout, reg=%x, mask=0x%x, val=%x\n", | 144 | "pcxhr_check_reg_bit: timeout, reg=%x, mask=0x%x, val=%x\n", |
144 | reg, mask, *read); | 145 | reg, mask, *read); |
145 | return -EIO; | 146 | return -EIO; |
@@ -216,7 +217,7 @@ static int pcxhr_send_it_dsp(struct pcxhr_mgr *mgr, | |||
216 | err = pcxhr_check_reg_bit(mgr, PCXHR_DSP_CVR, PCXHR_CVR_HI08_HC, 0, | 217 | err = pcxhr_check_reg_bit(mgr, PCXHR_DSP_CVR, PCXHR_CVR_HI08_HC, 0, |
217 | PCXHR_TIMEOUT_DSP, ®); | 218 | PCXHR_TIMEOUT_DSP, ®); |
218 | if (err) { | 219 | if (err) { |
219 | snd_printk(KERN_ERR "pcxhr_send_it_dsp : TIMEOUT CVR\n"); | 220 | dev_err(&mgr->pci->dev, "pcxhr_send_it_dsp : TIMEOUT CVR\n"); |
220 | return err; | 221 | return err; |
221 | } | 222 | } |
222 | if (itdsp & PCXHR_MASK_IT_MANAGE_HF5) { | 223 | if (itdsp & PCXHR_MASK_IT_MANAGE_HF5) { |
@@ -227,7 +228,7 @@ static int pcxhr_send_it_dsp(struct pcxhr_mgr *mgr, | |||
227 | PCXHR_TIMEOUT_DSP, | 228 | PCXHR_TIMEOUT_DSP, |
228 | ®); | 229 | ®); |
229 | if (err) { | 230 | if (err) { |
230 | snd_printk(KERN_ERR | 231 | dev_err(&mgr->pci->dev, |
231 | "pcxhr_send_it_dsp : TIMEOUT HF5\n"); | 232 | "pcxhr_send_it_dsp : TIMEOUT HF5\n"); |
232 | return err; | 233 | return err; |
233 | } | 234 | } |
@@ -294,7 +295,7 @@ int pcxhr_load_xilinx_binary(struct pcxhr_mgr *mgr, | |||
294 | */ | 295 | */ |
295 | if(second) { | 296 | if(second) { |
296 | if ((chipsc & PCXHR_CHIPSC_GPI_USERI) == 0) { | 297 | if ((chipsc & PCXHR_CHIPSC_GPI_USERI) == 0) { |
297 | snd_printk(KERN_ERR "error loading first xilinx\n"); | 298 | dev_err(&mgr->pci->dev, "error loading first xilinx\n"); |
298 | return -EINVAL; | 299 | return -EINVAL; |
299 | } | 300 | } |
300 | /* activate second xilinx */ | 301 | /* activate second xilinx */ |
@@ -360,7 +361,7 @@ static int pcxhr_download_dsp(struct pcxhr_mgr *mgr, const struct firmware *dsp) | |||
360 | PCXHR_ISR_HI08_TRDY, | 361 | PCXHR_ISR_HI08_TRDY, |
361 | PCXHR_TIMEOUT_DSP, &dummy); | 362 | PCXHR_TIMEOUT_DSP, &dummy); |
362 | if (err) { | 363 | if (err) { |
363 | snd_printk(KERN_ERR | 364 | dev_err(&mgr->pci->dev, |
364 | "dsp loading error at position %d\n", i); | 365 | "dsp loading error at position %d\n", i); |
365 | return err; | 366 | return err; |
366 | } | 367 | } |
@@ -396,7 +397,7 @@ int pcxhr_load_eeprom_binary(struct pcxhr_mgr *mgr, | |||
396 | msleep(PCXHR_WAIT_DEFAULT); | 397 | msleep(PCXHR_WAIT_DEFAULT); |
397 | PCXHR_OUTPB(mgr, PCXHR_DSP_ICR, reg); | 398 | PCXHR_OUTPB(mgr, PCXHR_DSP_ICR, reg); |
398 | msleep(PCXHR_WAIT_DEFAULT); | 399 | msleep(PCXHR_WAIT_DEFAULT); |
399 | snd_printdd("no need to load eeprom boot\n"); | 400 | dev_dbg(&mgr->pci->dev, "no need to load eeprom boot\n"); |
400 | return 0; | 401 | return 0; |
401 | } | 402 | } |
402 | PCXHR_OUTPB(mgr, PCXHR_DSP_ICR, reg); | 403 | PCXHR_OUTPB(mgr, PCXHR_DSP_ICR, reg); |
@@ -561,9 +562,9 @@ static int pcxhr_read_rmh_status(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) | |||
561 | PCXHR_ISR_HI08_RXDF, | 562 | PCXHR_ISR_HI08_RXDF, |
562 | PCXHR_TIMEOUT_DSP, ®); | 563 | PCXHR_TIMEOUT_DSP, ®); |
563 | if (err) { | 564 | if (err) { |
564 | snd_printk(KERN_ERR "ERROR RMH stat: " | 565 | dev_err(&mgr->pci->dev, |
565 | "ISR:RXDF=1 (ISR = %x; i=%d )\n", | 566 | "ERROR RMH stat: ISR:RXDF=1 (ISR = %x; i=%d )\n", |
566 | reg, i); | 567 | reg, i); |
567 | return err; | 568 | return err; |
568 | } | 569 | } |
569 | /* read data */ | 570 | /* read data */ |
@@ -591,13 +592,13 @@ static int pcxhr_read_rmh_status(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) | |||
591 | } | 592 | } |
592 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 593 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
593 | if (rmh->cmd_idx < CMD_LAST_INDEX) | 594 | if (rmh->cmd_idx < CMD_LAST_INDEX) |
594 | snd_printdd(" stat[%d]=%x\n", i, data); | 595 | dev_dbg(&mgr->pci->dev, " stat[%d]=%x\n", i, data); |
595 | #endif | 596 | #endif |
596 | if (i < max_stat_len) | 597 | if (i < max_stat_len) |
597 | rmh->stat[i] = data; | 598 | rmh->stat[i] = data; |
598 | } | 599 | } |
599 | if (rmh->stat_len > max_stat_len) { | 600 | if (rmh->stat_len > max_stat_len) { |
600 | snd_printdd("PCXHR : rmh->stat_len=%x too big\n", | 601 | dev_dbg(&mgr->pci->dev, "PCXHR : rmh->stat_len=%x too big\n", |
601 | rmh->stat_len); | 602 | rmh->stat_len); |
602 | rmh->stat_len = max_stat_len; | 603 | rmh->stat_len = max_stat_len; |
603 | } | 604 | } |
@@ -615,7 +616,8 @@ static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) | |||
615 | return -EINVAL; | 616 | return -EINVAL; |
616 | err = pcxhr_send_it_dsp(mgr, PCXHR_IT_MESSAGE, 1); | 617 | err = pcxhr_send_it_dsp(mgr, PCXHR_IT_MESSAGE, 1); |
617 | if (err) { | 618 | if (err) { |
618 | snd_printk(KERN_ERR "pcxhr_send_message : ED_DSP_CRASHED\n"); | 619 | dev_err(&mgr->pci->dev, |
620 | "pcxhr_send_message : ED_DSP_CRASHED\n"); | ||
619 | return err; | 621 | return err; |
620 | } | 622 | } |
621 | /* wait for chk bit */ | 623 | /* wait for chk bit */ |
@@ -641,7 +643,7 @@ static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) | |||
641 | data &= 0xff7fff; /* MASK_1_WORD_COMMAND */ | 643 | data &= 0xff7fff; /* MASK_1_WORD_COMMAND */ |
642 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 644 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
643 | if (rmh->cmd_idx < CMD_LAST_INDEX) | 645 | if (rmh->cmd_idx < CMD_LAST_INDEX) |
644 | snd_printdd("MSG cmd[0]=%x (%s)\n", | 646 | dev_dbg(&mgr->pci->dev, "MSG cmd[0]=%x (%s)\n", |
645 | data, cmd_names[rmh->cmd_idx]); | 647 | data, cmd_names[rmh->cmd_idx]); |
646 | #endif | 648 | #endif |
647 | 649 | ||
@@ -671,7 +673,8 @@ static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) | |||
671 | data = rmh->cmd[i]; | 673 | data = rmh->cmd[i]; |
672 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 674 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
673 | if (rmh->cmd_idx < CMD_LAST_INDEX) | 675 | if (rmh->cmd_idx < CMD_LAST_INDEX) |
674 | snd_printdd(" cmd[%d]=%x\n", i, data); | 676 | dev_dbg(&mgr->pci->dev, |
677 | " cmd[%d]=%x\n", i, data); | ||
675 | #endif | 678 | #endif |
676 | err = pcxhr_check_reg_bit(mgr, PCXHR_DSP_ISR, | 679 | err = pcxhr_check_reg_bit(mgr, PCXHR_DSP_ISR, |
677 | PCXHR_ISR_HI08_TRDY, | 680 | PCXHR_ISR_HI08_TRDY, |
@@ -697,14 +700,15 @@ static int pcxhr_send_msg_nolock(struct pcxhr_mgr *mgr, struct pcxhr_rmh *rmh) | |||
697 | PCXHR_ISR_HI08_RXDF, | 700 | PCXHR_ISR_HI08_RXDF, |
698 | PCXHR_TIMEOUT_DSP, ®); | 701 | PCXHR_TIMEOUT_DSP, ®); |
699 | if (err) { | 702 | if (err) { |
700 | snd_printk(KERN_ERR "ERROR RMH: ISR:RXDF=1 (ISR = %x)\n", reg); | 703 | dev_err(&mgr->pci->dev, |
704 | "ERROR RMH: ISR:RXDF=1 (ISR = %x)\n", reg); | ||
701 | return err; | 705 | return err; |
702 | } | 706 | } |
703 | /* read error code */ | 707 | /* read error code */ |
704 | data = PCXHR_INPB(mgr, PCXHR_DSP_TXH) << 16; | 708 | data = PCXHR_INPB(mgr, PCXHR_DSP_TXH) << 16; |
705 | data |= PCXHR_INPB(mgr, PCXHR_DSP_TXM) << 8; | 709 | data |= PCXHR_INPB(mgr, PCXHR_DSP_TXM) << 8; |
706 | data |= PCXHR_INPB(mgr, PCXHR_DSP_TXL); | 710 | data |= PCXHR_INPB(mgr, PCXHR_DSP_TXL); |
707 | snd_printk(KERN_ERR "ERROR RMH(%d): 0x%x\n", | 711 | dev_err(&mgr->pci->dev, "ERROR RMH(%d): 0x%x\n", |
708 | rmh->cmd_idx, data); | 712 | rmh->cmd_idx, data); |
709 | err = -EINVAL; | 713 | err = -EINVAL; |
710 | } else { | 714 | } else { |
@@ -780,7 +784,7 @@ static inline int pcxhr_pipes_running(struct pcxhr_mgr *mgr) | |||
780 | * (PCXHR_PIPE_STATE_CAPTURE_OFFSET) | 784 | * (PCXHR_PIPE_STATE_CAPTURE_OFFSET) |
781 | */ | 785 | */ |
782 | start_mask &= 0xffffff; | 786 | start_mask &= 0xffffff; |
783 | snd_printdd("CMD_PIPE_STATE MBOX2=0x%06x\n", start_mask); | 787 | dev_dbg(&mgr->pci->dev, "CMD_PIPE_STATE MBOX2=0x%06x\n", start_mask); |
784 | return start_mask; | 788 | return start_mask; |
785 | } | 789 | } |
786 | 790 | ||
@@ -809,7 +813,7 @@ static int pcxhr_prepair_pipe_start(struct pcxhr_mgr *mgr, | |||
809 | } | 813 | } |
810 | err = pcxhr_send_msg(mgr, &rmh); | 814 | err = pcxhr_send_msg(mgr, &rmh); |
811 | if (err) { | 815 | if (err) { |
812 | snd_printk(KERN_ERR | 816 | dev_err(&mgr->pci->dev, |
813 | "error pipe start " | 817 | "error pipe start " |
814 | "(CMD_CAN_START_PIPE) err=%x!\n", | 818 | "(CMD_CAN_START_PIPE) err=%x!\n", |
815 | err); | 819 | err); |
@@ -847,7 +851,7 @@ static int pcxhr_stop_pipes(struct pcxhr_mgr *mgr, int audio_mask) | |||
847 | } | 851 | } |
848 | err = pcxhr_send_msg(mgr, &rmh); | 852 | err = pcxhr_send_msg(mgr, &rmh); |
849 | if (err) { | 853 | if (err) { |
850 | snd_printk(KERN_ERR | 854 | dev_err(&mgr->pci->dev, |
851 | "error pipe stop " | 855 | "error pipe stop " |
852 | "(CMD_STOP_PIPE) err=%x!\n", err); | 856 | "(CMD_STOP_PIPE) err=%x!\n", err); |
853 | return err; | 857 | return err; |
@@ -876,7 +880,7 @@ static int pcxhr_toggle_pipes(struct pcxhr_mgr *mgr, int audio_mask) | |||
876 | 1 << (audio - PCXHR_PIPE_STATE_CAPTURE_OFFSET)); | 880 | 1 << (audio - PCXHR_PIPE_STATE_CAPTURE_OFFSET)); |
877 | err = pcxhr_send_msg(mgr, &rmh); | 881 | err = pcxhr_send_msg(mgr, &rmh); |
878 | if (err) { | 882 | if (err) { |
879 | snd_printk(KERN_ERR | 883 | dev_err(&mgr->pci->dev, |
880 | "error pipe start " | 884 | "error pipe start " |
881 | "(CMD_CONF_PIPE) err=%x!\n", err); | 885 | "(CMD_CONF_PIPE) err=%x!\n", err); |
882 | return err; | 886 | return err; |
@@ -889,7 +893,7 @@ static int pcxhr_toggle_pipes(struct pcxhr_mgr *mgr, int audio_mask) | |||
889 | pcxhr_init_rmh(&rmh, CMD_SEND_IRQA); | 893 | pcxhr_init_rmh(&rmh, CMD_SEND_IRQA); |
890 | err = pcxhr_send_msg(mgr, &rmh); | 894 | err = pcxhr_send_msg(mgr, &rmh); |
891 | if (err) { | 895 | if (err) { |
892 | snd_printk(KERN_ERR | 896 | dev_err(&mgr->pci->dev, |
893 | "error pipe start (CMD_SEND_IRQA) err=%x!\n", | 897 | "error pipe start (CMD_SEND_IRQA) err=%x!\n", |
894 | err); | 898 | err); |
895 | return err; | 899 | return err; |
@@ -913,7 +917,8 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask, | |||
913 | (capture_mask << PCXHR_PIPE_STATE_CAPTURE_OFFSET)); | 917 | (capture_mask << PCXHR_PIPE_STATE_CAPTURE_OFFSET)); |
914 | /* current pipe state (playback + record) */ | 918 | /* current pipe state (playback + record) */ |
915 | state = pcxhr_pipes_running(mgr); | 919 | state = pcxhr_pipes_running(mgr); |
916 | snd_printdd("pcxhr_set_pipe_state %s (mask %x current %x)\n", | 920 | dev_dbg(&mgr->pci->dev, |
921 | "pcxhr_set_pipe_state %s (mask %x current %x)\n", | ||
917 | start ? "START" : "STOP", audio_mask, state); | 922 | start ? "START" : "STOP", audio_mask, state); |
918 | if (start) { | 923 | if (start) { |
919 | /* start only pipes that are not yet started */ | 924 | /* start only pipes that are not yet started */ |
@@ -944,7 +949,7 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask, | |||
944 | if ((state & audio_mask) == (start ? audio_mask : 0)) | 949 | if ((state & audio_mask) == (start ? audio_mask : 0)) |
945 | break; | 950 | break; |
946 | if (++i >= MAX_WAIT_FOR_DSP * 100) { | 951 | if (++i >= MAX_WAIT_FOR_DSP * 100) { |
947 | snd_printk(KERN_ERR "error pipe start/stop\n"); | 952 | dev_err(&mgr->pci->dev, "error pipe start/stop\n"); |
948 | return -EBUSY; | 953 | return -EBUSY; |
949 | } | 954 | } |
950 | udelay(10); /* wait 10 microseconds */ | 955 | udelay(10); /* wait 10 microseconds */ |
@@ -956,7 +961,7 @@ int pcxhr_set_pipe_state(struct pcxhr_mgr *mgr, int playback_mask, | |||
956 | } | 961 | } |
957 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 962 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
958 | do_gettimeofday(&my_tv2); | 963 | do_gettimeofday(&my_tv2); |
959 | snd_printdd("***SET PIPE STATE*** TIME = %ld (err = %x)\n", | 964 | dev_dbg(&mgr->pci->dev, "***SET PIPE STATE*** TIME = %ld (err = %x)\n", |
960 | (long)(my_tv2.tv_usec - my_tv1.tv_usec), err); | 965 | (long)(my_tv2.tv_usec - my_tv1.tv_usec), err); |
961 | #endif | 966 | #endif |
962 | return 0; | 967 | return 0; |
@@ -971,7 +976,8 @@ int pcxhr_write_io_num_reg_cont(struct pcxhr_mgr *mgr, unsigned int mask, | |||
971 | 976 | ||
972 | spin_lock_irqsave(&mgr->msg_lock, flags); | 977 | spin_lock_irqsave(&mgr->msg_lock, flags); |
973 | if ((mgr->io_num_reg_cont & mask) == value) { | 978 | if ((mgr->io_num_reg_cont & mask) == value) { |
974 | snd_printdd("IO_NUM_REG_CONT mask %x already is set to %x\n", | 979 | dev_dbg(&mgr->pci->dev, |
980 | "IO_NUM_REG_CONT mask %x already is set to %x\n", | ||
975 | mask, value); | 981 | mask, value); |
976 | if (changed) | 982 | if (changed) |
977 | *changed = 0; | 983 | *changed = 0; |
@@ -1024,7 +1030,7 @@ static int pcxhr_handle_async_err(struct pcxhr_mgr *mgr, u32 err, | |||
1024 | err = ((err >> 12) & 0xfff); | 1030 | err = ((err >> 12) & 0xfff); |
1025 | if (!err) | 1031 | if (!err) |
1026 | return 0; | 1032 | return 0; |
1027 | snd_printdd("CMD_ASYNC : Error %s %s Pipe %d err=%x\n", | 1033 | dev_dbg(&mgr->pci->dev, "CMD_ASYNC : Error %s %s Pipe %d err=%x\n", |
1028 | err_src_name[err_src], | 1034 | err_src_name[err_src], |
1029 | is_capture ? "Record" : "Play", pipe, err); | 1035 | is_capture ? "Record" : "Play", pipe, err); |
1030 | if (err == 0xe01) | 1036 | if (err == 0xe01) |
@@ -1045,20 +1051,24 @@ void pcxhr_msg_tasklet(unsigned long arg) | |||
1045 | int i, j; | 1051 | int i, j; |
1046 | 1052 | ||
1047 | if (mgr->src_it_dsp & PCXHR_IRQ_FREQ_CHANGE) | 1053 | if (mgr->src_it_dsp & PCXHR_IRQ_FREQ_CHANGE) |
1048 | snd_printdd("TASKLET : PCXHR_IRQ_FREQ_CHANGE event occurred\n"); | 1054 | dev_dbg(&mgr->pci->dev, |
1055 | "TASKLET : PCXHR_IRQ_FREQ_CHANGE event occurred\n"); | ||
1049 | if (mgr->src_it_dsp & PCXHR_IRQ_TIME_CODE) | 1056 | if (mgr->src_it_dsp & PCXHR_IRQ_TIME_CODE) |
1050 | snd_printdd("TASKLET : PCXHR_IRQ_TIME_CODE event occurred\n"); | 1057 | dev_dbg(&mgr->pci->dev, |
1058 | "TASKLET : PCXHR_IRQ_TIME_CODE event occurred\n"); | ||
1051 | if (mgr->src_it_dsp & PCXHR_IRQ_NOTIFY) | 1059 | if (mgr->src_it_dsp & PCXHR_IRQ_NOTIFY) |
1052 | snd_printdd("TASKLET : PCXHR_IRQ_NOTIFY event occurred\n"); | 1060 | dev_dbg(&mgr->pci->dev, |
1061 | "TASKLET : PCXHR_IRQ_NOTIFY event occurred\n"); | ||
1053 | if (mgr->src_it_dsp & (PCXHR_IRQ_FREQ_CHANGE | PCXHR_IRQ_TIME_CODE)) { | 1062 | if (mgr->src_it_dsp & (PCXHR_IRQ_FREQ_CHANGE | PCXHR_IRQ_TIME_CODE)) { |
1054 | /* clear events FREQ_CHANGE and TIME_CODE */ | 1063 | /* clear events FREQ_CHANGE and TIME_CODE */ |
1055 | pcxhr_init_rmh(prmh, CMD_TEST_IT); | 1064 | pcxhr_init_rmh(prmh, CMD_TEST_IT); |
1056 | err = pcxhr_send_msg(mgr, prmh); | 1065 | err = pcxhr_send_msg(mgr, prmh); |
1057 | snd_printdd("CMD_TEST_IT : err=%x, stat=%x\n", | 1066 | dev_dbg(&mgr->pci->dev, "CMD_TEST_IT : err=%x, stat=%x\n", |
1058 | err, prmh->stat[0]); | 1067 | err, prmh->stat[0]); |
1059 | } | 1068 | } |
1060 | if (mgr->src_it_dsp & PCXHR_IRQ_ASYNC) { | 1069 | if (mgr->src_it_dsp & PCXHR_IRQ_ASYNC) { |
1061 | snd_printdd("TASKLET : PCXHR_IRQ_ASYNC event occurred\n"); | 1070 | dev_dbg(&mgr->pci->dev, |
1071 | "TASKLET : PCXHR_IRQ_ASYNC event occurred\n"); | ||
1062 | 1072 | ||
1063 | pcxhr_init_rmh(prmh, CMD_ASYNC); | 1073 | pcxhr_init_rmh(prmh, CMD_ASYNC); |
1064 | prmh->cmd[0] |= 1; /* add SEL_ASYNC_EVENTS */ | 1074 | prmh->cmd[0] |= 1; /* add SEL_ASYNC_EVENTS */ |
@@ -1066,7 +1076,7 @@ void pcxhr_msg_tasklet(unsigned long arg) | |||
1066 | prmh->stat_len = PCXHR_SIZE_MAX_LONG_STATUS; | 1076 | prmh->stat_len = PCXHR_SIZE_MAX_LONG_STATUS; |
1067 | err = pcxhr_send_msg(mgr, prmh); | 1077 | err = pcxhr_send_msg(mgr, prmh); |
1068 | if (err) | 1078 | if (err) |
1069 | snd_printk(KERN_ERR "ERROR pcxhr_msg_tasklet=%x;\n", | 1079 | dev_err(&mgr->pci->dev, "ERROR pcxhr_msg_tasklet=%x;\n", |
1070 | err); | 1080 | err); |
1071 | i = 1; | 1081 | i = 1; |
1072 | while (i < prmh->stat_len) { | 1082 | while (i < prmh->stat_len) { |
@@ -1079,7 +1089,8 @@ void pcxhr_msg_tasklet(unsigned long arg) | |||
1079 | u32 err2; | 1089 | u32 err2; |
1080 | 1090 | ||
1081 | if (prmh->stat[i] & 0x800000) { /* if BIT_END */ | 1091 | if (prmh->stat[i] & 0x800000) { /* if BIT_END */ |
1082 | snd_printdd("TASKLET : End%sPipe %d\n", | 1092 | dev_dbg(&mgr->pci->dev, |
1093 | "TASKLET : End%sPipe %d\n", | ||
1083 | is_capture ? "Record" : "Play", | 1094 | is_capture ? "Record" : "Play", |
1084 | pipe); | 1095 | pipe); |
1085 | } | 1096 | } |
@@ -1136,7 +1147,8 @@ static u_int64_t pcxhr_stream_read_position(struct pcxhr_mgr *mgr, | |||
1136 | hw_sample_count = ((u_int64_t)rmh.stat[0]) << 24; | 1147 | hw_sample_count = ((u_int64_t)rmh.stat[0]) << 24; |
1137 | hw_sample_count += (u_int64_t)rmh.stat[1]; | 1148 | hw_sample_count += (u_int64_t)rmh.stat[1]; |
1138 | 1149 | ||
1139 | snd_printdd("stream %c%d : abs samples real(%llu) timer(%llu)\n", | 1150 | dev_dbg(&mgr->pci->dev, |
1151 | "stream %c%d : abs samples real(%llu) timer(%llu)\n", | ||
1140 | stream->pipe->is_capture ? 'C' : 'P', | 1152 | stream->pipe->is_capture ? 'C' : 'P', |
1141 | stream->substream->number, | 1153 | stream->substream->number, |
1142 | hw_sample_count, | 1154 | hw_sample_count, |
@@ -1202,7 +1214,7 @@ static void pcxhr_update_timer_pos(struct pcxhr_mgr *mgr, | |||
1202 | (u_int32_t)(new_sample_count - | 1214 | (u_int32_t)(new_sample_count - |
1203 | stream->timer_abs_periods); | 1215 | stream->timer_abs_periods); |
1204 | } else { | 1216 | } else { |
1205 | snd_printk(KERN_ERR | 1217 | dev_err(&mgr->pci->dev, |
1206 | "ERROR new_sample_count too small ??? %ld\n", | 1218 | "ERROR new_sample_count too small ??? %ld\n", |
1207 | (long unsigned int)new_sample_count); | 1219 | (long unsigned int)new_sample_count); |
1208 | } | 1220 | } |
@@ -1247,33 +1259,39 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id) | |||
1247 | (mgr->dsp_time_last != PCXHR_DSP_TIME_INVALID)) { | 1259 | (mgr->dsp_time_last != PCXHR_DSP_TIME_INVALID)) { |
1248 | /* handle dsp counter wraparound without resync */ | 1260 | /* handle dsp counter wraparound without resync */ |
1249 | int tmp_diff = dsp_time_diff + PCXHR_DSP_TIME_MASK + 1; | 1261 | int tmp_diff = dsp_time_diff + PCXHR_DSP_TIME_MASK + 1; |
1250 | snd_printdd("WARNING DSP timestamp old(%d) new(%d)", | 1262 | dev_dbg(&mgr->pci->dev, |
1263 | "WARNING DSP timestamp old(%d) new(%d)", | ||
1251 | mgr->dsp_time_last, dsp_time_new); | 1264 | mgr->dsp_time_last, dsp_time_new); |
1252 | if (tmp_diff > 0 && tmp_diff <= (2*mgr->granularity)) { | 1265 | if (tmp_diff > 0 && tmp_diff <= (2*mgr->granularity)) { |
1253 | snd_printdd("-> timestamp wraparound OK: " | 1266 | dev_dbg(&mgr->pci->dev, |
1267 | "-> timestamp wraparound OK: " | ||
1254 | "diff=%d\n", tmp_diff); | 1268 | "diff=%d\n", tmp_diff); |
1255 | dsp_time_diff = tmp_diff; | 1269 | dsp_time_diff = tmp_diff; |
1256 | } else { | 1270 | } else { |
1257 | snd_printdd("-> resynchronize all streams\n"); | 1271 | dev_dbg(&mgr->pci->dev, |
1272 | "-> resynchronize all streams\n"); | ||
1258 | mgr->dsp_time_err++; | 1273 | mgr->dsp_time_err++; |
1259 | } | 1274 | } |
1260 | } | 1275 | } |
1261 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 1276 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
1262 | if (dsp_time_diff == 0) | 1277 | if (dsp_time_diff == 0) |
1263 | snd_printdd("ERROR DSP TIME NO DIFF time(%d)\n", | 1278 | dev_dbg(&mgr->pci->dev, |
1279 | "ERROR DSP TIME NO DIFF time(%d)\n", | ||
1264 | dsp_time_new); | 1280 | dsp_time_new); |
1265 | else if (dsp_time_diff >= (2*mgr->granularity)) | 1281 | else if (dsp_time_diff >= (2*mgr->granularity)) |
1266 | snd_printdd("ERROR DSP TIME TOO BIG old(%d) add(%d)\n", | 1282 | dev_dbg(&mgr->pci->dev, |
1283 | "ERROR DSP TIME TOO BIG old(%d) add(%d)\n", | ||
1267 | mgr->dsp_time_last, | 1284 | mgr->dsp_time_last, |
1268 | dsp_time_new - mgr->dsp_time_last); | 1285 | dsp_time_new - mgr->dsp_time_last); |
1269 | else if (dsp_time_diff % mgr->granularity) | 1286 | else if (dsp_time_diff % mgr->granularity) |
1270 | snd_printdd("ERROR DSP TIME increased by %d\n", | 1287 | dev_dbg(&mgr->pci->dev, |
1288 | "ERROR DSP TIME increased by %d\n", | ||
1271 | dsp_time_diff); | 1289 | dsp_time_diff); |
1272 | #endif | 1290 | #endif |
1273 | mgr->dsp_time_last = dsp_time_new; | 1291 | mgr->dsp_time_last = dsp_time_new; |
1274 | 1292 | ||
1275 | if (timer_toggle == mgr->timer_toggle) { | 1293 | if (timer_toggle == mgr->timer_toggle) { |
1276 | snd_printdd("ERROR TIMER TOGGLE\n"); | 1294 | dev_dbg(&mgr->pci->dev, "ERROR TIMER TOGGLE\n"); |
1277 | mgr->dsp_time_err++; | 1295 | mgr->dsp_time_err++; |
1278 | } | 1296 | } |
1279 | mgr->timer_toggle = timer_toggle; | 1297 | mgr->timer_toggle = timer_toggle; |
@@ -1308,7 +1326,7 @@ irqreturn_t pcxhr_interrupt(int irq, void *dev_id) | |||
1308 | } | 1326 | } |
1309 | #ifdef CONFIG_SND_DEBUG_VERBOSE | 1327 | #ifdef CONFIG_SND_DEBUG_VERBOSE |
1310 | if (reg & PCXHR_FATAL_DSP_ERR) | 1328 | if (reg & PCXHR_FATAL_DSP_ERR) |
1311 | snd_printdd("FATAL DSP ERROR : %x\n", reg); | 1329 | dev_dbg(&mgr->pci->dev, "FATAL DSP ERROR : %x\n", reg); |
1312 | #endif | 1330 | #endif |
1313 | spin_unlock(&mgr->lock); | 1331 | spin_unlock(&mgr->lock); |
1314 | return IRQ_HANDLED; /* this device caused the interrupt */ | 1332 | return IRQ_HANDLED; /* this device caused the interrupt */ |
diff --git a/sound/pci/pcxhr/pcxhr_hwdep.c b/sound/pci/pcxhr/pcxhr_hwdep.c index d995175c1c48..15a8ce5f1f48 100644 --- a/sound/pci/pcxhr/pcxhr_hwdep.c +++ b/sound/pci/pcxhr/pcxhr_hwdep.c | |||
@@ -72,7 +72,8 @@ static int pcxhr_init_board(struct pcxhr_mgr *mgr) | |||
72 | /* test max nb substream per pipe */ | 72 | /* test max nb substream per pipe */ |
73 | if (((rmh.stat[1] >> 7) & 0x5F) < PCXHR_PLAYBACK_STREAMS) | 73 | if (((rmh.stat[1] >> 7) & 0x5F) < PCXHR_PLAYBACK_STREAMS) |
74 | return -EINVAL; | 74 | return -EINVAL; |
75 | snd_printdd("supported formats : playback=%x capture=%x\n", | 75 | dev_dbg(&mgr->pci->dev, |
76 | "supported formats : playback=%x capture=%x\n", | ||
76 | rmh.stat[2], rmh.stat[3]); | 77 | rmh.stat[2], rmh.stat[3]); |
77 | 78 | ||
78 | pcxhr_init_rmh(&rmh, CMD_VERSION); | 79 | pcxhr_init_rmh(&rmh, CMD_VERSION); |
@@ -84,7 +85,8 @@ static int pcxhr_init_board(struct pcxhr_mgr *mgr) | |||
84 | err = pcxhr_send_msg(mgr, &rmh); | 85 | err = pcxhr_send_msg(mgr, &rmh); |
85 | if (err) | 86 | if (err) |
86 | return err; | 87 | return err; |
87 | snd_printdd("PCXHR DSP version is %d.%d.%d\n", (rmh.stat[0]>>16)&0xff, | 88 | dev_dbg(&mgr->pci->dev, |
89 | "PCXHR DSP version is %d.%d.%d\n", (rmh.stat[0]>>16)&0xff, | ||
88 | (rmh.stat[0]>>8)&0xff, rmh.stat[0]&0xff); | 90 | (rmh.stat[0]>>8)&0xff, rmh.stat[0]&0xff); |
89 | mgr->dsp_version = rmh.stat[0]; | 91 | mgr->dsp_version = rmh.stat[0]; |
90 | 92 | ||
@@ -179,7 +181,7 @@ static int pcxhr_dsp_allocate_pipe(struct pcxhr_mgr *mgr, | |||
179 | stream_count = PCXHR_PLAYBACK_STREAMS; | 181 | stream_count = PCXHR_PLAYBACK_STREAMS; |
180 | audio_count = 2; /* always stereo */ | 182 | audio_count = 2; /* always stereo */ |
181 | } | 183 | } |
182 | snd_printdd("snd_add_ref_pipe pin(%d) pcm%c0\n", | 184 | dev_dbg(&mgr->pci->dev, "snd_add_ref_pipe pin(%d) pcm%c0\n", |
183 | pin, is_capture ? 'c' : 'p'); | 185 | pin, is_capture ? 'c' : 'p'); |
184 | pipe->is_capture = is_capture; | 186 | pipe->is_capture = is_capture; |
185 | pipe->first_audio = pin; | 187 | pipe->first_audio = pin; |
@@ -194,7 +196,7 @@ static int pcxhr_dsp_allocate_pipe(struct pcxhr_mgr *mgr, | |||
194 | } | 196 | } |
195 | err = pcxhr_send_msg(mgr, &rmh); | 197 | err = pcxhr_send_msg(mgr, &rmh); |
196 | if (err < 0) { | 198 | if (err < 0) { |
197 | snd_printk(KERN_ERR "error pipe allocation " | 199 | dev_err(&mgr->pci->dev, "error pipe allocation " |
198 | "(CMD_RES_PIPE) err=%x!\n", err); | 200 | "(CMD_RES_PIPE) err=%x!\n", err); |
199 | return err; | 201 | return err; |
200 | } | 202 | } |
@@ -222,14 +224,14 @@ static int pcxhr_dsp_free_pipe( struct pcxhr_mgr *mgr, struct pcxhr_pipe *pipe) | |||
222 | /* stop one pipe */ | 224 | /* stop one pipe */ |
223 | err = pcxhr_set_pipe_state(mgr, playback_mask, capture_mask, 0); | 225 | err = pcxhr_set_pipe_state(mgr, playback_mask, capture_mask, 0); |
224 | if (err < 0) | 226 | if (err < 0) |
225 | snd_printk(KERN_ERR "error stopping pipe!\n"); | 227 | dev_err(&mgr->pci->dev, "error stopping pipe!\n"); |
226 | /* release the pipe */ | 228 | /* release the pipe */ |
227 | pcxhr_init_rmh(&rmh, CMD_FREE_PIPE); | 229 | pcxhr_init_rmh(&rmh, CMD_FREE_PIPE); |
228 | pcxhr_set_pipe_cmd_params(&rmh, pipe->is_capture, pipe->first_audio, | 230 | pcxhr_set_pipe_cmd_params(&rmh, pipe->is_capture, pipe->first_audio, |
229 | 0, 0); | 231 | 0, 0); |
230 | err = pcxhr_send_msg(mgr, &rmh); | 232 | err = pcxhr_send_msg(mgr, &rmh); |
231 | if (err < 0) | 233 | if (err < 0) |
232 | snd_printk(KERN_ERR "error pipe release " | 234 | dev_err(&mgr->pci->dev, "error pipe release " |
233 | "(CMD_FREE_PIPE) err(%x)\n", err); | 235 | "(CMD_FREE_PIPE) err(%x)\n", err); |
234 | pipe->status = PCXHR_PIPE_UNDEFINED; | 236 | pipe->status = PCXHR_PIPE_UNDEFINED; |
235 | return err; | 237 | return err; |
@@ -289,7 +291,8 @@ static int pcxhr_dsp_load(struct pcxhr_mgr *mgr, int index, | |||
289 | { | 291 | { |
290 | int err, card_index; | 292 | int err, card_index; |
291 | 293 | ||
292 | snd_printdd("loading dsp [%d] size = %Zd\n", index, dsp->size); | 294 | dev_dbg(&mgr->pci->dev, |
295 | "loading dsp [%d] size = %Zd\n", index, dsp->size); | ||
293 | 296 | ||
294 | switch (index) { | 297 | switch (index) { |
295 | case PCXHR_FIRMWARE_XLX_INT_INDEX: | 298 | case PCXHR_FIRMWARE_XLX_INT_INDEX: |
@@ -313,19 +316,19 @@ static int pcxhr_dsp_load(struct pcxhr_mgr *mgr, int index, | |||
313 | return err; | 316 | return err; |
314 | break; /* continue with first init */ | 317 | break; /* continue with first init */ |
315 | default: | 318 | default: |
316 | snd_printk(KERN_ERR "wrong file index\n"); | 319 | dev_err(&mgr->pci->dev, "wrong file index\n"); |
317 | return -EFAULT; | 320 | return -EFAULT; |
318 | } /* end of switch file index*/ | 321 | } /* end of switch file index*/ |
319 | 322 | ||
320 | /* first communication with embedded */ | 323 | /* first communication with embedded */ |
321 | err = pcxhr_init_board(mgr); | 324 | err = pcxhr_init_board(mgr); |
322 | if (err < 0) { | 325 | if (err < 0) { |
323 | snd_printk(KERN_ERR "pcxhr could not be set up\n"); | 326 | dev_err(&mgr->pci->dev, "pcxhr could not be set up\n"); |
324 | return err; | 327 | return err; |
325 | } | 328 | } |
326 | err = pcxhr_config_pipes(mgr); | 329 | err = pcxhr_config_pipes(mgr); |
327 | if (err < 0) { | 330 | if (err < 0) { |
328 | snd_printk(KERN_ERR "pcxhr pipes could not be set up\n"); | 331 | dev_err(&mgr->pci->dev, "pcxhr pipes could not be set up\n"); |
329 | return err; | 332 | return err; |
330 | } | 333 | } |
331 | /* create devices and mixer in accordance with HW options*/ | 334 | /* create devices and mixer in accordance with HW options*/ |
@@ -344,10 +347,11 @@ static int pcxhr_dsp_load(struct pcxhr_mgr *mgr, int index, | |||
344 | } | 347 | } |
345 | err = pcxhr_start_pipes(mgr); | 348 | err = pcxhr_start_pipes(mgr); |
346 | if (err < 0) { | 349 | if (err < 0) { |
347 | snd_printk(KERN_ERR "pcxhr pipes could not be started\n"); | 350 | dev_err(&mgr->pci->dev, "pcxhr pipes could not be started\n"); |
348 | return err; | 351 | return err; |
349 | } | 352 | } |
350 | snd_printdd("pcxhr firmware downloaded and successfully set up\n"); | 353 | dev_dbg(&mgr->pci->dev, |
354 | "pcxhr firmware downloaded and successfully set up\n"); | ||
351 | 355 | ||
352 | return 0; | 356 | return 0; |
353 | } | 357 | } |
@@ -382,7 +386,8 @@ int pcxhr_setup_firmware(struct pcxhr_mgr *mgr) | |||
382 | continue; | 386 | continue; |
383 | sprintf(path, "pcxhr/%s", fw_files[fw_set][i]); | 387 | sprintf(path, "pcxhr/%s", fw_files[fw_set][i]); |
384 | if (request_firmware(&fw_entry, path, &mgr->pci->dev)) { | 388 | if (request_firmware(&fw_entry, path, &mgr->pci->dev)) { |
385 | snd_printk(KERN_ERR "pcxhr: can't load firmware %s\n", | 389 | dev_err(&mgr->pci->dev, |
390 | "pcxhr: can't load firmware %s\n", | ||
386 | path); | 391 | path); |
387 | return -ENOENT; | 392 | return -ENOENT; |
388 | } | 393 | } |
diff --git a/sound/pci/pcxhr/pcxhr_mix22.c b/sound/pci/pcxhr/pcxhr_mix22.c index 84fe57626eba..6a56e5306a65 100644 --- a/sound/pci/pcxhr/pcxhr_mix22.c +++ b/sound/pci/pcxhr/pcxhr_mix22.c | |||
@@ -22,6 +22,7 @@ | |||
22 | 22 | ||
23 | #include <linux/delay.h> | 23 | #include <linux/delay.h> |
24 | #include <linux/io.h> | 24 | #include <linux/io.h> |
25 | #include <linux/pci.h> | ||
25 | #include <sound/core.h> | 26 | #include <sound/core.h> |
26 | #include <sound/control.h> | 27 | #include <sound/control.h> |
27 | #include <sound/tlv.h> | 28 | #include <sound/tlv.h> |
@@ -290,7 +291,8 @@ int hr222_sub_init(struct pcxhr_mgr *mgr) | |||
290 | reg = PCXHR_INPB(mgr, PCXHR_XLX_STATUS); | 291 | reg = PCXHR_INPB(mgr, PCXHR_XLX_STATUS); |
291 | if (reg & PCXHR_STAT_MIC_CAPS) | 292 | if (reg & PCXHR_STAT_MIC_CAPS) |
292 | mgr->board_has_mic = 1; /* microphone available */ | 293 | mgr->board_has_mic = 1; /* microphone available */ |
293 | snd_printdd("MIC input available = %d\n", mgr->board_has_mic); | 294 | dev_dbg(&mgr->pci->dev, |
295 | "MIC input available = %d\n", mgr->board_has_mic); | ||
294 | 296 | ||
295 | /* reset codec */ | 297 | /* reset codec */ |
296 | PCXHR_OUTPB(mgr, PCXHR_DSP_RESET, | 298 | PCXHR_OUTPB(mgr, PCXHR_DSP_RESET, |
@@ -405,7 +407,7 @@ int hr222_sub_set_clock(struct pcxhr_mgr *mgr, | |||
405 | 407 | ||
406 | hr222_config_akm(mgr, AKM_UNMUTE_CMD); | 408 | hr222_config_akm(mgr, AKM_UNMUTE_CMD); |
407 | 409 | ||
408 | snd_printdd("set_clock to %dHz (realfreq=%d pllreg=%x)\n", | 410 | dev_dbg(&mgr->pci->dev, "set_clock to %dHz (realfreq=%d pllreg=%x)\n", |
409 | rate, realfreq, pllreg); | 411 | rate, realfreq, pllreg); |
410 | return 0; | 412 | return 0; |
411 | } | 413 | } |
@@ -431,13 +433,15 @@ int hr222_get_external_clock(struct pcxhr_mgr *mgr, | |||
431 | reg = PCXHR_STAT_FREQ_UER1_MASK; | 433 | reg = PCXHR_STAT_FREQ_UER1_MASK; |
432 | 434 | ||
433 | } else { | 435 | } else { |
434 | snd_printdd("get_external_clock : type %d not supported\n", | 436 | dev_dbg(&mgr->pci->dev, |
437 | "get_external_clock : type %d not supported\n", | ||
435 | clock_type); | 438 | clock_type); |
436 | return -EINVAL; /* other clocks not supported */ | 439 | return -EINVAL; /* other clocks not supported */ |
437 | } | 440 | } |
438 | 441 | ||
439 | if ((PCXHR_INPB(mgr, PCXHR_XLX_CSUER) & mask) != mask) { | 442 | if ((PCXHR_INPB(mgr, PCXHR_XLX_CSUER) & mask) != mask) { |
440 | snd_printdd("get_external_clock(%d) = 0 Hz\n", clock_type); | 443 | dev_dbg(&mgr->pci->dev, |
444 | "get_external_clock(%d) = 0 Hz\n", clock_type); | ||
441 | *sample_rate = 0; | 445 | *sample_rate = 0; |
442 | return 0; /* no external clock locked */ | 446 | return 0; /* no external clock locked */ |
443 | } | 447 | } |
@@ -495,7 +499,7 @@ int hr222_get_external_clock(struct pcxhr_mgr *mgr, | |||
495 | else | 499 | else |
496 | rate = 0; | 500 | rate = 0; |
497 | 501 | ||
498 | snd_printdd("External clock is at %d Hz (measured %d Hz)\n", | 502 | dev_dbg(&mgr->pci->dev, "External clock is at %d Hz (measured %d Hz)\n", |
499 | rate, calc_rate); | 503 | rate, calc_rate); |
500 | *sample_rate = rate; | 504 | *sample_rate = rate; |
501 | return 0; | 505 | return 0; |
@@ -542,7 +546,8 @@ int hr222_manage_timecode(struct pcxhr_mgr *mgr, int enable) | |||
542 | int hr222_update_analog_audio_level(struct snd_pcxhr *chip, | 546 | int hr222_update_analog_audio_level(struct snd_pcxhr *chip, |
543 | int is_capture, int channel) | 547 | int is_capture, int channel) |
544 | { | 548 | { |
545 | snd_printdd("hr222_update_analog_audio_level(%s chan=%d)\n", | 549 | dev_dbg(chip->card->dev, |
550 | "hr222_update_analog_audio_level(%s chan=%d)\n", | ||
546 | is_capture ? "capture" : "playback", channel); | 551 | is_capture ? "capture" : "playback", channel); |
547 | if (is_capture) { | 552 | if (is_capture) { |
548 | int level_l, level_r, level_mic; | 553 | int level_l, level_r, level_mic; |
@@ -642,7 +647,7 @@ int hr222_iec958_capture_byte(struct snd_pcxhr *chip, | |||
642 | if (PCXHR_INPB(chip->mgr, PCXHR_XLX_CSUER) & mask) | 647 | if (PCXHR_INPB(chip->mgr, PCXHR_XLX_CSUER) & mask) |
643 | temp |= 1; | 648 | temp |= 1; |
644 | } | 649 | } |
645 | snd_printdd("read iec958 AES %d byte %d = 0x%x\n", | 650 | dev_dbg(chip->card->dev, "read iec958 AES %d byte %d = 0x%x\n", |
646 | chip->chip_idx, aes_idx, temp); | 651 | chip->chip_idx, aes_idx, temp); |
647 | *aes_bits = temp; | 652 | *aes_bits = temp; |
648 | return 0; | 653 | return 0; |
@@ -684,7 +689,7 @@ static void hr222_micro_boost(struct pcxhr_mgr *mgr, int level) | |||
684 | 689 | ||
685 | PCXHR_OUTPB(mgr, PCXHR_XLX_SELMIC, mgr->xlx_selmic); | 690 | PCXHR_OUTPB(mgr, PCXHR_XLX_SELMIC, mgr->xlx_selmic); |
686 | 691 | ||
687 | snd_printdd("hr222_micro_boost : set %x\n", boost_mask); | 692 | dev_dbg(&mgr->pci->dev, "hr222_micro_boost : set %x\n", boost_mask); |
688 | } | 693 | } |
689 | 694 | ||
690 | static void hr222_phantom_power(struct pcxhr_mgr *mgr, int power) | 695 | static void hr222_phantom_power(struct pcxhr_mgr *mgr, int power) |
@@ -696,7 +701,7 @@ static void hr222_phantom_power(struct pcxhr_mgr *mgr, int power) | |||
696 | 701 | ||
697 | PCXHR_OUTPB(mgr, PCXHR_XLX_SELMIC, mgr->xlx_selmic); | 702 | PCXHR_OUTPB(mgr, PCXHR_XLX_SELMIC, mgr->xlx_selmic); |
698 | 703 | ||
699 | snd_printdd("hr222_phantom_power : set %d\n", power); | 704 | dev_dbg(&mgr->pci->dev, "hr222_phantom_power : set %d\n", power); |
700 | } | 705 | } |
701 | 706 | ||
702 | 707 | ||
diff --git a/sound/pci/pcxhr/pcxhr_mixer.c b/sound/pci/pcxhr/pcxhr_mixer.c index fec049344621..95c9571780d8 100644 --- a/sound/pci/pcxhr/pcxhr_mixer.c +++ b/sound/pci/pcxhr/pcxhr_mixer.c | |||
@@ -72,7 +72,8 @@ static int pcxhr_update_analog_audio_level(struct snd_pcxhr *chip, | |||
72 | rmh.cmd_len = 3; | 72 | rmh.cmd_len = 3; |
73 | err = pcxhr_send_msg(chip->mgr, &rmh); | 73 | err = pcxhr_send_msg(chip->mgr, &rmh); |
74 | if (err < 0) { | 74 | if (err < 0) { |
75 | snd_printk(KERN_DEBUG "error update_analog_audio_level card(%d)" | 75 | dev_dbg(chip->card->dev, |
76 | "error update_analog_audio_level card(%d)" | ||
76 | " is_capture(%d) err(%x)\n", | 77 | " is_capture(%d) err(%x)\n", |
77 | chip->chip_idx, is_capture, err); | 78 | chip->chip_idx, is_capture, err); |
78 | return -EINVAL; | 79 | return -EINVAL; |
@@ -284,7 +285,7 @@ static int pcxhr_update_playback_stream_level(struct snd_pcxhr* chip, int idx) | |||
284 | 285 | ||
285 | err = pcxhr_send_msg(chip->mgr, &rmh); | 286 | err = pcxhr_send_msg(chip->mgr, &rmh); |
286 | if (err < 0) { | 287 | if (err < 0) { |
287 | snd_printk(KERN_DEBUG "error update_playback_stream_level " | 288 | dev_dbg(chip->card->dev, "error update_playback_stream_level " |
288 | "card(%d) err(%x)\n", chip->chip_idx, err); | 289 | "card(%d) err(%x)\n", chip->chip_idx, err); |
289 | return -EINVAL; | 290 | return -EINVAL; |
290 | } | 291 | } |
@@ -335,7 +336,8 @@ static int pcxhr_update_audio_pipe_level(struct snd_pcxhr *chip, | |||
335 | 336 | ||
336 | err = pcxhr_send_msg(chip->mgr, &rmh); | 337 | err = pcxhr_send_msg(chip->mgr, &rmh); |
337 | if (err < 0) { | 338 | if (err < 0) { |
338 | snd_printk(KERN_DEBUG "error update_audio_level(%d) err=%x\n", | 339 | dev_dbg(chip->card->dev, |
340 | "error update_audio_level(%d) err=%x\n", | ||
339 | chip->chip_idx, err); | 341 | chip->chip_idx, err); |
340 | return -EINVAL; | 342 | return -EINVAL; |
341 | } | 343 | } |
@@ -930,7 +932,7 @@ static int pcxhr_iec958_capture_byte(struct snd_pcxhr *chip, | |||
930 | temp |= 1; | 932 | temp |= 1; |
931 | } | 933 | } |
932 | } | 934 | } |
933 | snd_printdd("read iec958 AES %d byte %d = 0x%x\n", | 935 | dev_dbg(chip->card->dev, "read iec958 AES %d byte %d = 0x%x\n", |
934 | chip->chip_idx, aes_idx, temp); | 936 | chip->chip_idx, aes_idx, temp); |
935 | *aes_bits = temp; | 937 | *aes_bits = temp; |
936 | return 0; | 938 | return 0; |
@@ -992,7 +994,8 @@ static int pcxhr_iec958_update_byte(struct snd_pcxhr *chip, | |||
992 | rmh.cmd[0] |= IO_NUM_REG_CUER; | 994 | rmh.cmd[0] |= IO_NUM_REG_CUER; |
993 | rmh.cmd[1] = cmd; | 995 | rmh.cmd[1] = cmd; |
994 | rmh.cmd_len = 2; | 996 | rmh.cmd_len = 2; |
995 | snd_printdd("write iec958 AES %d byte %d bit %d (cmd %x)\n", | 997 | dev_dbg(chip->card->dev, |
998 | "write iec958 AES %d byte %d bit %d (cmd %x)\n", | ||
996 | chip->chip_idx, aes_idx, i, cmd); | 999 | chip->chip_idx, aes_idx, i, cmd); |
997 | err = pcxhr_send_msg(chip->mgr, &rmh); | 1000 | err = pcxhr_send_msg(chip->mgr, &rmh); |
998 | if (err) | 1001 | if (err) |