audio-kernel: set hwparams for dummy platform

Set runtime hwparams for dummy platform components.

Change-Id: I160f7fafe60d644bc05fb90d0be777bbac712066
Signed-off-by: Phani Kumar Uppalapati <quic_phaniu@quicinc.com>
This commit is contained in:
Phani Kumar Uppalapati
2022-11-18 12:21:32 -08:00
committed by Gerrit - the friendly Code Review server
parent dbc8b3c1e1
commit 7e16f6c859

View File

@@ -71,6 +71,17 @@ struct chmap_pdata {
struct snd_soc_dai *dai[MAX_CODEC_DAI];
};
static const struct snd_pcm_hardware dummy_dma_hardware = {
/* Random values to keep userspace happy when checking constraints */
.info = SNDRV_PCM_INFO_INTERLEAVED |
SNDRV_PCM_INFO_BLOCK_TRANSFER,
.buffer_bytes_max = 128*1024,
.period_bytes_min = PAGE_SIZE,
.period_bytes_max = PAGE_SIZE*2,
.periods_min = 2,
.periods_max = 128,
};
#define MAX_USR_INPUT 10
static int qos_vote_status;
@@ -516,6 +527,9 @@ int msm_common_snd_startup(struct snd_pcm_substream *substream)
return -EINVAL;
}
if (!rtd->dai_link->no_pcm)
snd_soc_set_runtime_hwparams(substream, &dummy_dma_hardware);
if (index >= 0) {
mutex_lock(&pdata->lock[index]);
if (pdata->mi2s_gpio_p[index]) {