snd_pcm_uframes_t period_size = runtime->period_size;
- snd_printd(LXP "allocating pipe for %d channels\n", channels);
+ dev_dbg(chip->card->dev, "allocating pipe for %d channels\n", channels);
err = lx_pipe_allocate(chip, 0, is_capture, channels);
if (err < 0) {
- snd_printk(KERN_ERR LXP "allocating pipe failed\n");
+ dev_err(chip->card->dev, LXP "allocating pipe failed\n");
return err;
}
err = lx_set_granularity(chip, period_size);
if (err < 0) {
- snd_printk(KERN_ERR LXP "setting granularity to %ld failed\n",
+ dev_err(chip->card->dev, "setting granularity to %ld failed\n",
period_size);
return err;
}
struct snd_pcm_runtime *runtime = substream->runtime;
int is_capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);
- snd_printd(LXP "setting stream format\n");
+ dev_dbg(chip->card->dev, "setting stream format\n");
err = lx_stream_set_format(chip, runtime, 0, is_capture);
if (err < 0) {
- snd_printk(KERN_ERR LXP "setting stream format failed\n");
+ dev_err(chip->card->dev, "setting stream format failed\n");
return err;
}
- snd_printd(LXP "starting pipe\n");
+ dev_dbg(chip->card->dev, "starting pipe\n");
err = lx_pipe_start(chip, 0, is_capture);
if (err < 0) {
- snd_printk(KERN_ERR LXP "starting pipe failed\n");
+ dev_err(chip->card->dev, "starting pipe failed\n");
return err;
}
- snd_printd(LXP "waiting for pipe to start\n");
+ dev_dbg(chip->card->dev, "waiting for pipe to start\n");
err = lx_pipe_wait_for_start(chip, 0, is_capture);
if (err < 0) {
- snd_printk(KERN_ERR LXP "waiting for pipe failed\n");
+ dev_err(chip->card->dev, "waiting for pipe failed\n");
return err;
}
int err = 0;
int is_capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);
- snd_printd(LXP "pausing pipe\n");
+ dev_dbg(chip->card->dev, "pausing pipe\n");
err = lx_pipe_pause(chip, 0, is_capture);
if (err < 0) {
- snd_printk(KERN_ERR LXP "pausing pipe failed\n");
+ dev_err(chip->card->dev, "pausing pipe failed\n");
return err;
}
- snd_printd(LXP "waiting for pipe to become idle\n");
+ dev_dbg(chip->card->dev, "waiting for pipe to become idle\n");
err = lx_pipe_wait_for_idle(chip, 0, is_capture);
if (err < 0) {
- snd_printk(KERN_ERR LXP "waiting for pipe failed\n");
+ dev_err(chip->card->dev, "waiting for pipe failed\n");
return err;
}
- snd_printd(LXP "stopping pipe\n");
+ dev_dbg(chip->card->dev, "stopping pipe\n");
err = lx_pipe_stop(chip, 0, is_capture);
if (err < 0) {
- snd_printk(LXP "stopping pipe failed\n");
+ dev_err(chip->card->dev, "stopping pipe failed\n");
return err;
}
int err = 0;
int is_capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);
- snd_printd(LXP "releasing pipe\n");
+ dev_dbg(chip->card->dev, "releasing pipe\n");
err = lx_pipe_release(chip, 0, is_capture);
if (err < 0) {
- snd_printk(LXP "releasing pipe failed\n");
+ dev_err(chip->card->dev, "releasing pipe failed\n");
return err;
}
int err = 0;
int board_rate;
- snd_printdd("->lx_pcm_open\n");
+ dev_dbg(chip->card->dev, "->lx_pcm_open\n");
mutex_lock(&chip->setup_mutex);
/* copy the struct snd_pcm_hardware struct */
err = snd_pcm_hw_constraint_integer(runtime,
SNDRV_PCM_HW_PARAM_PERIODS);
if (err < 0) {
- snd_printk(KERN_WARNING LXP "could not constrain periods\n");
+ dev_warn(chip->card->dev, "could not constrain periods\n");
goto exit;
}
#endif
board_rate, board_rate);
if (err < 0) {
- snd_printk(KERN_WARNING LXP "could not constrain periods\n");
+ dev_warn(chip->card->dev, "could not constrain periods\n");
goto exit;
}
MICROBLAZE_IBL_MIN,
MICROBLAZE_IBL_MAX);
if (err < 0) {
- snd_printk(KERN_WARNING LXP
+ dev_warn(chip->card->dev,
"could not constrain period size\n");
goto exit;
}
runtime->private_data = chip;
mutex_unlock(&chip->setup_mutex);
- snd_printdd("<-lx_pcm_open, %d\n", err);
+ dev_dbg(chip->card->dev, "<-lx_pcm_open, %d\n", err);
return err;
}
static int lx_pcm_close(struct snd_pcm_substream *substream)
{
int err = 0;
- snd_printdd("->lx_pcm_close\n");
+ dev_dbg(substream->pcm->card->dev, "->lx_pcm_close\n");
return err;
}
struct lx_stream *lx_stream = is_capture ? &chip->capture_stream :
&chip->playback_stream;
- snd_printdd("->lx_pcm_stream_pointer\n");
+ dev_dbg(chip->card->dev, "->lx_pcm_stream_pointer\n");
spin_lock_irqsave(&chip->lock, flags);
pos = lx_stream->frame_pos * substream->runtime->period_size;
spin_unlock_irqrestore(&chip->lock, flags);
- snd_printdd(LXP "stream_pointer at %ld\n", pos);
+ dev_dbg(chip->card->dev, "stream_pointer at %ld\n", pos);
return pos;
}
int err = 0;
const int is_capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);
- snd_printdd("->lx_pcm_prepare\n");
+ dev_dbg(chip->card->dev, "->lx_pcm_prepare\n");
mutex_lock(&chip->setup_mutex);
if (chip->hardware_running[is_capture]) {
err = lx_hardware_stop(chip, substream);
if (err < 0) {
- snd_printk(KERN_ERR LXP "failed to stop hardware. "
+ dev_err(chip->card->dev, "failed to stop hardware. "
"Error code %d\n", err);
goto exit;
}
err = lx_hardware_close(chip, substream);
if (err < 0) {
- snd_printk(KERN_ERR LXP "failed to close hardware. "
+ dev_err(chip->card->dev, "failed to close hardware. "
"Error code %d\n", err);
goto exit;
}
}
- snd_printd(LXP "opening hardware\n");
+ dev_dbg(chip->card->dev, "opening hardware\n");
err = lx_hardware_open(chip, substream);
if (err < 0) {
- snd_printk(KERN_ERR LXP "failed to open hardware. "
+ dev_err(chip->card->dev, "failed to open hardware. "
"Error code %d\n", err);
goto exit;
}
err = lx_hardware_start(chip, substream);
if (err < 0) {
- snd_printk(KERN_ERR LXP "failed to start hardware. "
+ dev_err(chip->card->dev, "failed to start hardware. "
"Error code %d\n", err);
goto exit;
}
struct lx6464es *chip = snd_pcm_substream_chip(substream);
int err = 0;
- snd_printdd("->lx_pcm_hw_params\n");
+ dev_dbg(chip->card->dev, "->lx_pcm_hw_params\n");
mutex_lock(&chip->setup_mutex);
int err = 0;
int is_capture = (substream->stream == SNDRV_PCM_STREAM_CAPTURE);
- snd_printdd("->lx_pcm_hw_free\n");
+ dev_dbg(chip->card->dev, "->lx_pcm_hw_free\n");
mutex_lock(&chip->setup_mutex);
if (chip->hardware_running[is_capture]) {
err = lx_hardware_stop(chip, substream);
if (err < 0) {
- snd_printk(KERN_ERR LXP "failed to stop hardware. "
+ dev_err(chip->card->dev, "failed to stop hardware. "
"Error code %d\n", err);
goto exit;
}
err = lx_hardware_close(chip, substream);
if (err < 0) {
- snd_printk(KERN_ERR LXP "failed to close hardware. "
+ dev_err(chip->card->dev, "failed to close hardware. "
"Error code %d\n", err);
goto exit;
}
err = lx_buffer_ask(chip, 0, is_capture, &needed, &freed,
size_array);
- snd_printdd(LXP "starting: needed %d, freed %d\n",
+ dev_dbg(chip->card->dev, "starting: needed %d, freed %d\n",
needed, freed);
err = lx_buffer_give(chip, 0, is_capture, period_bytes,
lower_32_bits(buf), upper_32_bits(buf),
&buffer_index);
- snd_printdd(LXP "starting: buffer index %x on 0x%lx (%d bytes)\n",
+ dev_dbg(chip->card->dev, "starting: buffer index %x on 0x%lx (%d bytes)\n",
buffer_index, (unsigned long)buf, period_bytes);
buf += period_bytes;
}
err = lx_buffer_ask(chip, 0, is_capture, &needed, &freed, size_array);
- snd_printdd(LXP "starting: needed %d, freed %d\n", needed, freed);
+ dev_dbg(chip->card->dev, "starting: needed %d, freed %d\n", needed, freed);
- snd_printd(LXP "starting: starting stream\n");
+ dev_dbg(chip->card->dev, "starting: starting stream\n");
err = lx_stream_start(chip, 0, is_capture);
if (err < 0)
- snd_printk(KERN_ERR LXP "couldn't start stream\n");
+ dev_err(chip->card->dev, "couldn't start stream\n");
else
lx_stream->status = LX_STREAM_STATUS_RUNNING;
const unsigned int is_capture = lx_stream->is_capture;
int err;
- snd_printd(LXP "stopping: stopping stream\n");
+ dev_dbg(chip->card->dev, "stopping: stopping stream\n");
err = lx_stream_stop(chip, 0, is_capture);
if (err < 0)
- snd_printk(KERN_ERR LXP "couldn't stop stream\n");
+ dev_err(chip->card->dev, "couldn't stop stream\n");
else
lx_stream->status = LX_STREAM_STATUS_FREE;
struct lx6464es *chip = (struct lx6464es *)data;
unsigned long flags;
- snd_printdd("->lx_trigger_tasklet\n");
+ dev_dbg(chip->card->dev, "->lx_trigger_tasklet\n");
spin_lock_irqsave(&chip->lock, flags);
lx_trigger_tasklet_dispatch_stream(chip, &chip->capture_stream);
struct lx_stream *stream = is_capture ? &chip->capture_stream :
&chip->playback_stream;
- snd_printdd("->lx_pcm_trigger\n");
+ dev_dbg(chip->card->dev, "->lx_pcm_trigger\n");
return lx_pcm_trigger_dispatch(chip, stream, cmd);
}
static int snd_lx6464es_free(struct lx6464es *chip)
{
- snd_printdd("->snd_lx6464es_free\n");
+ dev_dbg(chip->card->dev, "->snd_lx6464es_free\n");
lx_irq_disable(chip);
int i;
u32 plx_reg = lx_plx_reg_read(chip, ePLX_CHIPSC);
- snd_printdd("->lx_init_xilinx_reset\n");
+ dev_dbg(chip->card->dev, "->lx_init_xilinx_reset\n");
/* activate reset of xilinx */
plx_reg &= ~CHIPSC_RESET_XILINX;
msleep(10);
reg_mbox3 = lx_plx_reg_read(chip, ePLX_MBOX3);
if (reg_mbox3) {
- snd_printd(LXP "xilinx reset done\n");
- snd_printdd(LXP "xilinx took %d loops\n", i);
+ dev_dbg(chip->card->dev, "xilinx reset done\n");
+ dev_dbg(chip->card->dev, "xilinx took %d loops\n", i);
break;
}
}
{
u32 reg;
- snd_printdd("->lx_init_xilinx_test\n");
+ dev_dbg(chip->card->dev, "->lx_init_xilinx_test\n");
/* TEST if we have access to Xilinx/MicroBlaze */
lx_dsp_reg_write(chip, eReg_CSM, 0);
reg = lx_dsp_reg_read(chip, eReg_CSM);
if (reg) {
- snd_printk(KERN_ERR LXP "Problem: Reg_CSM %x.\n", reg);
+ dev_err(chip->card->dev, "Problem: Reg_CSM %x.\n", reg);
/* PCI9056_SPACE0_REMAP */
lx_plx_reg_write(chip, ePLX_PCICR, 1);
reg = lx_dsp_reg_read(chip, eReg_CSM);
if (reg) {
- snd_printk(KERN_ERR LXP "Error: Reg_CSM %x.\n", reg);
+ dev_err(chip->card->dev, "Error: Reg_CSM %x.\n", reg);
return -EAGAIN; /* seems to be appropriate */
}
}
- snd_printd(LXP "Xilinx/MicroBlaze access test successful\n");
+ dev_dbg(chip->card->dev, "Xilinx/MicroBlaze access test successful\n");
return 0;
}
(64 << IOCR_OUTPUTS_OFFSET) |
(FREQ_RATIO_SINGLE_MODE << FREQ_RATIO_OFFSET);
- snd_printdd("->lx_init_ethersound\n");
+ dev_dbg(chip->card->dev, "->lx_init_ethersound\n");
chip->freq_ratio = FREQ_RATIO_SINGLE_MODE;
for (i = 0; i != 1000; ++i) {
if (lx_dsp_reg_read(chip, eReg_CSES) & 4) {
- snd_printd(LXP "ethersound initialized after %dms\n",
+ dev_dbg(chip->card->dev, "ethersound initialized after %dms\n",
i);
goto ethersound_initialized;
}
msleep(1);
}
- snd_printk(KERN_WARNING LXP
+ dev_warn(chip->card->dev,
"ethersound could not be initialized after %dms\n", i);
return -ETIMEDOUT;
ethersound_initialized:
- snd_printd(LXP "ethersound initialized\n");
+ dev_dbg(chip->card->dev, "ethersound initialized\n");
return 0;
}
int err;
- snd_printdd("->lx_init_get_version_features\n");
+ dev_dbg(chip->card->dev, "->lx_init_get_version_features\n");
err = lx_dsp_get_version(chip, &dsp_version);
if (err == 0) {
u32 freq;
- snd_printk(LXP "DSP version: V%02d.%02d #%d\n",
+ dev_info(chip->card->dev, "DSP version: V%02d.%02d #%d\n",
(dsp_version>>16) & 0xff, (dsp_version>>8) & 0xff,
dsp_version & 0xff);
err = lx_dsp_get_clock_frequency(chip, &freq);
if (err == 0)
chip->board_sample_rate = freq;
- snd_printd(LXP "actual clock frequency %d\n", freq);
+ dev_dbg(chip->card->dev, "actual clock frequency %d\n", freq);
} else {
- snd_printk(KERN_ERR LXP "DSP corrupted \n");
+ dev_err(chip->card->dev, "DSP corrupted \n");
err = -EAGAIN;
}
int err = 0;
u32 snapped_gran = MICROBLAZE_IBL_MIN;
- snd_printdd("->lx_set_granularity\n");
+ dev_dbg(chip->card->dev, "->lx_set_granularity\n");
/* blocksize is a power of 2 */
while ((snapped_gran < gran) &&
err = lx_dsp_set_granularity(chip, snapped_gran);
if (err < 0) {
- snd_printk(KERN_WARNING LXP "could not set granularity\n");
+ dev_warn(chip->card->dev, "could not set granularity\n");
err = -EAGAIN;
}
if (snapped_gran != gran)
- snd_printk(LXP "snapped blocksize to %d\n", snapped_gran);
+ dev_err(chip->card->dev, "snapped blocksize to %d\n", snapped_gran);
- snd_printd(LXP "set blocksize on board %d\n", snapped_gran);
+ dev_dbg(chip->card->dev, "set blocksize on board %d\n", snapped_gran);
chip->pcm_granularity = snapped_gran;
return err;
int err;
int i;
- snd_printdd("->lx_init_dsp\n");
+ dev_dbg(chip->card->dev, "->lx_init_dsp\n");
- snd_printd(LXP "initialize board\n");
+ dev_dbg(chip->card->dev, "initialize board\n");
err = lx_init_xilinx_reset(chip);
if (err)
return err;
- snd_printd(LXP "testing board\n");
+ dev_dbg(chip->card->dev, "testing board\n");
err = lx_init_xilinx_test(chip);
if (err)
return err;
- snd_printd(LXP "initialize ethersound configuration\n");
+ dev_dbg(chip->card->dev, "initialize ethersound configuration\n");
err = lx_init_ethersound_config(chip);
if (err)
return err;
return -ETIMEDOUT;
mac_ready:
- snd_printd(LXP "mac address ready read after: %dms\n", i);
- snd_printk(LXP "mac address: %02X.%02X.%02X.%02X.%02X.%02X\n",
+ dev_dbg(chip->card->dev, "mac address ready read after: %dms\n", i);
+ dev_info(chip->card->dev,
+ "mac address: %02X.%02X.%02X.%02X.%02X.%02X\n",
chip->mac_address[0], chip->mac_address[1], chip->mac_address[2],
chip->mac_address[3], chip->mac_address[4], chip->mac_address[5]);
.dev_free = snd_lx6464es_dev_free,
};
- snd_printdd("->snd_lx6464es_create\n");
+ dev_dbg(card->dev, "->snd_lx6464es_create\n");
*rchip = NULL;
/* check if we can restrict PCI DMA transfers to 32 bits */
err = pci_set_dma_mask(pci, DMA_BIT_MASK(32));
if (err < 0) {
- snd_printk(KERN_ERR "architecture does not support "
- "32bit PCI busmaster DMA\n");
+ dev_err(card->dev,
+ "architecture does not support 32bit PCI busmaster DMA\n");
pci_disable_device(pci);
return -ENXIO;
}
err = request_irq(pci->irq, lx_interrupt, IRQF_SHARED,
KBUILD_MODNAME, chip);
if (err) {
- snd_printk(KERN_ERR LXP "unable to grab IRQ %d\n", pci->irq);
+ dev_err(card->dev, "unable to grab IRQ %d\n", pci->irq);
goto request_irq_failed;
}
chip->irq = pci->irq;
err = lx_init_dsp(chip);
if (err < 0) {
- snd_printk(KERN_ERR LXP "error during DSP initialization\n");
+ dev_err(card->dev, "error during DSP initialization\n");
return err;
}
struct lx6464es *chip;
int err;
- snd_printdd("->snd_lx6464es_probe\n");
+ dev_dbg(&pci->dev, "->snd_lx6464es_probe\n");
if (dev >= SNDRV_CARDS)
return -ENODEV;
err = snd_lx6464es_create(card, pci, &chip);
if (err < 0) {
- snd_printk(KERN_ERR LXP "error during snd_lx6464es_create\n");
+ dev_err(card->dev, "error during snd_lx6464es_create\n");
goto out_free;
}
if (err < 0)
goto out_free;
- snd_printdd(LXP "initialization successful\n");
+ dev_dbg(chip->card->dev, "initialization successful\n");
pci_set_drvdata(pci, card);
dev++;
return 0;
int dwloop;
if (lx_dsp_reg_read(chip, eReg_CSM) & (Reg_CSM_MC | Reg_CSM_MR)) {
- snd_printk(KERN_ERR LXP "PIOSendMessage eReg_CSM %x\n", reg);
+ dev_err(chip->card->dev, "PIOSendMessage eReg_CSM %x\n", reg);
return -EBUSY;
}
} else
udelay(1);
}
- snd_printk(KERN_WARNING LXP "TIMEOUT lx_message_send_atomic! "
+ dev_warn(chip->card->dev, "TIMEOUT lx_message_send_atomic! "
"polling failed\n");
polling_successful:
rmh->stat_len);
}
} else
- snd_printk(LXP "rmh error: %08x\n", reg);
+ dev_err(chip->card->dev, "rmh error: %08x\n", reg);
/* clear Reg_CSM_MR */
lx_dsp_reg_write(chip, eReg_CSM, 0);
switch (reg) {
case ED_DSP_TIMED_OUT:
- snd_printk(KERN_WARNING LXP "lx_message_send: dsp timeout\n");
+ dev_warn(chip->card->dev, "lx_message_send: dsp timeout\n");
return -ETIMEDOUT;
case ED_DSP_CRASHED:
- snd_printk(KERN_WARNING LXP "lx_message_send: dsp crashed\n");
+ dev_warn(chip->card->dev, "lx_message_send: dsp crashed\n");
return -EAGAIN;
}
spin_unlock_irqrestore(&chip->msg_lock, flags);
if (err != 0)
- snd_printk(KERN_ERR "lx6464es: could not allocate pipe\n");
+ dev_err(chip->card->dev, "could not allocate pipe\n");
return err;
}
}
#if 0
- snd_printdd(LXP "CMD_08_ASK_BUFFERS: needed %d, freed %d\n",
+ dev_dbg(chip->card->dev,
+ "CMD_08_ASK_BUFFERS: needed %d, freed %d\n",
*r_needed, *r_freed);
for (i = 0; i < MAX_STREAM_BUFFER; ++i) {
for (i = 0; i != chip->rmh.stat_len; ++i)
- snd_printdd(" stat[%d]: %x, %x\n", i,
+ dev_dbg(chip->card->dev,
+ " stat[%d]: %x, %x\n", i,
chip->rmh.stat[i],
chip->rmh.stat[i] & MASK_DATA_SIZE);
}
err = lx_message_send_atomic(chip, &chip->rmh); /* don't sleep! */
if (err != 0)
- snd_printk(KERN_ERR
- "lx6464es: could not query pipe's sample count\n");
+ dev_err(chip->card->dev,
+ "could not query pipe's sample count\n");
else {
*rsample_count = ((u64)(chip->rmh.stat[0] & MASK_SPL_COUNT_HI)
<< 24) /* hi part */
err = lx_message_send_atomic(chip, &chip->rmh);
if (err != 0)
- snd_printk(KERN_ERR "lx6464es: could not query pipe's state\n");
+ dev_err(chip->card->dev, "could not query pipe's state\n");
else
*rstate = (chip->rmh.stat[0] >> PSTATE_OFFSET) & 0x0F;
u32 channels = runtime->channels;
if (runtime->channels != channels)
- snd_printk(KERN_ERR LXP "channel count mismatch: %d vs %d",
+ dev_err(chip->card->dev, "channel count mismatch: %d vs %d",
runtime->channels, channels);
spin_lock_irqsave(&chip->msg_lock, flags);
}
if (err == EB_RBUFFERS_TABLE_OVERFLOW)
- snd_printk(LXP "lx_buffer_give EB_RBUFFERS_TABLE_OVERFLOW\n");
+ dev_err(chip->card->dev,
+ "lx_buffer_give EB_RBUFFERS_TABLE_OVERFLOW\n");
if (err == EB_INVALID_STREAM)
- snd_printk(LXP "lx_buffer_give EB_INVALID_STREAM\n");
+ dev_err(chip->card->dev,
+ "lx_buffer_give EB_INVALID_STREAM\n");
if (err == EB_CMD_REFUSED)
- snd_printk(LXP "lx_buffer_give EB_CMD_REFUSED\n");
+ dev_err(chip->card->dev,
+ "lx_buffer_give EB_CMD_REFUSED\n");
done:
spin_unlock_irqrestore(&chip->msg_lock, flags);
chip->rmh.cmd[1] = (u32)(mute_mask >> (u64)32); /* hi part */
chip->rmh.cmd[2] = (u32)(mute_mask & (u64)0xFFFFFFFF); /* lo part */
- snd_printk("mute %x %x %x\n", chip->rmh.cmd[0], chip->rmh.cmd[1],
+ dev_dbg(chip->card->dev,
+ "mute %x %x %x\n", chip->rmh.cmd[0], chip->rmh.cmd[1],
chip->rmh.cmd[2]);
err = lx_message_send_atomic(chip, &chip->rmh);
}
if (irq_async) {
- /* snd_printd("interrupt: async event pending\n"); */
+ /* dev_dbg(chip->card->dev, "interrupt: async event pending\n"); */
*r_async_pending = 1;
}
if (eb_pending_in) {
*r_notified_in_pipe_mask = ((u64)stat[3] << 32)
+ stat[4];
- snd_printdd(LXP "interrupt: EOBI pending %llx\n",
+ dev_dbg(chip->card->dev, "interrupt: EOBI pending %llx\n",
*r_notified_in_pipe_mask);
}
if (eb_pending_out) {
*r_notified_out_pipe_mask = ((u64)stat[1] << 32)
+ stat[2];
- snd_printdd(LXP "interrupt: EOBO pending %llx\n",
+ dev_dbg(chip->card->dev, "interrupt: EOBO pending %llx\n",
*r_notified_out_pipe_mask);
}
u32 needed, freed;
u32 size_array[MAX_STREAM_BUFFER];
- snd_printdd("->lx_interrupt_request_new_buffer\n");
+ dev_dbg(chip->card->dev, "->lx_interrupt_request_new_buffer\n");
spin_lock_irqsave(&chip->lock, flags);
err = lx_buffer_ask(chip, 0, is_capture, &needed, &freed, size_array);
- snd_printdd(LXP "interrupt: needed %d, freed %d\n", needed, freed);
+ dev_dbg(chip->card->dev,
+ "interrupt: needed %d, freed %d\n", needed, freed);
unpack_pointer(buf, &buf_lo, &buf_hi);
err = lx_buffer_give(chip, 0, is_capture, period_bytes, buf_lo, buf_hi,
&buffer_index);
- snd_printdd(LXP "interrupt: gave buffer index %x on 0x%lx (%d bytes)\n",
+ dev_dbg(chip->card->dev,
+ "interrupt: gave buffer index %x on 0x%lx (%d bytes)\n",
buffer_index, (unsigned long)buf, period_bytes);
lx_stream->frame_pos = next_pos;
struct lx_stream *lx_stream = &chip->playback_stream;
int err;
- snd_printdd("->lx_tasklet_playback\n");
+ dev_dbg(chip->card->dev, "->lx_tasklet_playback\n");
err = lx_interrupt_request_new_buffer(chip, lx_stream);
if (err < 0)
- snd_printk(KERN_ERR LXP
+ dev_err(chip->card->dev,
"cannot request new buffer for playback\n");
snd_pcm_period_elapsed(lx_stream->stream);
struct lx_stream *lx_stream = &chip->capture_stream;
int err;
- snd_printdd("->lx_tasklet_capture\n");
+ dev_dbg(chip->card->dev, "->lx_tasklet_capture\n");
err = lx_interrupt_request_new_buffer(chip, lx_stream);
if (err < 0)
- snd_printk(KERN_ERR LXP
+ dev_err(chip->card->dev,
"cannot request new buffer for capture\n");
snd_pcm_period_elapsed(lx_stream->stream);
int err = 0;
if (notified_in_pipe_mask) {
- snd_printdd(LXP "requesting audio transfer for capture\n");
+ dev_dbg(chip->card->dev,
+ "requesting audio transfer for capture\n");
tasklet_hi_schedule(&chip->tasklet_capture);
}
if (notified_out_pipe_mask) {
- snd_printdd(LXP "requesting audio transfer for playback\n");
+ dev_dbg(chip->card->dev,
+ "requesting audio transfer for playback\n");
tasklet_hi_schedule(&chip->tasklet_playback);
}
spin_lock(&chip->lock);
- snd_printdd("**************************************************\n");
+ dev_dbg(chip->card->dev,
+ "**************************************************\n");
if (!lx_interrupt_ack(chip, &irqsrc, &async_pending, &async_escmd)) {
spin_unlock(&chip->lock);
- snd_printdd("IRQ_NONE\n");
+ dev_dbg(chip->card->dev, "IRQ_NONE\n");
return IRQ_NONE; /* this device did not cause the interrupt */
}
#if 0
if (irqsrc & MASK_SYS_STATUS_EOBI)
- snd_printdd(LXP "interrupt: EOBI\n");
+ dev_dgg(chip->card->dev, "interrupt: EOBI\n");
if (irqsrc & MASK_SYS_STATUS_EOBO)
- snd_printdd(LXP "interrupt: EOBO\n");
+ dev_dbg(chip->card->dev, "interrupt: EOBO\n");
if (irqsrc & MASK_SYS_STATUS_URUN)
- snd_printdd(LXP "interrupt: URUN\n");
+ dev_dbg(chip->card->dev, "interrupt: URUN\n");
if (irqsrc & MASK_SYS_STATUS_ORUN)
- snd_printdd(LXP "interrupt: ORUN\n");
+ dev_dbg(chip->card->dev, "interrupt: ORUN\n");
#endif
if (async_pending) {
¬ified_in_pipe_mask,
¬ified_out_pipe_mask);
if (err)
- snd_printk(KERN_ERR LXP
+ dev_err(chip->card->dev,
"error handling async events\n");
err = lx_interrupt_handle_audio_transfer(chip,
notified_out_pipe_mask
);
if (err)
- snd_printk(KERN_ERR LXP
+ dev_err(chip->card->dev,
"error during audio transfer\n");
}
*
* */
- snd_printdd("lx6464es: interrupt requests escmd handling\n");
+ dev_dbg(chip->card->dev, "interrupt requests escmd handling\n");
#endif
}
void lx_irq_enable(struct lx6464es *chip)
{
- snd_printdd("->lx_irq_enable\n");
+ dev_dbg(chip->card->dev, "->lx_irq_enable\n");
lx_irq_set(chip, 1);
}
void lx_irq_disable(struct lx6464es *chip)
{
- snd_printdd("->lx_irq_disable\n");
+ dev_dbg(chip->card->dev, "->lx_irq_disable\n");
lx_irq_set(chip, 0);
}