From 9ecb93fb6b4474bee5e700e65663af15088c97c2 Mon Sep 17 00:00:00 2001 From: Hardik T Shah Date: Thu, 10 Apr 2014 18:03:52 +0530 Subject: Tinyalsa: add pcm_delay() ALSA supports reporting of pcm_delay, make that availble to the users of tinyalsa too Change-Id: Ic460f5c55137d263fdf7b142503d3bd52c4b7ebd Signed-off-by: Hardik T Shah Signed-off-by: Apelete Seketeli Signed-off-by: Vinod Koul --- include/tinyalsa/asoundlib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h index a85e810..eb3e4c4 100644 --- a/include/tinyalsa/asoundlib.h +++ b/include/tinyalsa/asoundlib.h @@ -205,6 +205,9 @@ int pcm_stop(struct pcm *pcm); int pcm_wait(struct pcm *pcm, int timeout); +/* Get the pcm delay */ +long pcm_get_delay(struct pcm *pcm); + /* * MIXER API */ -- cgit v1.2.3 From 4cddf19dfcf65e6fb1277a3230fd0fe509ec7e81 Mon Sep 17 00:00:00 2001 From: David Wagner Date: Wed, 2 Apr 2014 15:12:54 +0200 Subject: tinyalsa: add pcm_get_subdevice() The users of tinyalsa had no way of knowing on which subdevice a stream had been created. A new API, "unsigned int pcm_get_subdevice(struct *pcm)" returns it. This information is filled during the pcm_open() Change-Id: Ie866e10e06ce6691ede09e2ca46a24441723ea8b Signed-off-by: David Wagner Signed-off-by: Vinod Koul --- include/tinyalsa/asoundlib.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/tinyalsa/asoundlib.h b/include/tinyalsa/asoundlib.h index eb3e4c4..045c8b5 100644 --- a/include/tinyalsa/asoundlib.h +++ b/include/tinyalsa/asoundlib.h @@ -179,6 +179,9 @@ unsigned int pcm_bytes_to_frames(struct pcm *pcm, unsigned int bytes); int pcm_get_htimestamp(struct pcm *pcm, unsigned int *avail, struct timespec *tstamp); +/* Returns the subdevice on which the pcm has been opened */ +unsigned int pcm_get_subdevice(struct pcm *pcm); + /* Write data to the fifo. * Will start playback on the first write or on a write that * occurs after a fifo underrun. -- cgit v1.2.3