Loading Documentation/devicetree/bindings/sound/es8328.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ This device supports both I2C and SPI. Required properties: - compatible : "everest,es8328" - compatible : Should be "everest,es8328" or "everest,es8388" - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V - AVDD-supply : Regulator providing analog supply voltage 3.3V - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V Loading include/sound/soc.h +7 −23 Original line number Diff line number Diff line Loading @@ -1645,37 +1645,21 @@ static inline struct snd_soc_platform *snd_soc_kcontrol_platform( int snd_soc_util_init(void); void snd_soc_util_exit(void); #define snd_soc_of_parse_card_name(card, propname) \ snd_soc_of_parse_card_name_from_node(card, NULL, propname) int snd_soc_of_parse_card_name_from_node(struct snd_soc_card *card, struct device_node *np, int snd_soc_of_parse_card_name(struct snd_soc_card *card, const char *propname); #define snd_soc_of_parse_audio_simple_widgets(card, propname)\ snd_soc_of_parse_audio_simple_widgets_from_node(card, NULL, propname) int snd_soc_of_parse_audio_simple_widgets_from_node(struct snd_soc_card *card, struct device_node *np, int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, const char *propname); int snd_soc_of_parse_tdm_slot(struct device_node *np, unsigned int *tx_mask, unsigned int *rx_mask, unsigned int *slots, unsigned int *slot_width); #define snd_soc_of_parse_audio_prefix(card, codec_conf, of_node, propname) \ snd_soc_of_parse_audio_prefix_from_node(card, NULL, codec_conf, \ of_node, propname) void snd_soc_of_parse_audio_prefix_from_node(struct snd_soc_card *card, struct device_node *np, void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, struct snd_soc_codec_conf *codec_conf, struct device_node *of_node, const char *propname); #define snd_soc_of_parse_audio_routing(card, propname) \ snd_soc_of_parse_audio_routing_from_node(card, NULL, propname) int snd_soc_of_parse_audio_routing_from_node(struct snd_soc_card *card, struct device_node *np, int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, const char *propname); unsigned int snd_soc_of_parse_daifmt(struct device_node *np, const char *prefix, struct device_node **bitclkmaster, Loading sound/soc/codecs/Kconfig +5 −3 Original line number Diff line number Diff line Loading @@ -525,14 +525,16 @@ config SND_SOC_HDMI_CODEC select HDMI config SND_SOC_ES8328 tristate "Everest Semi ES8328 CODEC" tristate config SND_SOC_ES8328_I2C tristate tristate "Everest Semi ES8328 CODEC (I2C)" depends on I2C select SND_SOC_ES8328 config SND_SOC_ES8328_SPI tristate tristate "Everest Semi ES8328 CODEC (SPI)" depends on SPI_MASTER select SND_SOC_ES8328 config SND_SOC_GTM601 Loading sound/soc/codecs/es8328-i2c.c +2 −0 Original line number Diff line number Diff line Loading @@ -20,12 +20,14 @@ static const struct i2c_device_id es8328_id[] = { { "es8328", 0 }, { "es8388", 0 }, { } }; MODULE_DEVICE_TABLE(i2c, es8328_id); static const struct of_device_id es8328_of_match[] = { { .compatible = "everest,es8328", }, { .compatible = "everest,es8388", }, { } }; MODULE_DEVICE_TABLE(of, es8328_of_match); Loading sound/soc/codecs/es8328.c +14 −6 Original line number Diff line number Diff line Loading @@ -589,9 +589,21 @@ static int es8328_set_dai_fmt(struct snd_soc_dai *codec_dai, u8 dac_mode = 0; u8 adc_mode = 0; /* set master/slave audio interface */ if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBM_CFM) switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: /* Master serial port mode, with BCLK generated automatically */ snd_soc_update_bits(codec, ES8328_MASTERMODE, ES8328_MASTERMODE_MSC, ES8328_MASTERMODE_MSC); break; case SND_SOC_DAIFMT_CBS_CFS: /* Slave serial port mode */ snd_soc_update_bits(codec, ES8328_MASTERMODE, ES8328_MASTERMODE_MSC, 0); break; default: return -EINVAL; } /* interface format */ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { Loading Loading @@ -620,10 +632,6 @@ static int es8328_set_dai_fmt(struct snd_soc_dai *codec_dai, snd_soc_update_bits(codec, ES8328_ADCCONTROL4, ES8328_ADCCONTROL4_ADCFORMAT_MASK, adc_mode); /* Master serial port mode, with BCLK generated automatically */ snd_soc_update_bits(codec, ES8328_MASTERMODE, ES8328_MASTERMODE_MSC, ES8328_MASTERMODE_MSC); return 0; } Loading Loading
Documentation/devicetree/bindings/sound/es8328.txt +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ This device supports both I2C and SPI. Required properties: - compatible : "everest,es8328" - compatible : Should be "everest,es8328" or "everest,es8388" - DVDD-supply : Regulator providing digital core supply voltage 1.8 - 3.6V - AVDD-supply : Regulator providing analog supply voltage 3.3V - PVDD-supply : Regulator providing digital IO supply voltage 1.8 - 3.6V Loading
include/sound/soc.h +7 −23 Original line number Diff line number Diff line Loading @@ -1645,37 +1645,21 @@ static inline struct snd_soc_platform *snd_soc_kcontrol_platform( int snd_soc_util_init(void); void snd_soc_util_exit(void); #define snd_soc_of_parse_card_name(card, propname) \ snd_soc_of_parse_card_name_from_node(card, NULL, propname) int snd_soc_of_parse_card_name_from_node(struct snd_soc_card *card, struct device_node *np, int snd_soc_of_parse_card_name(struct snd_soc_card *card, const char *propname); #define snd_soc_of_parse_audio_simple_widgets(card, propname)\ snd_soc_of_parse_audio_simple_widgets_from_node(card, NULL, propname) int snd_soc_of_parse_audio_simple_widgets_from_node(struct snd_soc_card *card, struct device_node *np, int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card, const char *propname); int snd_soc_of_parse_tdm_slot(struct device_node *np, unsigned int *tx_mask, unsigned int *rx_mask, unsigned int *slots, unsigned int *slot_width); #define snd_soc_of_parse_audio_prefix(card, codec_conf, of_node, propname) \ snd_soc_of_parse_audio_prefix_from_node(card, NULL, codec_conf, \ of_node, propname) void snd_soc_of_parse_audio_prefix_from_node(struct snd_soc_card *card, struct device_node *np, void snd_soc_of_parse_audio_prefix(struct snd_soc_card *card, struct snd_soc_codec_conf *codec_conf, struct device_node *of_node, const char *propname); #define snd_soc_of_parse_audio_routing(card, propname) \ snd_soc_of_parse_audio_routing_from_node(card, NULL, propname) int snd_soc_of_parse_audio_routing_from_node(struct snd_soc_card *card, struct device_node *np, int snd_soc_of_parse_audio_routing(struct snd_soc_card *card, const char *propname); unsigned int snd_soc_of_parse_daifmt(struct device_node *np, const char *prefix, struct device_node **bitclkmaster, Loading
sound/soc/codecs/Kconfig +5 −3 Original line number Diff line number Diff line Loading @@ -525,14 +525,16 @@ config SND_SOC_HDMI_CODEC select HDMI config SND_SOC_ES8328 tristate "Everest Semi ES8328 CODEC" tristate config SND_SOC_ES8328_I2C tristate tristate "Everest Semi ES8328 CODEC (I2C)" depends on I2C select SND_SOC_ES8328 config SND_SOC_ES8328_SPI tristate tristate "Everest Semi ES8328 CODEC (SPI)" depends on SPI_MASTER select SND_SOC_ES8328 config SND_SOC_GTM601 Loading
sound/soc/codecs/es8328-i2c.c +2 −0 Original line number Diff line number Diff line Loading @@ -20,12 +20,14 @@ static const struct i2c_device_id es8328_id[] = { { "es8328", 0 }, { "es8388", 0 }, { } }; MODULE_DEVICE_TABLE(i2c, es8328_id); static const struct of_device_id es8328_of_match[] = { { .compatible = "everest,es8328", }, { .compatible = "everest,es8388", }, { } }; MODULE_DEVICE_TABLE(of, es8328_of_match); Loading
sound/soc/codecs/es8328.c +14 −6 Original line number Diff line number Diff line Loading @@ -589,9 +589,21 @@ static int es8328_set_dai_fmt(struct snd_soc_dai *codec_dai, u8 dac_mode = 0; u8 adc_mode = 0; /* set master/slave audio interface */ if ((fmt & SND_SOC_DAIFMT_MASTER_MASK) != SND_SOC_DAIFMT_CBM_CFM) switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) { case SND_SOC_DAIFMT_CBM_CFM: /* Master serial port mode, with BCLK generated automatically */ snd_soc_update_bits(codec, ES8328_MASTERMODE, ES8328_MASTERMODE_MSC, ES8328_MASTERMODE_MSC); break; case SND_SOC_DAIFMT_CBS_CFS: /* Slave serial port mode */ snd_soc_update_bits(codec, ES8328_MASTERMODE, ES8328_MASTERMODE_MSC, 0); break; default: return -EINVAL; } /* interface format */ switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) { Loading Loading @@ -620,10 +632,6 @@ static int es8328_set_dai_fmt(struct snd_soc_dai *codec_dai, snd_soc_update_bits(codec, ES8328_ADCCONTROL4, ES8328_ADCCONTROL4_ADCFORMAT_MASK, adc_mode); /* Master serial port mode, with BCLK generated automatically */ snd_soc_update_bits(codec, ES8328_MASTERMODE, ES8328_MASTERMODE_MSC, ES8328_MASTERMODE_MSC); return 0; } Loading