ASoC : Add macro to differentiate auto code

Macro needed for differentiation of auto code as the
file is shared for non auto code as well.

Signed-off-by: Manoj Kumar N D <quic_mnd@quicinc.com>
Change-Id: I8b464d5cacd2b5bcf51c54a3e50c930d9cb54e41
This commit is contained in:
Manoj Kumar N D 2024-01-03 13:24:35 +05:30
commit 70a4c76545
4 changed files with 30 additions and 4 deletions

View file

@ -2,7 +2,7 @@
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
*
* Changes from Qualcomm Innovation Center are provided under the following license:
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
@ -5218,8 +5218,13 @@ static int msm_compr_channel_mixer_cfg_ctl_put(struct snd_kcontrol *kcontrol,
if (prtd && prtd->audio_client) {
stream_id = prtd->audio_client->session;
be_id = chmixer_pspd->port_idx;
#ifdef CONFIG_PLATFORM_AUTO
msm_pcm_routing_set_channel_mixer_runtime(fe_id, be_id,
stream_id, session_type, chmixer_pspd);
#else
msm_pcm_routing_set_channel_mixer_runtime(be_id,
stream_id, session_type, chmixer_pspd);
#endif
}
}

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2013-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
/*
* Add support for 24 and 32bit format for ASM loopback and playback session.
@ -1022,10 +1022,17 @@ static int msm_pcm_channel_mixer_cfg_ctl_put(struct snd_kcontrol *kcontrol,
if (prtd->audio_client) {
stream_id = prtd->audio_client->session;
be_id = chmixer_pspd->port_idx;
#ifdef CONFIG_PLATFORM_AUTO
msm_pcm_routing_set_channel_mixer_runtime(fe_id, be_id,
stream_id,
session_type,
chmixer_pspd);
#else
msm_pcm_routing_set_channel_mixer_runtime(be_id,
stream_id,
session_type,
chmixer_pspd);
#endif
}
}
mutex_unlock(&loopback_session_lock);

View file

@ -1,6 +1,6 @@
// SPDX-License-Identifier: GPL-2.0-only
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
/*
* Add support for 24 and 32bit format for ASM loopback and playback session.
@ -2681,10 +2681,17 @@ static int msm_pcm_channel_mixer_cfg_ctl_put(struct snd_kcontrol *kcontrol,
if (chmixer_pspd->enable && prtd && prtd->audio_client) {
stream_id = prtd->audio_client->session;
be_id = chmixer_pspd->port_idx;
#ifdef CONFIG_PLATFORM_AUTO
msm_pcm_routing_set_channel_mixer_runtime(fe_id, be_id,
stream_id,
session_type,
chmixer_pspd);
#else
msm_pcm_routing_set_channel_mixer_runtime(be_id,
stream_id,
session_type,
chmixer_pspd);
#endif
}
if (reset_override_out_ch_map)

View file

@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
* Copyright (c) 2022-2024 Qualcomm Innovation Center, Inc. All rights reserved.
*/
/*
* Add support for 24 and 32bit format for ASM loopback and playback session.
@ -818,10 +818,17 @@ int msm_pcm_routing_set_channel_mixer_cfg(
int fe_id, int session_type,
struct msm_pcm_channel_mixer *params);
#ifdef CONFIG_PLATFORM_AUTO
int msm_pcm_routing_set_channel_mixer_runtime(
int fe_id, int be_id, int session_id,
int session_type,
struct msm_pcm_channel_mixer *params);
#else
int msm_pcm_routing_set_channel_mixer_runtime(
int be_id, int session_id,
int session_type,
struct msm_pcm_channel_mixer *params);
#endif
int msm_pcm_routing_set_stream_ec_ref_chmix_cfg(
int fedai_id, struct msm_pcm_channel_mixer *cfg_data);