mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-03 09:01:52 -05:00
rate: dynamic update avail_min on slave
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>
This commit is contained in:
parent
88e4ae27bb
commit
ff1f669df4
3 changed files with 6 additions and 3 deletions
|
|
@ -535,8 +535,8 @@ static int snd_pcm_plugin_status(snd_pcm_t *pcm, snd_pcm_status_t * status)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int snd_pcm_plugin_may_wait_for_avail_min(snd_pcm_t *pcm,
|
int snd_pcm_plugin_may_wait_for_avail_min(snd_pcm_t *pcm,
|
||||||
snd_pcm_uframes_t avail)
|
snd_pcm_uframes_t avail)
|
||||||
{
|
{
|
||||||
if (pcm->stream == SND_PCM_STREAM_CAPTURE &&
|
if (pcm->stream == SND_PCM_STREAM_CAPTURE &&
|
||||||
pcm->access != SND_PCM_ACCESS_RW_INTERLEAVED &&
|
pcm->access != SND_PCM_ACCESS_RW_INTERLEAVED &&
|
||||||
|
|
|
||||||
|
|
@ -50,6 +50,8 @@ typedef struct {
|
||||||
/* make local functions really local */
|
/* make local functions really local */
|
||||||
#define snd_pcm_plugin_init \
|
#define snd_pcm_plugin_init \
|
||||||
snd1_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 \
|
#define snd_pcm_plugin_fast_ops \
|
||||||
snd1_pcm_plugin_fast_ops
|
snd1_pcm_plugin_fast_ops
|
||||||
#define snd_pcm_plugin_undo_read_generic \
|
#define snd_pcm_plugin_undo_read_generic \
|
||||||
|
|
@ -64,6 +66,7 @@ typedef struct {
|
||||||
void snd_pcm_plugin_init(snd_pcm_plugin_t *plugin);
|
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_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);
|
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;
|
extern const snd_pcm_fast_ops_t snd_pcm_plugin_fast_ops;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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_count = snd_pcm_generic_poll_descriptors_count,
|
||||||
.poll_descriptors = snd_pcm_generic_poll_descriptors,
|
.poll_descriptors = snd_pcm_generic_poll_descriptors,
|
||||||
.poll_revents = snd_pcm_rate_poll_revents,
|
.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 = {
|
static const snd_pcm_ops_t snd_pcm_rate_ops = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue