mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 00:24:41 -04:00
Merge "asoc: add support to set ADM channels for SLIM_9_TX port"
This commit is contained in:
commit
fc0e7339fa
1 changed files with 8 additions and 2 deletions
|
|
@ -3138,7 +3138,7 @@ static int msm_routing_lsm_func_put(struct snd_kcontrol *kcontrol,
|
|||
|
||||
static const char *const adm_override_chs_text[] = {"Zero", "One", "Two"};
|
||||
|
||||
static SOC_ENUM_SINGLE_EXT_DECL(slim_7_rx_adm_override_chs,
|
||||
static SOC_ENUM_SINGLE_EXT_DECL(adm_override_chs,
|
||||
adm_override_chs_text);
|
||||
|
||||
static int msm_routing_adm_get_backend_idx(struct snd_kcontrol *kcontrol)
|
||||
|
|
@ -3147,6 +3147,8 @@ static int msm_routing_adm_get_backend_idx(struct snd_kcontrol *kcontrol)
|
|||
|
||||
if (strnstr(kcontrol->id.name, "SLIM7_RX", sizeof("SLIM7_RX"))) {
|
||||
backend_id = MSM_BACKEND_DAI_SLIMBUS_7_RX;
|
||||
} else if (strnstr(kcontrol->id.name, "SLIM9_TX", sizeof("SLIM9_TX"))) {
|
||||
backend_id = MSM_BACKEND_DAI_SLIMBUS_9_TX;
|
||||
} else {
|
||||
pr_err("%s: unsupported backend id: %s",
|
||||
__func__, kcontrol->id.name);
|
||||
|
|
@ -3155,6 +3157,7 @@ static int msm_routing_adm_get_backend_idx(struct snd_kcontrol *kcontrol)
|
|||
|
||||
return backend_id;
|
||||
}
|
||||
|
||||
static int msm_routing_adm_channel_config_get(
|
||||
struct snd_kcontrol *kcontrol,
|
||||
struct snd_ctl_elem_value *ucontrol)
|
||||
|
|
@ -3193,7 +3196,10 @@ static int msm_routing_adm_channel_config_put(
|
|||
}
|
||||
|
||||
static const struct snd_kcontrol_new adm_channel_config_controls[] = {
|
||||
SOC_ENUM_EXT("SLIM7_RX ADM Channels", slim_7_rx_adm_override_chs,
|
||||
SOC_ENUM_EXT("SLIM7_RX ADM Channels", adm_override_chs,
|
||||
msm_routing_adm_channel_config_get,
|
||||
msm_routing_adm_channel_config_put),
|
||||
SOC_ENUM_EXT("SLIM9_TX ADM Channels", adm_override_chs,
|
||||
msm_routing_adm_channel_config_get,
|
||||
msm_routing_adm_channel_config_put),
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue