From: Christian Gromm Date: Mon, 28 Sep 2015 15:18:52 +0000 (+0200) Subject: staging: most: add missing channel initialization X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=31e91e0f40547816f9256d5865d39d504706ad06;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git staging: most: add missing channel initialization This patch adds missing initialization of channel count for 8-bit mono audio resolution. Signed-off-by: Christian Gromm Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/most/aim-sound/sound.c b/drivers/staging/most/aim-sound/sound.c index a579c5b8831c..59e1294c31cb 100644 --- a/drivers/staging/most/aim-sound/sound.c +++ b/drivers/staging/most/aim-sound/sound.c @@ -504,6 +504,8 @@ static int audio_set_pcm_format(struct snd_pcm_hardware *pcm_hw, if (cfg->subbuffer_size != 1) goto error; pr_info("PCM format is 8-bit mono\n"); + pcm_hw->channels_min = 1; + pcm_hw->channels_max = 1; pcm_hw->formats = SNDRV_PCM_FMTBIT_S8; } else if (!strcmp(pcm_format, "2x16")) { if (cfg->subbuffer_size != 4)