Message ID | 20191203141627.29471-1-olivier.moysan@st.com (mailing list archive) |
---|---|
State | Mainlined |
Commit | abe3b6727b653307c27870a2d4ecbf9de4e914a5 |
Headers | show |
Series | ASoC: cs42l51: add dac mux widget in codec routes | expand |
On Tue, Dec 03, 2019 at 03:16:27PM +0100, Olivier Moysan wrote: > - SND_SOC_DAPM_DAC_E("Left DAC", "Left HiFi Playback", > - CS42L51_POWER_CTL1, 5, 1, > - cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), > - SND_SOC_DAPM_DAC_E("Right DAC", "Right HiFi Playback", > - CS42L51_POWER_CTL1, 6, 1, > - cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), > + SND_SOC_DAPM_DAC_E("Left DAC", NULL, CS42L51_POWER_CTL1, 5, 1, > + cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), > + SND_SOC_DAPM_DAC_E("Right DAC", NULL, CS42L51_POWER_CTL1, 6, 1, > + cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), This looks like an unrelated formatting change?
Hello Mark, On 12/3/19 3:39 PM, Mark Brown wrote: > On Tue, Dec 03, 2019 at 03:16:27PM +0100, Olivier Moysan wrote: > >> - SND_SOC_DAPM_DAC_E("Left DAC", "Left HiFi Playback", >> - CS42L51_POWER_CTL1, 5, 1, >> - cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), >> - SND_SOC_DAPM_DAC_E("Right DAC", "Right HiFi Playback", >> - CS42L51_POWER_CTL1, 6, 1, >> - cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), >> + SND_SOC_DAPM_DAC_E("Left DAC", NULL, CS42L51_POWER_CTL1, 5, 1, >> + cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), >> + SND_SOC_DAPM_DAC_E("Right DAC", NULL, CS42L51_POWER_CTL1, 6, 1, >> + cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), > This looks like an unrelated formatting change? The reason of this change is to replace "HiFi Playback" by NULL, in order to connect DAC widget to DAC mux widget, instead of connecting it directly to Playback. Regards Olivier
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c index 55408c8fcb4e..e47758e4fb36 100644 --- a/sound/soc/codecs/cs42l51.c +++ b/sound/soc/codecs/cs42l51.c @@ -214,12 +214,10 @@ static const struct snd_soc_dapm_widget cs42l51_dapm_widgets[] = { SND_SOC_DAPM_ADC_E("Right ADC", "Right HiFi Capture", CS42L51_POWER_CTL1, 2, 1, cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), - SND_SOC_DAPM_DAC_E("Left DAC", "Left HiFi Playback", - CS42L51_POWER_CTL1, 5, 1, - cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), - SND_SOC_DAPM_DAC_E("Right DAC", "Right HiFi Playback", - CS42L51_POWER_CTL1, 6, 1, - cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), + SND_SOC_DAPM_DAC_E("Left DAC", NULL, CS42L51_POWER_CTL1, 5, 1, + cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), + SND_SOC_DAPM_DAC_E("Right DAC", NULL, CS42L51_POWER_CTL1, 6, 1, + cs42l51_pdn_event, SND_SOC_DAPM_PRE_POST_PMD), /* analog/mic */ SND_SOC_DAPM_INPUT("AIN1L"), @@ -255,6 +253,12 @@ static const struct snd_soc_dapm_route cs42l51_routes[] = { {"HPL", NULL, "Left DAC"}, {"HPR", NULL, "Right DAC"}, + {"Right DAC", NULL, "DAC Mux"}, + {"Left DAC", NULL, "DAC Mux"}, + + {"DAC Mux", "Direct PCM", "Playback"}, + {"DAC Mux", "DSP PCM", "Playback"}, + {"Left ADC", NULL, "Left PGA"}, {"Right ADC", NULL, "Right PGA"},
Add "DAC mux" DAPM widget in CS42l51 audio codec routes, to support DAC mux control and to remove error trace "DAC Mux has no paths" at widget creation. Note: ADC path of DAC mux is not routed in this patch. Signed-off-by: Olivier Moysan <olivier.moysan@st.com> --- sound/soc/codecs/cs42l51.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-)