diff options
author | Clemens Ladisch <clemens@ladisch.de> | 2011-03-15 07:55:02 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-03-15 08:42:25 +0100 |
commit | be454366324b31922a2460c63c65d5e3cebe9641 (patch) | |
tree | 8e1651f134e9dca6560f1f03c6f88e0449e4004e /sound/firewire | |
parent | 31ef9134eb52636d383a7d0626cbbd345cb94f2f (diff) | |
download | linux-3.10-be454366324b31922a2460c63c65d5e3cebe9641.tar.gz linux-3.10-be454366324b31922a2460c63c65d5e3cebe9641.tar.bz2 linux-3.10-be454366324b31922a2460c63c65d5e3cebe9641.zip |
ALSA: firewire-lib: use no-info SYT for packets without SYT sample
In non-blocking mode, the SYT_INTERVAL is larger than the number of
audio frames in each packet, so there are packets that do not contain
any frame to which the SYT could be applied. For these packets, the
SYT must not be the timestamp of the next valid SYT frame, but the
special no-info SYT value.
This fixes broken playback on the FireWave at 44.1 kHz.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/firewire')
-rw-r--r-- | sound/firewire/amdtp.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/firewire/amdtp.c b/sound/firewire/amdtp.c index 09f70ee4d04..046007ddbca 100644 --- a/sound/firewire/amdtp.c +++ b/sound/firewire/amdtp.c @@ -228,11 +228,15 @@ static unsigned int calculate_syt(struct amdtp_out_stream *s, syt_offset = s->last_syt_offset - TICKS_PER_CYCLE; s->last_syt_offset = syt_offset; - syt_offset += TRANSFER_DELAY_TICKS - TICKS_PER_CYCLE; - syt = (cycle + syt_offset / TICKS_PER_CYCLE) << 12; - syt += syt_offset % TICKS_PER_CYCLE; + if (syt_offset < TICKS_PER_CYCLE) { + syt_offset += TRANSFER_DELAY_TICKS - TICKS_PER_CYCLE; + syt = (cycle + syt_offset / TICKS_PER_CYCLE) << 12; + syt += syt_offset % TICKS_PER_CYCLE; - return syt & 0xffff; + return syt & 0xffff; + } else { + return 0xffff; /* no info */ + } } static void amdtp_write_s32(struct amdtp_out_stream *s, |