From 0acef1799beace4dd38d41bda9df77e84a5fe398 Mon Sep 17 00:00:00 2001 From: Mark Farrugia Date: Sun, 7 Oct 2018 22:00:10 +1100 Subject: Remove blocksize from audiopath This is no longer needed in AVIRT, since it is only actually used for the ADSP Audio Path. Clean up white space, add function documentation, remove out of place debug prints Signed-off-by: Mark Farrugia --- alsa-pcm.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'alsa-pcm.c') diff --git a/alsa-pcm.c b/alsa-pcm.c index 5a30aff..958ccbb 100644 --- a/alsa-pcm.c +++ b/alsa-pcm.c @@ -49,7 +49,7 @@ static int pcm_open(struct snd_pcm_substream *substream) struct avirt_audiopath *audiopath; struct avirt_stream *stream; struct snd_pcm_hardware *hw; - unsigned int bytes_per_sample = 0, blocksize = 0, chans = 0; + unsigned int chans = 0; char *uid = "ap_fddsp"; // TD MF: Make this dynamic! audiopath = avirt_audiopath_get(uid); @@ -57,20 +57,9 @@ static int pcm_open(struct snd_pcm_substream *substream) uid); substream->private_data = audiopath; - blocksize = audiopath->blocksize; - // Copy the hw params from the audiopath to the pcm hw = &substream->runtime->hw; memcpy(hw, audiopath->hw, sizeof(struct snd_pcm_hardware)); - pr_info("%s %d %d", __func__, blocksize, hw->periods_max); - - if (hw->formats == SNDRV_PCM_FMTBIT_S16_LE) { - bytes_per_sample = 2; - } else { - pr_err("[%s] PCM only supports SNDRV_PCM_FMTBIT_S16_LE", - __func__); - return -EINVAL; - } stream = __avirt_stream_find_by_device(substream->pcm->device); if (IS_ERR_VALUE(stream) || !stream) -- cgit 1.2.3-korg