Skip to content

Commit

Permalink
ASoC: rt5682: fix I2C/Soundwire dependencies
Browse files Browse the repository at this point in the history
If one of the two is a loadable module, the combined driver must
not be built-in:

aarch64-linux-ld: sound/soc/codecs/rt5682.o: in function `rt5682_sdw_hw_free':
rt5682.c:(.text+0xb34): undefined reference to `sdw_stream_remove_slave'
aarch64-linux-ld: sound/soc/codecs/rt5682.o: in function `rt5682_sdw_hw_params':
rt5682.c:(.text+0xe78): undefined reference to `sdw_stream_add_slave'

In particular, the soundwire driver must not be built-in if
CONFIG_I2C=m.

Fixes: 5549ea6 ("ASoC: rt5682: fix unmet dependencies")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20200428214642.3925004-1-arnd@arndb.de
Signed-off-by: Mark Brown <broonie@kernel.org>
  • Loading branch information
Arnd Bergmann authored and Mark Brown committed Apr 29, 2020
1 parent 087e390 commit fd443a2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sound/soc/codecs/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1137,10 +1137,13 @@ config SND_SOC_RT5677_SPI
config SND_SOC_RT5682
tristate
depends on I2C || SOUNDWIRE
depends on SOUNDWIRE || !SOUNDWIRE
depends on I2C || !I2C

config SND_SOC_RT5682_SDW
tristate "Realtek RT5682 Codec - SDW"
depends on SOUNDWIRE
depends on I2C || !I2C
select SND_SOC_RT5682
select REGMAP_SOUNDWIRE

Expand Down

0 comments on commit fd443a2

Please sign in to comment.