ALSA: firewire-lib/dice: add arrangements of PCM pointer and interrupts for Dice quirk
In IEC 61883-6, one data block transfers one event. In ALSA, the event equals one PCM frame, hence one data block transfers one PCM frame. But Dice has a quirk at higher sampling rate (176.4/192.0 kHz) that one data block transfers two PCM frames. Commit10550bea44
("ALSA: dice/firewire-lib: Keep dualwire mode but obsolete CIP_HI_DUALWIRE") moved some codes related to this quirk into Dice driver. But the commit forgot to add arrangements for PCM period interrupts and DMA pointer updates. As a result, Dice driver cannot work correctly at higher sampling rate. This commit adds 'double_pcm_frames' parameter to amdtp structure for this quirk. When this parameter is set, PCM period interrupts and DMA pointer updates occur at double speed than in IEC 61883-6. Reported-by: Daniel Robbins <drobbins@funtoo.org> Fixes:10550bea44
("ALSA: dice/firewire-lib: Keep dualwire mode but obsolete CIP_HI_DUALWIRE") Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Cc: <stable@vger.kernel.org> # 3.16 Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:

committed by
Takashi Iwai

parent
1033eb5b5a
commit
65845f29be
@@ -507,7 +507,16 @@ static void amdtp_pull_midi(struct amdtp_stream *s,
|
||||
static void update_pcm_pointers(struct amdtp_stream *s,
|
||||
struct snd_pcm_substream *pcm,
|
||||
unsigned int frames)
|
||||
{ unsigned int ptr;
|
||||
{
|
||||
unsigned int ptr;
|
||||
|
||||
/*
|
||||
* In IEC 61883-6, one data block represents one event. In ALSA, one
|
||||
* event equals to one PCM frame. But Dice has a quirk to transfer
|
||||
* two PCM frames in one data block.
|
||||
*/
|
||||
if (s->double_pcm_frames)
|
||||
frames *= 2;
|
||||
|
||||
ptr = s->pcm_buffer_pointer + frames;
|
||||
if (ptr >= pcm->runtime->buffer_size)
|
||||
|
Reference in New Issue
Block a user