]> git.alsa-project.org Git - alsa-lib.git/commitdiff
rate: dynamic update avail_min on slave
authorAndreas Pape <apape@de.adit-jv.com>
Mon, 19 Dec 2016 03:37:51 +0000 (12:37 +0900)
committerTakashi Iwai <tiwai@suse.de>
Mon, 2 Jan 2017 14:00:04 +0000 (15:00 +0100)
Signed-off-by: Andreas Pape <apape@de.adit-jv.com>
Signed-off-by: Jiada Wang <jiada_wang@mentor.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
src/pcm/pcm_plugin.c
src/pcm/pcm_plugin.h
src/pcm/pcm_rate.c

index 5b65ac3429a54cad510bad5736ee12b25bf0463d..ad4a1022accc107d020d32aad76f4f2da169cb9d 100644 (file)
@@ -535,8 +535,8 @@ static int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
        return 0;
 }
 
-static int snd_pcm_plugin_may_wait_for_avail_min(snd_pcm_t *pcm,
-                                                snd_pcm_uframes_t avail)
+int snd_pcm_plugin_may_wait_for_avail_min(snd_pcm_t *pcm,
+                                         snd_pcm_uframes_t avail)
 {
        if (pcm->stream == SND_PCM_STREAM_CAPTURE &&
            pcm->access != SND_PCM_ACCESS_RW_INTERLEAVED &&
index 217f0757ea5912977e47f10e77ff1e85f7f9e0e6..95aacb32d21e186d16fd6301812fabbb262f4cfa 100644 (file)
@@ -50,6 +50,8 @@ typedef struct {
 /* make local functions really local */
 #define snd_pcm_plugin_init \
        snd1_pcm_plugin_init
+#define snd_pcm_plugin_may_wait_for_avail_min \
+       snd1_pcm_plugin_may_wait_for_avail_min
 #define snd_pcm_plugin_fast_ops \
        snd1_pcm_plugin_fast_ops
 #define snd_pcm_plugin_undo_read_generic \
@@ -64,6 +66,7 @@ typedef struct {
 void snd_pcm_plugin_init(snd_pcm_plugin_t *plugin);
 snd_pcm_sframes_t snd_pcm_plugin_rewind(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
 snd_pcm_sframes_t snd_pcm_plugin_forward(snd_pcm_t *pcm, snd_pcm_uframes_t frames);
+int snd_pcm_plugin_may_wait_for_avail_min(snd_pcm_t *pcm, snd_pcm_uframes_t avail);
 
 extern const snd_pcm_fast_ops_t snd_pcm_plugin_fast_ops;
 
index 61cf9793047beb8aeecf6c41d44dd555fc0c284e..cbb76184bedb46743280933c6be41a41297ffdf4 100644 (file)
@@ -1213,7 +1213,7 @@ static const snd_pcm_fast_ops_t snd_pcm_rate_fast_ops = {
        .poll_descriptors_count = snd_pcm_generic_poll_descriptors_count,
        .poll_descriptors = snd_pcm_generic_poll_descriptors,
        .poll_revents = snd_pcm_rate_poll_revents,
-       .may_wait_for_avail_min = snd_pcm_generic_may_wait_for_avail_min,
+       .may_wait_for_avail_min = snd_pcm_plugin_may_wait_for_avail_min,
 };
 
 static const snd_pcm_ops_t snd_pcm_rate_ops = {