diff options
author | Mark Brown <broonie@kernel.org> | 2023-04-11 17:17:18 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2023-04-11 17:17:18 +0300 |
commit | d1192184cc31d8f1fc6336d17a89f3e2926f284a (patch) | |
tree | 42c5518b3e7119447c9d85c1d2dfb73211c5420d /sound | |
parent | beed115c2ce78f990222a29abed042582df4e87c (diff) | |
parent | 24f934becf60598fdec9c9f2e06437c831ffa374 (diff) | |
download | linux-d1192184cc31d8f1fc6336d17a89f3e2926f284a.tar.xz |
ASoC: ep93xx: Prepare for DT transition
Merge series from Alexander Sverdlin <alexander.sverdlin@gmail.com>:
This is a preparatory series for EP93xx transition to DT. This patchset is
a pre-requisite and has been tested with the full DT patchset [1].
[1]. git://git.maquefel.me/linux.git branch ep93xx/6.2-rc4-v0
Alexander Sverdlin (3):
ASoC: ep93xx: i2s: move enable call to startup callback
ASoC: cs4271: flat regcache, trivial simplifications
ASoC: ep93xx: i2s: Make it individually selectable
sound/soc/cirrus/Kconfig | 6 +++++-
sound/soc/cirrus/ep93xx-i2s.c | 12 +++++++++++-
sound/soc/codecs/cs4271-i2c.c | 1 -
sound/soc/codecs/cs4271-spi.c | 1 -
sound/soc/codecs/cs4271.c | 4 ++--
5 files changed, 18 insertions(+), 6 deletions(-)
--
2.40.0
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/cirrus/Kconfig | 6 | ||||
-rw-r--r-- | sound/soc/cirrus/ep93xx-i2s.c | 12 | ||||
-rw-r--r-- | sound/soc/codecs/cs4271-i2c.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/cs4271-spi.c | 1 | ||||
-rw-r--r-- | sound/soc/codecs/cs4271.c | 4 |
5 files changed, 18 insertions, 6 deletions
diff --git a/sound/soc/cirrus/Kconfig b/sound/soc/cirrus/Kconfig index 34870c2d0cba..38a83c4dcc2d 100644 --- a/sound/soc/cirrus/Kconfig +++ b/sound/soc/cirrus/Kconfig @@ -8,7 +8,11 @@ config SND_EP93XX_SOC the EP93xx I2S or AC97 interfaces. config SND_EP93XX_SOC_I2S - tristate + tristate "I2S controller support for the Cirrus Logic EP93xx series" + depends on SND_EP93XX_SOC + help + Say Y or M if you want to add support for codecs attached to + the EP93xx I2S interface. if SND_EP93XX_SOC_I2S diff --git a/sound/soc/cirrus/ep93xx-i2s.c b/sound/soc/cirrus/ep93xx-i2s.c index 9760453d9d79..2abd1bce2290 100644 --- a/sound/soc/cirrus/ep93xx-i2s.c +++ b/sound/soc/cirrus/ep93xx-i2s.c @@ -208,6 +208,16 @@ static int ep93xx_i2s_dai_probe(struct snd_soc_dai *dai) return 0; } +static int ep93xx_i2s_startup(struct snd_pcm_substream *substream, + struct snd_soc_dai *dai) +{ + struct ep93xx_i2s_info *info = snd_soc_dai_get_drvdata(dai); + + ep93xx_i2s_enable(info, substream->stream); + + return 0; +} + static void ep93xx_i2s_shutdown(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) { @@ -348,7 +358,6 @@ static int ep93xx_i2s_hw_params(struct snd_pcm_substream *substream, if (err) return err; - ep93xx_i2s_enable(info, substream->stream); return 0; } @@ -397,6 +406,7 @@ static int ep93xx_i2s_resume(struct snd_soc_component *component) #endif static const struct snd_soc_dai_ops ep93xx_i2s_dai_ops = { + .startup = ep93xx_i2s_startup, .shutdown = ep93xx_i2s_shutdown, .hw_params = ep93xx_i2s_hw_params, .set_sysclk = ep93xx_i2s_set_sysclk, diff --git a/sound/soc/codecs/cs4271-i2c.c b/sound/soc/codecs/cs4271-i2c.c index 0e8a7cf0da50..4033be1c3bc1 100644 --- a/sound/soc/codecs/cs4271-i2c.c +++ b/sound/soc/codecs/cs4271-i2c.c @@ -17,7 +17,6 @@ static int cs4271_i2c_probe(struct i2c_client *client) config = cs4271_regmap_config; config.reg_bits = 8; - config.val_bits = 8; return cs4271_probe(&client->dev, devm_regmap_init_i2c(client, &config)); diff --git a/sound/soc/codecs/cs4271-spi.c b/sound/soc/codecs/cs4271-spi.c index 7ef0a66b7778..4feb80436bd9 100644 --- a/sound/soc/codecs/cs4271-spi.c +++ b/sound/soc/codecs/cs4271-spi.c @@ -17,7 +17,6 @@ static int cs4271_spi_probe(struct spi_device *spi) config = cs4271_regmap_config; config.reg_bits = 16; - config.val_bits = 8; config.read_flag_mask = 0x21; config.write_flag_mask = 0x20; diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 2021cf442606..188b8b43c524 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@ -689,8 +689,8 @@ const struct regmap_config cs4271_regmap_config = { .reg_defaults = cs4271_reg_defaults, .num_reg_defaults = ARRAY_SIZE(cs4271_reg_defaults), - .cache_type = REGCACHE_RBTREE, - + .cache_type = REGCACHE_FLAT, + .val_bits = 8, .volatile_reg = cs4271_volatile_reg, }; EXPORT_SYMBOL_GPL(cs4271_regmap_config); |