ASoC: sdw_utils: Add rt766/rt767 support
PATCH 2/3 ASoC: sdw_utils: Add rt766/rt767 support
From: Shuming Fan <[email protected]>
This patch adds the codec_info and route-related settings.
Signed-off-by Shuming Fan <[email protected]>
--- sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c | 6 + .../sdw_utils/soc_sdw_rt_sdca_jack_common.c | 8 + sound/soc/sdw_utils/soc_sdw_utils.c | 172 ++++++++++++++++++ 3 files changed, 186 insertions(+)
sound/soc/sdw_utils/soc_sdw_rt_mf_sdca.c +6 -0
@@ -33,6 +33,11 @@ static const struct snd_soc_dapm_route rt722_spk_map[] = { { "Speaker", NULL, "rt722 SPK" }, }; +static const struct snd_soc_dapm_route rt766_spk_map[] = { + {"Speaker" ,NULL ,"rt766 SPOL" }, + {"Speaker" ,NULL ,"rt766 SPOR" }, +}; +/* Structure to map codec names to respective route arrays and sizes */ struct codec_route_map { const char *codec_name;
@@ -45,6 +50,7 @@ static const struct codec_route_map codec_routes[] = { { "rt712", rt712_spk_map, ARRAY_SIZE(rt712_spk_map) }, { "rt721", rt721_spk_map, ARRAY_SIZE(rt721_spk_map) }, { "rt722", rt722_spk_map, ARRAY_SIZE(rt722_spk_map) }, + { "rt766", rt766_spk_map, ARRAY_SIZE(rt766_spk_map) }, };static const struct codec_route_map *get_codec_route_map (const char *codec_name)
sound/soc/sdw_utils/soc_sdw_rt_sdca_jack_common.c +8 -0
@@ -70,6 +70,11 @@ static const struct snd_soc_dapm_route rt722_sdca_map[] = { { "rt722 MIC2", NULL, "Headset Mic" }, }; +static const struct snd_soc_dapm_route rt766_sdca_map[] = { + { "Headphone", NULL, "rt766 HP" }, + { "rt766 MIC2", NULL, "Headset Mic" }, +}; + static struct snd_soc_jack_pin rt_sdca_jack_pins[] = { { .pin = "Headphone",
@@ -133,6 +138,9 @@ int asoc_sdw_rt_sdca_jack_rtd_init(struct snd_soc_pcm_runtime *rtd, struct snd_s }else if (strstr (component->name_prefix,"rt722" )) { ret =snd_soc_dapm_add_routes (dapm, rt722_sdca_map,ARRAY_SIZE (rt722_sdca_map)); + }else if (strstr (component->name_prefix,"rt766" )) { + ret =snd_soc_dapm_add_routes (dapm, rt766_sdca_map, +ARRAY_SIZE (rt766_sdca_map)); }else {dev_err (card->dev,"%s is not supported\n" , component->name_prefix);return -EINVAL ;
sound/soc/sdw_utils/soc_sdw_utils.c +172 -0
178 lines not on this page · raw message
Signature · 1 line
2.54.0