Skip to content

Commit 051e887

Browse files
krzkbroonie
authored andcommitted
ASoC: codecs: tx-macro: split widgets per different LPASS versions
TX macro codec differs slightly between different Qualcomm Low Power Audio SubSystem (LPASS) block versions. In LPASS version 9.2 the register responsible for TX SMIC MUXn muxes is different, thus to properly support it, the driver needs to register different widgets per different LPASS version. Prepare for supporting this register difference by refactoring existing code: 1. Move few widgets (TX SMIC MUXn, TX SWR_ADCn, TX SWR_DMICn) out of common 'tx_macro_dapm_widgets[]' array to a new per-variant specific array 'tx_macro_dapm_widgets_v9[]'. 2. Move also related audio routes into new array. 3. Store pointers to these variant-specific arrays in new variant-data structure 'tx_macro_data'. 4. Add variant-specific widgets and routes in component probe, instead of driver probe. The change should have no real impact, except re-shuffling code and registering some widgets and audio routes in component probe, instead of driver probe. Signed-off-by: Krzysztof Kozlowski <[email protected]> Link: https://msgid.link/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent 0c4ebb2 commit 051e887

File tree

2 files changed

+232
-151
lines changed

2 files changed

+232
-151
lines changed

sound/soc/codecs/lpass-macro-common.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
/* The soundwire block should be internally reset at probe */
1212
#define LPASS_MACRO_FLAG_RESET_SWR BIT(1)
1313

14+
enum lpass_version {
15+
LPASS_VER_9_0_0,
16+
LPASS_VER_10_0_0,
17+
LPASS_VER_11_0_0,
18+
};
19+
1420
struct lpass_macro {
1521
struct device *macro_pd;
1622
struct device *dcodec_pd;

0 commit comments

Comments
 (0)