v4.17: replace codec to component

https://www.alsa-project.org/pipermail/alsa-devel/2018-January/thread.html#131069

https://www.alsa-project.org/pipermail/alsa-devel/2018-January/131070.html
[alsa-devel] [PATCH v2 00/39] ASoC: replace platform/codec component   Kuninori Morimoto

https://www.alsa-project.org/pipermail/alsa-devel/2018-January/131111.html
[alsa-devel] [PATCH v2 000/186] ASoC: replace codec component   Kuninori Morimoto
This commit is contained in:
Hin-Tak Leung 2021-04-19 11:26:10 +01:00
parent 9796ad49ff
commit af484de3af
5 changed files with 11 additions and 5 deletions

View file

@ -1323,6 +1323,12 @@ static struct snd_soc_codec_driver ac10x_soc_codec_driver = {
.set_bias_level = ac108_set_bias_level, .set_bias_level = ac108_set_bias_level,
.read = ac108_codec_read, .read = ac108_codec_read,
.write = ac108_codec_write, .write = ac108_codec_write,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)
.idle_bias_on = 1,
.use_pmdown_time = 1,
.endianness = 1,
.non_legacy_dai_naming = 1,
#endif
}; };
static ssize_t ac108_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { static ssize_t ac108_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) {

View file

@ -508,7 +508,7 @@ index 080325b..eefa7de 100644
-#else -#else
#define snd_soc_read snd_soc_component_read32 #define snd_soc_read snd_soc_component_read32
-#endif -#endif
#define snd_soc_register_codec snd_soc_register_component #define snd_soc_register_codec devm_snd_soc_register_component
#define snd_soc_unregister_codec snd_soc_unregister_component #define snd_soc_unregister_codec snd_soc_unregister_component
#define snd_soc_update_bits snd_soc_component_update_bits #define snd_soc_update_bits snd_soc_component_update_bits
diff --git a/wm8960.c b/wm8960.c diff --git a/wm8960.c b/wm8960.c

View file

@ -204,7 +204,7 @@ index 080325b..eefa7de 100644
-#else -#else
#define snd_soc_read snd_soc_component_read32 #define snd_soc_read snd_soc_component_read32
-#endif -#endif
#define snd_soc_register_codec snd_soc_register_component #define snd_soc_register_codec devm_snd_soc_register_component
#define snd_soc_unregister_codec snd_soc_unregister_component #define snd_soc_unregister_codec snd_soc_unregister_component
#define snd_soc_update_bits snd_soc_component_update_bits #define snd_soc_update_bits snd_soc_component_update_bits
diff --git a/wm8960.c b/wm8960.c diff --git a/wm8960.c b/wm8960.c

View file

@ -39,7 +39,7 @@ index 080325b..faed848 100644
-#else -#else
#define snd_soc_read snd_soc_component_read32 #define snd_soc_read snd_soc_component_read32
-#endif -#endif
#define snd_soc_register_codec snd_soc_register_component #define snd_soc_register_codec devm_snd_soc_register_component
#define snd_soc_unregister_codec snd_soc_unregister_component #define snd_soc_unregister_codec snd_soc_unregister_component
#define snd_soc_update_bits snd_soc_component_update_bits #define snd_soc_update_bits snd_soc_component_update_bits
diff --git a/wm8960.c b/wm8960.c diff --git a/wm8960.c b/wm8960.c

View file

@ -9,7 +9,7 @@
#include <linux/version.h> #include <linux/version.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,18,0) #if LINUX_VERSION_CODE >= KERNEL_VERSION(4,17,0)
#define __NO_SND_SOC_CODEC_DRV 1 #define __NO_SND_SOC_CODEC_DRV 1
#else #else
#define __NO_SND_SOC_CODEC_DRV 0 #define __NO_SND_SOC_CODEC_DRV 0
@ -36,7 +36,7 @@
#else #else
#define snd_soc_read snd_soc_component_read32 #define snd_soc_read snd_soc_component_read32
#endif #endif
#define snd_soc_register_codec snd_soc_register_component #define snd_soc_register_codec devm_snd_soc_register_component
#define snd_soc_unregister_codec snd_soc_unregister_component #define snd_soc_unregister_codec snd_soc_unregister_component
#define snd_soc_update_bits snd_soc_component_update_bits #define snd_soc_update_bits snd_soc_component_update_bits
#define snd_soc_write snd_soc_component_write #define snd_soc_write snd_soc_component_write