From 70a4c76545f3b03ff822c7d0054d052d582a078b Mon Sep 17 00:00:00 2001 From: Manoj Kumar N D Date: Wed, 3 Jan 2024 13:24:35 +0530 Subject: [PATCH] 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 Change-Id: I8b464d5cacd2b5bcf51c54a3e50c930d9cb54e41 --- asoc/msm-compress-q6-v2.c | 7 ++++++- asoc/msm-pcm-loopback-v2.c | 9 ++++++++- asoc/msm-pcm-q6-v2.c | 9 ++++++++- asoc/msm-pcm-routing-v2.h | 9 ++++++++- 4 files changed, 30 insertions(+), 4 deletions(-) diff --git a/asoc/msm-compress-q6-v2.c b/asoc/msm-compress-q6-v2.c index 70c34d5bdd7a..3fd1c9ecf8a6 100644 --- a/asoc/msm-compress-q6-v2.c +++ b/asoc/msm-compress-q6-v2.c @@ -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 } } diff --git a/asoc/msm-pcm-loopback-v2.c b/asoc/msm-pcm-loopback-v2.c index 33a5661ccbe5..6d9a3a11c968 100644 --- a/asoc/msm-pcm-loopback-v2.c +++ b/asoc/msm-pcm-loopback-v2.c @@ -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); diff --git a/asoc/msm-pcm-q6-v2.c b/asoc/msm-pcm-q6-v2.c index 5f764a2b36fd..2ef5e4c92158 100644 --- a/asoc/msm-pcm-q6-v2.c +++ b/asoc/msm-pcm-q6-v2.c @@ -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) diff --git a/asoc/msm-pcm-routing-v2.h b/asoc/msm-pcm-routing-v2.h index 40c0045284c7..6db54df75cd6 100644 --- a/asoc/msm-pcm-routing-v2.h +++ b/asoc/msm-pcm-routing-v2.h @@ -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);