Loading Documentation/devicetree/bindings/sound/maxim,max9759.txt 0 → 100644 +18 −0 Original line number Diff line number Diff line Maxim MAX9759 Speaker Amplifier =============================== Required properties: - compatible : "maxim,max9759" - shutdown-gpios : the gpio connected to the shutdown pin - mute-gpios : the gpio connected to the mute pin - gain-gpios : the 2 gpios connected to the g1 and g2 pins Example: max9759: analog-amplifier { compatible = "maxim,max9759"; shutdown-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>; mute-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; gain-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>, <&gpio3 25 GPIO_ACTIVE_LOW>; }; sound/soc/codecs/Kconfig +5 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_MAX98373 if I2C select SND_SOC_MAX9850 if I2C select SND_SOC_MAX9860 if I2C select SND_SOC_MAX9759 select SND_SOC_MAX9768 if I2C select SND_SOC_MAX9877 if I2C select SND_SOC_MC13783 if MFD_MC13XXX Loading Loading @@ -1223,6 +1224,10 @@ config SND_SOC_ZX_AUD96P22 config SND_SOC_LM4857 tristate config SND_SOC_MAX9759 tristate "Maxim MAX9759 speaker Amplifier" select GPIOLIB config SND_SOC_MAX9768 tristate Loading sound/soc/codecs/Makefile +2 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ snd-soc-jz4740-codec-objs := jz4740.o snd-soc-l3-objs := l3.o snd-soc-lm4857-objs := lm4857.o snd-soc-lm49453-objs := lm49453.o snd-soc-max9759-objs := max9759.o snd-soc-max9768-objs := max9768.o snd-soc-max98088-objs := max98088.o snd-soc-max98090-objs := max98090.o Loading Loading @@ -335,6 +336,7 @@ obj-$(CONFIG_SND_SOC_JZ4740_CODEC) += snd-soc-jz4740-codec.o obj-$(CONFIG_SND_SOC_L3) += snd-soc-l3.o obj-$(CONFIG_SND_SOC_LM4857) += snd-soc-lm4857.o obj-$(CONFIG_SND_SOC_LM49453) += snd-soc-lm49453.o obj-$(CONFIG_SND_SOC_MAX9759) += snd-soc-max9759.o obj-$(CONFIG_SND_SOC_MAX9768) += snd-soc-max9768.o obj-$(CONFIG_SND_SOC_MAX98088) += snd-soc-max98088.o obj-$(CONFIG_SND_SOC_MAX98090) += snd-soc-max98090.o Loading sound/soc/codecs/isabelle.c +25 −32 Original line number Diff line number Diff line Loading @@ -867,7 +867,7 @@ static const struct snd_soc_dapm_route isabelle_intercon[] = { static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute) { snd_soc_update_bits(dai->codec, ISABELLE_DAC1_SOFTRAMP_REG, snd_soc_component_update_bits(dai->component, ISABELLE_DAC1_SOFTRAMP_REG, BIT(4), (mute ? BIT(4) : 0)); return 0; Loading @@ -875,7 +875,7 @@ static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute) static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute) { snd_soc_update_bits(dai->codec, ISABELLE_DAC2_SOFTRAMP_REG, snd_soc_component_update_bits(dai->component, ISABELLE_DAC2_SOFTRAMP_REG, BIT(4), (mute ? BIT(4) : 0)); return 0; Loading @@ -883,13 +883,13 @@ static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute) static int isabelle_line_mute(struct snd_soc_dai *dai, int mute) { snd_soc_update_bits(dai->codec, ISABELLE_DAC3_SOFTRAMP_REG, snd_soc_component_update_bits(dai->component, ISABELLE_DAC3_SOFTRAMP_REG, BIT(4), (mute ? BIT(4) : 0)); return 0; } static int isabelle_set_bias_level(struct snd_soc_codec *codec, static int isabelle_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { switch (level) { Loading @@ -899,12 +899,12 @@ static int isabelle_set_bias_level(struct snd_soc_codec *codec, break; case SND_SOC_BIAS_STANDBY: snd_soc_update_bits(codec, ISABELLE_PWR_EN_REG, snd_soc_component_update_bits(component, ISABELLE_PWR_EN_REG, ISABELLE_CHIP_EN, BIT(0)); break; case SND_SOC_BIAS_OFF: snd_soc_update_bits(codec, ISABELLE_PWR_EN_REG, snd_soc_component_update_bits(component, ISABELLE_PWR_EN_REG, ISABELLE_CHIP_EN, 0); break; } Loading @@ -916,7 +916,7 @@ static int isabelle_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_soc_codec *codec = dai->codec; struct snd_soc_component *component = dai->component; u16 aif = 0; unsigned int fs_val = 0; Loading Loading @@ -952,7 +952,7 @@ static int isabelle_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } snd_soc_update_bits(codec, ISABELLE_FS_RATE_CFG_REG, snd_soc_component_update_bits(component, ISABELLE_FS_RATE_CFG_REG, ISABELLE_FS_RATE_MASK, fs_val); /* bit size */ Loading @@ -967,7 +967,7 @@ static int isabelle_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } snd_soc_update_bits(codec, ISABELLE_INTF_CFG_REG, snd_soc_component_update_bits(component, ISABELLE_INTF_CFG_REG, ISABELLE_AIF_LENGTH_MASK, aif); return 0; Loading @@ -975,7 +975,7 @@ static int isabelle_hw_params(struct snd_pcm_substream *substream, static int isabelle_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { struct snd_soc_codec *codec = codec_dai->codec; struct snd_soc_component *component = codec_dai->component; unsigned int aif_val = 0; switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { Loading Loading @@ -1003,7 +1003,7 @@ static int isabelle_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) return -EINVAL; } snd_soc_update_bits(codec, ISABELLE_INTF_CFG_REG, snd_soc_component_update_bits(component, ISABELLE_INTF_CFG_REG, (ISABELLE_AIF_MS | ISABELLE_AIF_FMT_MASK), aif_val); return 0; Loading Loading @@ -1087,17 +1087,17 @@ static struct snd_soc_dai_driver isabelle_dai[] = { }, }; static const struct snd_soc_codec_driver soc_codec_dev_isabelle = { static const struct snd_soc_component_driver soc_component_dev_isabelle = { .set_bias_level = isabelle_set_bias_level, .component_driver = { .controls = isabelle_snd_controls, .num_controls = ARRAY_SIZE(isabelle_snd_controls), .dapm_widgets = isabelle_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(isabelle_dapm_widgets), .dapm_routes = isabelle_intercon, .num_dapm_routes = ARRAY_SIZE(isabelle_intercon), }, .idle_bias_off = true, .use_pmdown_time = 1, .endianness = 1, .non_legacy_dai_naming = 1, }; static const struct regmap_config isabelle_regmap_config = { Loading Loading @@ -1125,23 +1125,17 @@ static int isabelle_i2c_probe(struct i2c_client *i2c, } i2c_set_clientdata(i2c, isabelle_regmap); ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_isabelle, isabelle_dai, ret = devm_snd_soc_register_component(&i2c->dev, &soc_component_dev_isabelle, isabelle_dai, ARRAY_SIZE(isabelle_dai)); if (ret < 0) { dev_err(&i2c->dev, "Failed to register codec: %d\n", ret); dev_err(&i2c->dev, "Failed to register component: %d\n", ret); return ret; } return ret; } static int isabelle_i2c_remove(struct i2c_client *client) { snd_soc_unregister_codec(&client->dev); return 0; } static const struct i2c_device_id isabelle_i2c_id[] = { { "isabelle", 0 }, { } Loading @@ -1153,7 +1147,6 @@ static struct i2c_driver isabelle_i2c_driver = { .name = "isabelle", }, .probe = isabelle_i2c_probe, .remove = isabelle_i2c_remove, .id_table = isabelle_i2c_id, }; Loading sound/soc/codecs/jz4740.c +22 −28 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ static const struct snd_soc_dapm_route jz4740_codec_dapm_routes[] = { static int jz4740_codec_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct jz4740_codec *jz4740_codec = snd_soc_codec_get_drvdata(dai->codec); struct jz4740_codec *jz4740_codec = snd_soc_component_get_drvdata(dai->component); uint32_t val; switch (params_rate(params)) { Loading Loading @@ -236,10 +236,10 @@ static void jz4740_codec_wakeup(struct regmap *regmap) regcache_sync(regmap); } static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec, static int jz4740_codec_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct jz4740_codec *jz4740_codec = snd_soc_codec_get_drvdata(codec); struct jz4740_codec *jz4740_codec = snd_soc_component_get_drvdata(component); struct regmap *regmap = jz4740_codec->regmap; unsigned int mask; unsigned int value; Loading @@ -257,7 +257,7 @@ static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec, break; case SND_SOC_BIAS_STANDBY: /* The only way to clear the suspend flag is to reset the codec */ if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) jz4740_codec_wakeup(regmap); mask = JZ4740_CODEC_1_VREF_DISABLE | Loading @@ -283,9 +283,9 @@ static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec, return 0; } static int jz4740_codec_dev_probe(struct snd_soc_codec *codec) static int jz4740_codec_dev_probe(struct snd_soc_component *component) { struct jz4740_codec *jz4740_codec = snd_soc_codec_get_drvdata(codec); struct jz4740_codec *jz4740_codec = snd_soc_component_get_drvdata(component); regmap_update_bits(jz4740_codec->regmap, JZ4740_REG_CODEC_1, JZ4740_CODEC_1_SW2_ENABLE, JZ4740_CODEC_1_SW2_ENABLE); Loading @@ -293,19 +293,21 @@ static int jz4740_codec_dev_probe(struct snd_soc_codec *codec) return 0; } static const struct snd_soc_codec_driver soc_codec_dev_jz4740_codec = { static const struct snd_soc_component_driver soc_codec_dev_jz4740_codec = { .probe = jz4740_codec_dev_probe, .set_bias_level = jz4740_codec_set_bias_level, .suspend_bias_off = true, .component_driver = { .controls = jz4740_codec_controls, .num_controls = ARRAY_SIZE(jz4740_codec_controls), .dapm_widgets = jz4740_codec_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(jz4740_codec_dapm_widgets), .dapm_routes = jz4740_codec_dapm_routes, .num_dapm_routes = ARRAY_SIZE(jz4740_codec_dapm_routes), }, .suspend_bias_off = 1, .idle_bias_on = 1, .use_pmdown_time = 1, .endianness = 1, .non_legacy_dai_naming = 1, }; static const struct regmap_config jz4740_codec_regmap_config = { Loading Loading @@ -343,7 +345,7 @@ static int jz4740_codec_probe(struct platform_device *pdev) platform_set_drvdata(pdev, jz4740_codec); ret = snd_soc_register_codec(&pdev->dev, ret = devm_snd_soc_register_component(&pdev->dev, &soc_codec_dev_jz4740_codec, &jz4740_codec_dai, 1); if (ret) dev_err(&pdev->dev, "Failed to register codec\n"); Loading @@ -351,16 +353,8 @@ static int jz4740_codec_probe(struct platform_device *pdev) return ret; } static int jz4740_codec_remove(struct platform_device *pdev) { snd_soc_unregister_codec(&pdev->dev); return 0; } static struct platform_driver jz4740_codec_driver = { .probe = jz4740_codec_probe, .remove = jz4740_codec_remove, .driver = { .name = "jz4740-codec", }, Loading Loading
Documentation/devicetree/bindings/sound/maxim,max9759.txt 0 → 100644 +18 −0 Original line number Diff line number Diff line Maxim MAX9759 Speaker Amplifier =============================== Required properties: - compatible : "maxim,max9759" - shutdown-gpios : the gpio connected to the shutdown pin - mute-gpios : the gpio connected to the mute pin - gain-gpios : the 2 gpios connected to the g1 and g2 pins Example: max9759: analog-amplifier { compatible = "maxim,max9759"; shutdown-gpios = <&gpio3 20 GPIO_ACTIVE_LOW>; mute-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>; gain-gpios = <&gpio3 23 GPIO_ACTIVE_LOW>, <&gpio3 25 GPIO_ACTIVE_LOW>; };
sound/soc/codecs/Kconfig +5 −0 Original line number Diff line number Diff line Loading @@ -101,6 +101,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_MAX98373 if I2C select SND_SOC_MAX9850 if I2C select SND_SOC_MAX9860 if I2C select SND_SOC_MAX9759 select SND_SOC_MAX9768 if I2C select SND_SOC_MAX9877 if I2C select SND_SOC_MC13783 if MFD_MC13XXX Loading Loading @@ -1223,6 +1224,10 @@ config SND_SOC_ZX_AUD96P22 config SND_SOC_LM4857 tristate config SND_SOC_MAX9759 tristate "Maxim MAX9759 speaker Amplifier" select GPIOLIB config SND_SOC_MAX9768 tristate Loading
sound/soc/codecs/Makefile +2 −0 Original line number Diff line number Diff line Loading @@ -84,6 +84,7 @@ snd-soc-jz4740-codec-objs := jz4740.o snd-soc-l3-objs := l3.o snd-soc-lm4857-objs := lm4857.o snd-soc-lm49453-objs := lm49453.o snd-soc-max9759-objs := max9759.o snd-soc-max9768-objs := max9768.o snd-soc-max98088-objs := max98088.o snd-soc-max98090-objs := max98090.o Loading Loading @@ -335,6 +336,7 @@ obj-$(CONFIG_SND_SOC_JZ4740_CODEC) += snd-soc-jz4740-codec.o obj-$(CONFIG_SND_SOC_L3) += snd-soc-l3.o obj-$(CONFIG_SND_SOC_LM4857) += snd-soc-lm4857.o obj-$(CONFIG_SND_SOC_LM49453) += snd-soc-lm49453.o obj-$(CONFIG_SND_SOC_MAX9759) += snd-soc-max9759.o obj-$(CONFIG_SND_SOC_MAX9768) += snd-soc-max9768.o obj-$(CONFIG_SND_SOC_MAX98088) += snd-soc-max98088.o obj-$(CONFIG_SND_SOC_MAX98090) += snd-soc-max98090.o Loading
sound/soc/codecs/isabelle.c +25 −32 Original line number Diff line number Diff line Loading @@ -867,7 +867,7 @@ static const struct snd_soc_dapm_route isabelle_intercon[] = { static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute) { snd_soc_update_bits(dai->codec, ISABELLE_DAC1_SOFTRAMP_REG, snd_soc_component_update_bits(dai->component, ISABELLE_DAC1_SOFTRAMP_REG, BIT(4), (mute ? BIT(4) : 0)); return 0; Loading @@ -875,7 +875,7 @@ static int isabelle_hs_mute(struct snd_soc_dai *dai, int mute) static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute) { snd_soc_update_bits(dai->codec, ISABELLE_DAC2_SOFTRAMP_REG, snd_soc_component_update_bits(dai->component, ISABELLE_DAC2_SOFTRAMP_REG, BIT(4), (mute ? BIT(4) : 0)); return 0; Loading @@ -883,13 +883,13 @@ static int isabelle_hf_mute(struct snd_soc_dai *dai, int mute) static int isabelle_line_mute(struct snd_soc_dai *dai, int mute) { snd_soc_update_bits(dai->codec, ISABELLE_DAC3_SOFTRAMP_REG, snd_soc_component_update_bits(dai->component, ISABELLE_DAC3_SOFTRAMP_REG, BIT(4), (mute ? BIT(4) : 0)); return 0; } static int isabelle_set_bias_level(struct snd_soc_codec *codec, static int isabelle_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { switch (level) { Loading @@ -899,12 +899,12 @@ static int isabelle_set_bias_level(struct snd_soc_codec *codec, break; case SND_SOC_BIAS_STANDBY: snd_soc_update_bits(codec, ISABELLE_PWR_EN_REG, snd_soc_component_update_bits(component, ISABELLE_PWR_EN_REG, ISABELLE_CHIP_EN, BIT(0)); break; case SND_SOC_BIAS_OFF: snd_soc_update_bits(codec, ISABELLE_PWR_EN_REG, snd_soc_component_update_bits(component, ISABELLE_PWR_EN_REG, ISABELLE_CHIP_EN, 0); break; } Loading @@ -916,7 +916,7 @@ static int isabelle_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct snd_soc_codec *codec = dai->codec; struct snd_soc_component *component = dai->component; u16 aif = 0; unsigned int fs_val = 0; Loading Loading @@ -952,7 +952,7 @@ static int isabelle_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } snd_soc_update_bits(codec, ISABELLE_FS_RATE_CFG_REG, snd_soc_component_update_bits(component, ISABELLE_FS_RATE_CFG_REG, ISABELLE_FS_RATE_MASK, fs_val); /* bit size */ Loading @@ -967,7 +967,7 @@ static int isabelle_hw_params(struct snd_pcm_substream *substream, return -EINVAL; } snd_soc_update_bits(codec, ISABELLE_INTF_CFG_REG, snd_soc_component_update_bits(component, ISABELLE_INTF_CFG_REG, ISABELLE_AIF_LENGTH_MASK, aif); return 0; Loading @@ -975,7 +975,7 @@ static int isabelle_hw_params(struct snd_pcm_substream *substream, static int isabelle_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) { struct snd_soc_codec *codec = codec_dai->codec; struct snd_soc_component *component = codec_dai->component; unsigned int aif_val = 0; switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { Loading Loading @@ -1003,7 +1003,7 @@ static int isabelle_set_dai_fmt(struct snd_soc_dai *codec_dai, unsigned int fmt) return -EINVAL; } snd_soc_update_bits(codec, ISABELLE_INTF_CFG_REG, snd_soc_component_update_bits(component, ISABELLE_INTF_CFG_REG, (ISABELLE_AIF_MS | ISABELLE_AIF_FMT_MASK), aif_val); return 0; Loading Loading @@ -1087,17 +1087,17 @@ static struct snd_soc_dai_driver isabelle_dai[] = { }, }; static const struct snd_soc_codec_driver soc_codec_dev_isabelle = { static const struct snd_soc_component_driver soc_component_dev_isabelle = { .set_bias_level = isabelle_set_bias_level, .component_driver = { .controls = isabelle_snd_controls, .num_controls = ARRAY_SIZE(isabelle_snd_controls), .dapm_widgets = isabelle_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(isabelle_dapm_widgets), .dapm_routes = isabelle_intercon, .num_dapm_routes = ARRAY_SIZE(isabelle_intercon), }, .idle_bias_off = true, .use_pmdown_time = 1, .endianness = 1, .non_legacy_dai_naming = 1, }; static const struct regmap_config isabelle_regmap_config = { Loading Loading @@ -1125,23 +1125,17 @@ static int isabelle_i2c_probe(struct i2c_client *i2c, } i2c_set_clientdata(i2c, isabelle_regmap); ret = snd_soc_register_codec(&i2c->dev, &soc_codec_dev_isabelle, isabelle_dai, ret = devm_snd_soc_register_component(&i2c->dev, &soc_component_dev_isabelle, isabelle_dai, ARRAY_SIZE(isabelle_dai)); if (ret < 0) { dev_err(&i2c->dev, "Failed to register codec: %d\n", ret); dev_err(&i2c->dev, "Failed to register component: %d\n", ret); return ret; } return ret; } static int isabelle_i2c_remove(struct i2c_client *client) { snd_soc_unregister_codec(&client->dev); return 0; } static const struct i2c_device_id isabelle_i2c_id[] = { { "isabelle", 0 }, { } Loading @@ -1153,7 +1147,6 @@ static struct i2c_driver isabelle_i2c_driver = { .name = "isabelle", }, .probe = isabelle_i2c_probe, .remove = isabelle_i2c_remove, .id_table = isabelle_i2c_id, }; Loading
sound/soc/codecs/jz4740.c +22 −28 Original line number Diff line number Diff line Loading @@ -157,7 +157,7 @@ static const struct snd_soc_dapm_route jz4740_codec_dapm_routes[] = { static int jz4740_codec_hw_params(struct snd_pcm_substream *substream, struct snd_pcm_hw_params *params, struct snd_soc_dai *dai) { struct jz4740_codec *jz4740_codec = snd_soc_codec_get_drvdata(dai->codec); struct jz4740_codec *jz4740_codec = snd_soc_component_get_drvdata(dai->component); uint32_t val; switch (params_rate(params)) { Loading Loading @@ -236,10 +236,10 @@ static void jz4740_codec_wakeup(struct regmap *regmap) regcache_sync(regmap); } static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec, static int jz4740_codec_set_bias_level(struct snd_soc_component *component, enum snd_soc_bias_level level) { struct jz4740_codec *jz4740_codec = snd_soc_codec_get_drvdata(codec); struct jz4740_codec *jz4740_codec = snd_soc_component_get_drvdata(component); struct regmap *regmap = jz4740_codec->regmap; unsigned int mask; unsigned int value; Loading @@ -257,7 +257,7 @@ static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec, break; case SND_SOC_BIAS_STANDBY: /* The only way to clear the suspend flag is to reset the codec */ if (snd_soc_codec_get_bias_level(codec) == SND_SOC_BIAS_OFF) if (snd_soc_component_get_bias_level(component) == SND_SOC_BIAS_OFF) jz4740_codec_wakeup(regmap); mask = JZ4740_CODEC_1_VREF_DISABLE | Loading @@ -283,9 +283,9 @@ static int jz4740_codec_set_bias_level(struct snd_soc_codec *codec, return 0; } static int jz4740_codec_dev_probe(struct snd_soc_codec *codec) static int jz4740_codec_dev_probe(struct snd_soc_component *component) { struct jz4740_codec *jz4740_codec = snd_soc_codec_get_drvdata(codec); struct jz4740_codec *jz4740_codec = snd_soc_component_get_drvdata(component); regmap_update_bits(jz4740_codec->regmap, JZ4740_REG_CODEC_1, JZ4740_CODEC_1_SW2_ENABLE, JZ4740_CODEC_1_SW2_ENABLE); Loading @@ -293,19 +293,21 @@ static int jz4740_codec_dev_probe(struct snd_soc_codec *codec) return 0; } static const struct snd_soc_codec_driver soc_codec_dev_jz4740_codec = { static const struct snd_soc_component_driver soc_codec_dev_jz4740_codec = { .probe = jz4740_codec_dev_probe, .set_bias_level = jz4740_codec_set_bias_level, .suspend_bias_off = true, .component_driver = { .controls = jz4740_codec_controls, .num_controls = ARRAY_SIZE(jz4740_codec_controls), .dapm_widgets = jz4740_codec_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(jz4740_codec_dapm_widgets), .dapm_routes = jz4740_codec_dapm_routes, .num_dapm_routes = ARRAY_SIZE(jz4740_codec_dapm_routes), }, .suspend_bias_off = 1, .idle_bias_on = 1, .use_pmdown_time = 1, .endianness = 1, .non_legacy_dai_naming = 1, }; static const struct regmap_config jz4740_codec_regmap_config = { Loading Loading @@ -343,7 +345,7 @@ static int jz4740_codec_probe(struct platform_device *pdev) platform_set_drvdata(pdev, jz4740_codec); ret = snd_soc_register_codec(&pdev->dev, ret = devm_snd_soc_register_component(&pdev->dev, &soc_codec_dev_jz4740_codec, &jz4740_codec_dai, 1); if (ret) dev_err(&pdev->dev, "Failed to register codec\n"); Loading @@ -351,16 +353,8 @@ static int jz4740_codec_probe(struct platform_device *pdev) return ret; } static int jz4740_codec_remove(struct platform_device *pdev) { snd_soc_unregister_codec(&pdev->dev); return 0; } static struct platform_driver jz4740_codec_driver = { .probe = jz4740_codec_probe, .remove = jz4740_codec_remove, .driver = { .name = "jz4740-codec", }, Loading