static void snd_line6_tp_ux1_complete
_playback_transfer (struct urb* urb,
struct pt_regs* regs)
{
snd_pcm_substream_t *substream = (snd_pcm_substream_t *)(urb->context);
struct snd_line6_tp_ux1 *chip = snd_pcm_substream_chip (substream);
snd_pcm_runtime_t *runtime = substream->runtime;
urb->dev = chip->dev;
urb->transfer_dma = runtime->dma_addr;
urb->transfer_buffer = usb_buffer_alloc (urb->dev, LINE6_TP_UX1_48000_16_PACKET_SIZE_OUT * 2, GFP_KERNEL, &urb->transfer_dma);
memcpy (urb->transfer_buffer, runtime->dma_area + chip->playback_pos * 2, LINE6_TP_UX1_48000_16_PACKET_SIZE_OUT * 2);
urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
usb_submit_urb (urb, GFP_ATOMIC);
chip->playback_pos += LINE6_TP_UX1_48000_16_PACKET_SIZE_OUT * 2 / 4;
snd_pcm_period_elapsed (substream);
}
don't care about freeing, etc. The problem is that it gives me a kind of beep sound for anything I play. No underruns, etc., just that sound!
URBs' data seems to be correct and also the transfer seems to happen with no particular problem. (no error checking right now however).
Another thing is this: I've seen that you decrement the hardware pointer when it reaches the end of a period, but when I try to do this, it gives me back garbage values, how is this possible?
What do you think I should do?
struct pt_regs* regs)
{
snd_pcm_substream_t *substream = (snd_pcm_substream_t *)(urb->context);
struct snd_line6_tp_ux1 *chip = snd_pcm_substream_chip (substream);
snd_pcm_runtime_t *runtime = substream->runtime;
urb->dev = chip->dev;
urb->transfer_dma = runtime->dma_addr;
urb->transfer_buffer = usb_buffer_alloc (urb->dev, LINE6_TP_UX1_48000_16_PACKET_SIZE_OUT * 2, GFP_KERNEL, &urb->transfer_dma);
memcpy (urb->transfer_buffer, runtime->dma_area + chip->playback_pos * 2, LINE6_TP_UX1_48000_16_PACKET_SIZE_OUT * 2);
urb->transfer_flags = URB_ISO_ASAP | URB_NO_TRANSFER_DMA_MAP;
usb_submit_urb (urb, GFP_ATOMIC);
chip->playback_pos += LINE6_TP_UX1_48000_16_PACKET_SIZE_OUT * 2 / 4;
snd_pcm_period_elapsed (substream);
}
don't care about freeing, etc. The problem is that it gives me a kind of beep sound for anything I play. No underruns, etc., just that sound!
URBs' data seems to be correct and also the transfer seems to happen with no particular problem. (no error checking right now however).
Another thing is this: I've seen that you decrement the hardware pointer when it reaches the end of a period, but when I try to do this, it gives me back garbage values, how is this possible?
What do you think I should do?
_______________________________________________ Alsa-devel mailing list Alsa-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.sourceforge.net/lists/listinfo/alsa-devel