On Thu, Sep 10, 2015 at 06:42:45AM +0000, Kuninori Morimoto wrote:
This looks basically good, a few minor comments below but nothing major:
--- a/sound/soc/codecs/Kconfig +++ b/sound/soc/codecs/Kconfig @@ -319,6 +319,10 @@ config SND_SOC_AK4535 config SND_SOC_AK4554 tristate "AKM AK4554 CODEC"
+config SND_SOC_AK4613
- tristate "AKM AK4613 CODEC"
- depends on I2C
config SND_SOC_AK4641 tristate
You should also add this to SND_SOC_ALL_CODECS.
+static inline void ak4613_write(struct snd_soc_codec *codec, unsigned int reg,
unsigned int val)
+{
- struct device *dev = codec->dev;
- dev_dbg(dev, "reg %02x w %02x\n", reg, val);
- snd_soc_write(codec, reg, val);
+}
Please just use snd_soc_write() natively - there's a lot of trace support in regmap already which really should be adequate. If it's not then we need to review and improve that rather than open coding in drivers.
- spin_lock_irqsave(&priv->lock, flags);
- if ((NO_FMT == priv->fmt_ctrl) ||
Can this spinlock just be a mutex?
+static int ak4613_resume(struct snd_soc_codec *codec) +{
- struct regmap *regmap = dev_get_regmap(codec->dev, NULL);
- regcache_mark_dirty(regmap);
- regcache_sync(regmap);
You should really check errors here.