1
0
Fork 0

ASoC: qcom: q6asm: pass codec profile to q6asm_open_write

Codec profile is required to be passed for WMA codecs so that we know
the codec profile present and tell DSP accordingly, so update this API
to pass the codec profile as argument

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Reviewed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20200316055221.1944464-4-vkoul@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
alistair/sensors
Vinod Koul 2020-03-16 11:22:15 +05:30 committed by Mark Brown
parent 20ff1456d2
commit 8504a72f7c
No known key found for this signature in database
GPG Key ID: 24D68B725D5487D0
3 changed files with 4 additions and 4 deletions

View File

@ -252,7 +252,7 @@ static int q6asm_dai_prepare(struct snd_soc_component *component,
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
ret = q6asm_open_write(prtd->audio_client, FORMAT_LINEAR_PCM,
prtd->bits_per_sample);
0, prtd->bits_per_sample);
} else if (substream->stream == SNDRV_PCM_STREAM_CAPTURE) {
ret = q6asm_open_read(prtd->audio_client, FORMAT_LINEAR_PCM,
prtd->bits_per_sample);
@ -654,7 +654,7 @@ static int q6asm_dai_compr_set_params(struct snd_compr_stream *stream,
prtd->bits_per_sample = 16;
if (dir == SND_COMPRESS_PLAYBACK) {
ret = q6asm_open_write(prtd->audio_client, params->codec.id,
prtd->bits_per_sample);
params->codec.profile, prtd->bits_per_sample);
if (ret < 0) {
dev_err(dev, "q6asm_open_write failed\n");

View File

@ -858,7 +858,7 @@ err:
* Return: Will be an negative value on error or zero on success
*/
int q6asm_open_write(struct audio_client *ac, uint32_t format,
uint16_t bits_per_sample)
u32 codec_profile, uint16_t bits_per_sample)
{
struct asm_stream_cmd_open_write_v3 *open;
struct apr_pkt *pkt;

View File

@ -55,7 +55,7 @@ void q6asm_audio_client_free(struct audio_client *ac);
int q6asm_write_async(struct audio_client *ac, uint32_t len, uint32_t msw_ts,
uint32_t lsw_ts, uint32_t flags);
int q6asm_open_write(struct audio_client *ac, uint32_t format,
uint16_t bits_per_sample);
u32 codec_profile, uint16_t bits_per_sample);
int q6asm_open_read(struct audio_client *ac, uint32_t format,
uint16_t bits_per_sample);