diff options
author | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-09-11 11:50:43 +1000 |
---|---|---|
committer | Mark Farrugia <mark.farrugia@fiberdyne.com.au> | 2018-10-26 17:27:33 +1100 |
commit | ae40030429b19a8d22517e99bd604cac8b37fd6e (patch) | |
tree | eb0508e73710596db1c5259ed97a3349aeb65ab1 /alsa-pcm.c | |
parent | 93db730a4d435e835d144e3393088968e1645c87 (diff) |
Remove configure_pcm function, absorb into pcm_open
No longer any need for the configure_pcm function in it's current form.
Signed-off-by: Mark Farrugia <mark.farrugia@fiberdyne.com.au>
Diffstat (limited to 'alsa-pcm.c')
-rw-r--r-- | alsa-pcm.c | 34 |
1 files changed, 10 insertions, 24 deletions
@@ -22,12 +22,19 @@ } \ } while (0) +/******************************************************************************* + * ALSA PCM Callbacks + ******************************************************************************/ /** - * configure_pcm - set up substream properties from user configuration + * pcm_open - Implements 'open' callback for PCM middle layer * @substream: pointer to ALSA PCM substream - * @return 0 on success or error code otherwise + * + * This is called when an ALSA PCM substream is opened. The substream device is + * configured here. + * + * Returns 0 on success or error code otherwise. */ -static int configure_pcm(struct snd_pcm_substream *substream) +static int pcm_open(struct snd_pcm_substream *substream) { struct avirt_alsa_devconfig *config; struct avirt_audiopath *audiopath; @@ -74,27 +81,6 @@ static int configure_pcm(struct snd_pcm_substream *substream) hw->period_bytes_min = blocksize * bytes_per_sample * config->channels; hw->period_bytes_max = blocksize * bytes_per_sample * config->channels; - return 0; -} - -/******************************************************************************* - * ALSA PCM Callbacks - ******************************************************************************/ -/** - * pcm_open - Implements 'open' callback for PCM middle layer - * @substream: pointer to ALSA PCM substream - * - * This is called when an ALSA PCM substream is opened. The substream device is - * configured here. - * - * Returns 0 on success or error code otherwise. - */ -static int pcm_open(struct snd_pcm_substream *substream) -{ - DINFO(AP_LOGNAME, ""); - // Setup the pcm device based on the configuration assigned - CHK_ERR_V(configure_pcm(substream), "Failed to setup pcm device"); - // Do additional Audio Path 'open' callback DO_AUDIOPATH_CB(open, substream); |