Merge series "ASoC: cleanup / tidyup soc-pcm/core/component" from Kuninori Morimoto...
authorMark Brown <broonie@kernel.org>
Mon, 18 Oct 2021 20:10:09 +0000 (21:10 +0100)
committerMark Brown <broonie@kernel.org>
Mon, 18 Oct 2021 20:10:09 +0000 (21:10 +0100)
Hi Mark

These are not a big deal, but cleanup / tidyup patch for ALSA SoC.

Kuninori Morimoto (5):
  ASoC: soc-pcm: tidyup soc_pcm_hw_clean() - step1
  ASoC: soc-pcm: tidyup soc_pcm_hw_clean() - step2
  ASoC: soc-component: add snd_soc_component_is_codec()
  ASoC: soc-core: tidyup empty function
  ASoC: soc-core: accept zero format at snd_soc_runtime_set_dai_fmt()

 include/sound/soc-component.h         |  5 +++
 sound/soc/generic/simple-card-utils.c |  4 +--
 sound/soc/meson/meson-codec-glue.c    |  3 --
 sound/soc/soc-core.c                  | 51 ++++++++-------------------
 sound/soc/soc-pcm.c                   | 13 +++----
 5 files changed, 26 insertions(+), 50 deletions(-)

--
2.25.1

Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml
sound/soc/codecs/tlv320aic32x4-i2c.c
sound/soc/codecs/tlv320aic32x4-spi.c
sound/soc/codecs/tlv320aic32x4.c
sound/soc/codecs/tlv320aic32x4.h
sound/soc/meson/meson-card-utils.c
sound/soc/rockchip/rockchip_i2s_tdm.c

index 5e9fe06..7a25bc9 100644 (file)
@@ -74,7 +74,7 @@ examples:
     #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/interrupt-controller/irq.h>
     #include <dt-bindings/power/mt8192-power.h>
-    #include <dt-bindings/reset-controller/mt8192-resets.h>
+    #include <dt-bindings/reset/mt8192-resets.h>
 
     afe: mt8192-afe-pcm {
         compatible = "mediatek,mt8192-audio";
index 04ad383..ed70e3d 100644 (file)
@@ -44,7 +44,9 @@ static int aic32x4_i2c_probe(struct i2c_client *i2c,
 
 static int aic32x4_i2c_remove(struct i2c_client *i2c)
 {
-       return aic32x4_remove(&i2c->dev);
+       aic32x4_remove(&i2c->dev);
+
+       return 0;
 }
 
 static const struct i2c_device_id aic32x4_i2c_id[] = {
index e81c729..a8958cd 100644 (file)
@@ -48,7 +48,9 @@ static int aic32x4_spi_probe(struct spi_device *spi)
 
 static int aic32x4_spi_remove(struct spi_device *spi)
 {
-       return aic32x4_remove(&spi->dev);
+       aic32x4_remove(&spi->dev);
+
+       return 0;
 }
 
 static const struct spi_device_id aic32x4_spi_id[] = {
index d39c7d5..8f42fd7 100644 (file)
@@ -1418,13 +1418,11 @@ err_disable_regulators:
 }
 EXPORT_SYMBOL(aic32x4_probe);
 
-int aic32x4_remove(struct device *dev)
+void aic32x4_remove(struct device *dev)
 {
        struct aic32x4_priv *aic32x4 = dev_get_drvdata(dev);
 
        aic32x4_disable_regulators(aic32x4);
-
-       return 0;
 }
 EXPORT_SYMBOL(aic32x4_remove);
 
index e9fd2e5..4de5bd9 100644 (file)
@@ -18,7 +18,7 @@ enum aic32x4_type {
 
 extern const struct regmap_config aic32x4_regmap_config;
 int aic32x4_probe(struct device *dev, struct regmap *regmap);
-int aic32x4_remove(struct device *dev);
+void aic32x4_remove(struct device *dev);
 int aic32x4_register_clocks(struct device *dev, const char *mclk_name);
 
 /* tlv320aic32x4 register space (in decimal to match datasheet) */
index 415cc00..29b0174 100644 (file)
@@ -302,6 +302,7 @@ int meson_card_probe(struct platform_device *pdev)
 
        priv->card.owner = THIS_MODULE;
        priv->card.dev = dev;
+       priv->card.driver_name = dev->driver->name;
        priv->match_data = data;
 
        ret = snd_soc_of_parse_card_name(&priv->card, "model");
index 98424da..e8dee1f 100644 (file)
@@ -357,7 +357,7 @@ static void rockchip_snd_txrxctrl(struct snd_pcm_substream *substream,
                else
                        rockchip_disable_rde(i2s_tdm->regmap);
 
-               if (--i2s_tdm->refcount) {
+               if (--i2s_tdm->refcount == 0) {
                        rockchip_snd_xfer_clear(i2s_tdm,
                                                I2S_CLR_TXC | I2S_CLR_RXC);
                }