diff options
-rw-r--r-- | core.c | 6 | ||||
-rw-r--r-- | dummy/dummy.c | 6 | ||||
-rw-r--r-- | loopback/loopback.c | 2 | ||||
-rw-r--r-- | pcm.c | 18 | ||||
-rw-r--r-- | sound/avirt.h | 9 |
5 files changed, 12 insertions, 29 deletions
@@ -160,6 +160,12 @@ int snd_avirt_stream_set_map(struct snd_avirt_stream *stream, const char *map) return 0; } +/** + * snd_avirt_streams_get - Get AVIRT streams for a given Audio Path map + * @map: The Audio Path UID whose streams to find. + * @stream_array: To be populated with streams. + * @return: The number of streams found for the Audio Path. + */ static int snd_avirt_streams_get(const char *map, struct snd_avirt_stream_array *stream_array) { diff --git a/dummy/dummy.c b/dummy/dummy.c index f683b92..013fe97 100644 --- a/dummy/dummy.c +++ b/dummy/dummy.c @@ -31,7 +31,7 @@ MODULE_LICENSE("GPL v2"); #define DUMMY_PERIODS_MIN 1 #define DUMMY_PERIODS_MAX 8 -#define get_dummy_ops(substream) \ +#define get_dummy_ops(substream) \ (*(const struct dummy_timer_ops **)(substream)->runtime->private_data) /******************************************************************************* @@ -138,11 +138,11 @@ static void dummy_systimer_callback(struct timer_list *t) dpcm->elapsed = 0; spin_unlock_irqrestore(&dpcm->lock, flags); if (elapsed) - snd_avirt_pcm_period_elapsed(dpcm->substream); + snd_pcm_period_elapsed(dpcm->substream); } static snd_pcm_uframes_t - dummy_systimer_pointer(struct snd_pcm_substream *substream) +dummy_systimer_pointer(struct snd_pcm_substream *substream) { struct dummy_systimer_pcm *dpcm = substream->runtime->private_data; snd_pcm_uframes_t pos; diff --git a/loopback/loopback.c b/loopback/loopback.c index 3463989..de0f38a 100644 --- a/loopback/loopback.c +++ b/loopback/loopback.c @@ -508,7 +508,7 @@ static void loopback_timer_function(struct timer_list *t) dpcm->period_update_pending = 0; spin_unlock_irqrestore(&dpcm->cable->lock, flags); /* need to unlock before calling below */ - snd_avirt_pcm_period_elapsed(dpcm->substream); + snd_pcm_period_elapsed(dpcm->substream); return; } } @@ -33,20 +33,6 @@ #define PRIVATE_DATA(substream) \ ((struct snd_avirt_private_data *)substream->private_data) -/** - * snd_avirt_pcm_period_elapsed - PCM buffer complete callback - * @substreamid: pointer to ALSA PCM substream - * - * This should be called from a child Audio Path once it has finished - * processing the pcm buffer - */ -void snd_avirt_pcm_period_elapsed(struct snd_pcm_substream *substream) -{ - // Notify ALSA middle layer of the elapsed period boundary - snd_pcm_period_elapsed(substream); -} -EXPORT_SYMBOL_GPL(snd_avirt_pcm_period_elapsed); - /******************************************************************************* * ALSA PCM Callbacks ******************************************************************************/ @@ -103,9 +89,9 @@ static int pcm_open(struct snd_pcm_substream *substream) /** * pcm_close - Implements 'close' callback for PCM middle layer * @substream: pointer to ALSA PCM substream - * + * * This is called when a PCM substream is closed. - * + * * Returns 0 on success or error code otherwise. */ static int pcm_close(struct snd_pcm_substream *substream) diff --git a/sound/avirt.h b/sound/avirt.h index 138d0ca..8378004 100644 --- a/sound/avirt.h +++ b/sound/avirt.h @@ -128,13 +128,4 @@ int snd_avirt_audiopath_deregister(struct snd_avirt_audiopath *audiopath); */ struct snd_avirt_audiopath *snd_avirt_audiopath_get(const char *uid); -/** - * snd_avirt_pcm_period_elapsed - PCM buffer complete callback - * @substream: pointer to ALSA PCM substream - * - * This should be called from a child Audio Path once it has finished processing - * the PCM buffer - */ -void snd_avirt_pcm_period_elapsed(struct snd_pcm_substream *substream); - #endif // __SOUND_AVIRT_H |