diff options
author | Mark Brown <broonie@kernel.org> | 2024-07-29 17:03:08 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-07-29 17:03:08 +0100 |
commit | 7803693988412380be095d228fb7b61f2d80e7c2 (patch) | |
tree | 494f2481e428ee8f92a8db3bb2be9826abbc9435 /sound/soc/codecs/wsa883x.c | |
parent | d0296adb0db13467408d6594de2a46faf0f98f8f (diff) | |
parent | a9d843e6b231e550f8141f27e930f90ded4edae2 (diff) | |
download | linux-7803693988412380be095d228fb7b61f2d80e7c2.tar.gz linux-7803693988412380be095d228fb7b61f2d80e7c2.tar.bz2 linux-7803693988412380be095d228fb7b61f2d80e7c2.zip |
ASoC: codecs: wsa88xx and wcd93xx: Soundwire port
Merge series from Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>:
Few cleanups to make the code more robust or readable. No functional
impact (compiled objects stay the same).
Diffstat (limited to 'sound/soc/codecs/wsa883x.c')
-rw-r--r-- | sound/soc/codecs/wsa883x.c | 42 |
1 files changed, 22 insertions, 20 deletions
diff --git a/sound/soc/codecs/wsa883x.c b/sound/soc/codecs/wsa883x.c index 63b27ade2bca..f0520a896706 100644 --- a/sound/soc/codecs/wsa883x.c +++ b/sound/soc/codecs/wsa883x.c @@ -480,33 +480,32 @@ static const struct soc_enum wsa_dev_mode_enum = /* 4 ports */ static struct sdw_dpn_prop wsa_sink_dpn_prop[WSA883X_MAX_SWR_PORTS] = { - { - /* DAC */ - .num = 1, + [WSA883X_PORT_DAC] = { + .num = WSA883X_PORT_DAC + 1, .type = SDW_DPN_SIMPLE, .min_ch = 1, .max_ch = 1, .simple_ch_prep_sm = true, .read_only_wordlength = true, - }, { - /* COMP */ - .num = 2, + }, + [WSA883X_PORT_COMP] = { + .num = WSA883X_PORT_COMP + 1, .type = SDW_DPN_SIMPLE, .min_ch = 1, .max_ch = 1, .simple_ch_prep_sm = true, .read_only_wordlength = true, - }, { - /* BOOST */ - .num = 3, + }, + [WSA883X_PORT_BOOST] = { + .num = WSA883X_PORT_BOOST + 1, .type = SDW_DPN_SIMPLE, .min_ch = 1, .max_ch = 1, .simple_ch_prep_sm = true, .read_only_wordlength = true, - }, { - /* VISENSE */ - .num = 4, + }, + [WSA883X_PORT_VISENSE] = { + .num = WSA883X_PORT_VISENSE + 1, .type = SDW_DPN_SIMPLE, .min_ch = 1, .max_ch = 1, @@ -516,17 +515,20 @@ static struct sdw_dpn_prop wsa_sink_dpn_prop[WSA883X_MAX_SWR_PORTS] = { }; static const struct sdw_port_config wsa883x_pconfig[WSA883X_MAX_SWR_PORTS] = { - { - .num = 1, + [WSA883X_PORT_DAC] = { + .num = WSA883X_PORT_DAC + 1, .ch_mask = 0x1, - }, { - .num = 2, + }, + [WSA883X_PORT_COMP] = { + .num = WSA883X_PORT_COMP + 1, .ch_mask = 0xf, - }, { - .num = 3, + }, + [WSA883X_PORT_BOOST] = { + .num = WSA883X_PORT_BOOST + 1, .ch_mask = 0x3, - }, { /* IV feedback */ - .num = 4, + }, + [WSA883X_PORT_VISENSE] = { + .num = WSA883X_PORT_VISENSE + 1, .ch_mask = 0x3, }, }; |