OSDN Git Service
codecs/rt5640: Cleanup: unify Stereo / Mono ADC handling
Cleanup: no functional changes intended.
The rt5640 codec is sometimes used with AIF1 connected to the SoC
and sometimes with AIF2 connected to the SoC.
The rt5640 UCM configuration deals with this by accepting input from
and sending output to both AIFs, relying on the kernels DAPM framework to
disable parts of the graph which are connected to the unconnected AIF.
On the output side we solve this by enabling both the IF1_DAC and
IF2_DAC data inputs to the digital 'Stereo DAC MIX' mixer.
On the input side handling this is somewhat more complicated, the
"Digital Mixer Path" leading to the IF1_ADC and IF2_ADC outputs
are entirely separate paths. To solve this we enable the active
input (DMIC or ADC) in both the Stereo ADC (connected to IF1_ADC)
and the Mono ADC (IF2_ADC) paths.
So far we've not been entirely consistent in our handling of
the Stereo ADC vs Mono ADC paths, this commit cleans this up:
1. Set the 'Mono ADC Capture Switch' to on once from EnableSeq.conf,
like we do for the 'ADC Capture Switch' instead of toggling it on/off
from the individual input Enable/Disable sequences.
2. Group all the 'Mono ADC ...' mixer cset calls together with their
stereo ADC counterparts.
3. Explicitly select DMIC L/R 1 for the Mono ADC L/R 2 Mux input, instead
of relying on this being the default.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>