Skip to content

Commit

Permalink
v4.17: replace codec to component
Browse files Browse the repository at this point in the history
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
  • Loading branch information
HinTak committed Apr 24, 2021
1 parent 9796ad4 commit af484de
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions ac108.c
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,12 @@ static struct snd_soc_codec_driver ac10x_soc_codec_driver = {
.set_bias_level = ac108_set_bias_level,
.read = ac108_codec_read,
.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) {
Expand Down
2 changes: 1 addition & 1 deletion patches/back-to-v4.19.diff
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ index 080325b..eefa7de 100644
-#else
#define snd_soc_read snd_soc_component_read32
-#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_update_bits snd_soc_component_update_bits
diff --git a/wm8960.c b/wm8960.c
Expand Down
2 changes: 1 addition & 1 deletion patches/back-to-v5.4.diff
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ index 080325b..eefa7de 100644
-#else
#define snd_soc_read snd_soc_component_read32
-#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_update_bits snd_soc_component_update_bits
diff --git a/wm8960.c b/wm8960.c
Expand Down
2 changes: 1 addition & 1 deletion patches/back-to-v5.8.diff
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ index 080325b..faed848 100644
-#else
#define snd_soc_read snd_soc_component_read32
-#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_update_bits snd_soc_component_update_bits
diff --git a/wm8960.c b/wm8960.c
Expand Down
4 changes: 2 additions & 2 deletions sound-compatible-4.18.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

#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
#else
#define __NO_SND_SOC_CODEC_DRV 0
Expand All @@ -36,7 +36,7 @@
#else
#define snd_soc_read snd_soc_component_read32
#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_update_bits snd_soc_component_update_bits
#define snd_soc_write snd_soc_component_write
Expand Down

0 comments on commit af484de

Please sign in to comment.