summaryrefslogtreecommitdiffstats
path: root/sound/usb/card.h
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2015-02-06 22:55:53 +0100
committerTakashi Iwai <tiwai@suse.de>2015-02-09 16:02:43 +0100
commitea33d359c4421f369443f6fee92a1e893541eb73 (patch)
treefb4894cc8b73df8929f36d746dc14367831060ce /sound/usb/card.h
parentALSA: hda: read trigger_timestamp immediately after starting DMA (diff)
downloadlinux-ea33d359c4421f369443f6fee92a1e893541eb73.tar.xz
linux-ea33d359c4421f369443f6fee92a1e893541eb73.zip
ALSA: usb: update trigger timestamp on first non-zero URB submitted
The first URBs are submitted during the prepare stage. When .trigger is called, the ALSA core saves a trigger tstamp that doesn't correspond to the actual time when the samples are submitted. The trigger_tstamp is now updated when the first data are submitted to avoid any time offsets. A usb-specific trigger_tstamp_pending_update flag is used for now, at some point the flag would need to move to the ALSA core, USB is not the only interface where silent block transfers are programmed as part of the prepare stage, with actual data enabled when .trigger is called. Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/card.h')
-rw-r--r--sound/usb/card.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/usb/card.h b/sound/usb/card.h
index 97acb906acc2..ef580b43f1e3 100644
--- a/sound/usb/card.h
+++ b/sound/usb/card.h
@@ -153,6 +153,8 @@ struct snd_usb_substream {
int channel;
int byte_idx;
} dsd_dop;
+
+ bool trigger_tstamp_pending_update; /* trigger timestamp being updated from initial estimate */
};
struct snd_usb_stream {