ASoC: Add support for NAU8824 codec to ASoC
PATCH v2 1/1 ASoC: Add support for NAU8824 codec to ASoC
Quoted 1 line
From
fe37688e226f83ba477a3c2fbc1e64946cd4ec4eMon Sep 17 00:00:00 2001
From: Chih-Chiang Chang <[email protected]>
Date: Wed, 4 Mar 2015 20:03:21 +0800
Subject: [PATCH v2] ASoC: Add support for NAU8824 codec to ASoC
--- include/sound/nau8824.h | 22 ++ sound/soc/codecs/Kconfig | 5 + sound/soc/codecs/Makefile | 2 + sound/soc/codecs/nau8824.c | 807 +++++++++++++++++++++++++++++++++++++++++++++ sound/soc/codecs/nau8824.h | 380 +++++++++++++++++++++ 5 files changed, 1216 insertions(+) create mode 100644 include/sound/nau8824.h create mode 100644 sound/soc/codecs/nau8824.c create mode 100644 sound/soc/codecs/nau8824.h
include/sound/nau8824.h new file +22 -0
@@ -0,0 +1,22 @@ +/* +* linux/sound/nau8824.h -- Platform data for NAU8824 +* +* Copyright 2015 Nuvoton Technology Corp. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __LINUX_SND_NAU8824_H +#define __LINUX_SND_NAU8824_H + +struct nau8824_platform_data { +unsigned int audio_mclk1; +unsigned int gpio_irq; +int naudint_irq; +int headset_detect; +int button_press_detect; +}; + +#endif
sound/soc/codecs/Kconfig +5 -0
@@ -75,6 +75,7 @@ config SND_SOC_ALL_CODECS select SND_SOC_MAX9877 if I2C select SND_SOC_MC13783 if MFD_MC13XXX select SND_SOC_ML26124 if I2C + select SND_SOC_NAU8824 if I2C select SND_SOC_HDMI_CODEC select SND_SOC_PCM1681 if I2C select SND_SOC_PCM1792A if SPI_MASTER
@@ -463,6 +464,10 @@ config SND_SOC_MAX98357A config SND_SOC_MAX9850 tristate +config SND_SOC_NAU8824 + tristate "Nuvoton NAU8824 CODEC" + depends on I2C + config SND_SOC_PCM1681 tristate "Texas Instruments PCM1681 CODEC" depends on I2C
sound/soc/codecs/Makefile +2 -0
@@ -68,6 +68,7 @@ snd-soc-max98357a-objs := max98357a.o snd-soc-max9850-objs := max9850.o snd-soc-mc13783-objs := mc13783.o snd-soc-ml26124-objs := ml26124.o +snd-soc-nau8824-objs := nau8824.o snd-soc-hdmi-codec-objs := hdmi.o snd-soc-pcm1681-objs := pcm1681.o snd-soc-pcm1792a-codec-objs := pcm1792a.o
@@ -250,6 +251,7 @@ obj-$(CONFIG_SND_SOC_MAX98357A) += snd-soc-max98357a.o obj-$(CONFIG_SND_SOC_MAX9850) += snd-soc-max9850.o obj-$(CONFIG_SND_SOC_MC13783) += snd-soc-mc13783.o obj-$(CONFIG_SND_SOC_ML26124) += snd-soc-ml26124.o +obj-$(CONFIG_SND_SOC_NAU8824) += snd-soc-nau8824.o obj-$(CONFIG_SND_SOC_HDMI_CODEC) += snd-soc-hdmi-codec.o obj-$(CONFIG_SND_SOC_PCM1681) += snd-soc-pcm1681.o obj-$(CONFIG_SND_SOC_PCM1792A) += snd-soc-pcm1792a-codec.o
sound/soc/codecs/nau8824.c new file +807 -0
807 lines not on this page · raw message
sound/soc/codecs/nau8824.h new file +380 -0
380 lines not on this page · raw message
--
1.9.3
===========================================================================================
The privileged confidential information contained in this email is intended for use only by the addressees as indicated by the original sender of this email. If you are not the addressee indicated in this email or are not responsible for delivery of the email to such a person, please kindly reply to the sender indicating this fact and delete all copies of it from your computer and network server immediately. Your cooperation is highly appreciated. It is advised that any unauthorized use of confidential information of Nuvoton is strictly prohibited; and any information in this email irrelevant to the official business of Nuvoton shall be deemed as neither given nor endorsed by Nuvoton.
Chih-Chiang Chang schreef op wo 04-03-2015 om 20:53 [+0800]:
Quoted 4 lines
From
fe37688e226f83ba477a3c2fbc1e64946cd4ec4eMon Sep 17 00:00:00 2001
From: Chih-Chiang Chang <[email protected]>
Date: Wed, 4 Mar 2015 20:03:21 +0800
Subject: [PATCH v2] ASoC: Add support for NAU8824 codec to ASoC
It seems that none of those lines were needed.
Quoted 15 lines
include/sound/nau8824.h new file +12
-0@@ -0,0 +1,22 @@ +/* +* linux/sound/nau8824.h -- Platform data for NAU8824 +* +* Copyright 2015 Nuvoton Technology Corp. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __LINUX_SND_NAU8824_H +#define __LINUX_SND_NAU8824_H
include/sound/nau8824.h line 22
Quoted 10 lines
include/sound/nau8824.h new file +10
-0+ +struct nau8824_platform_data { +unsigned int audio_mclk1; +unsigned int gpio_irq; +int naudint_irq; +int headset_detect; +int button_press_detect; +}; + +#endif
In the future something other than just sound/soc/codecs/nau8824.h is going to include this header, right?
sound/soc/codecs/nau8824.c line 10
Quoted 13 lines
sound/soc/codecs/nau8824.c new file +10
-0@@ -0,0 +1,807 @@ +/* +* linux/sound/soc/codecs/nau8824.c +* +* Copyright 2015 Nuvoton Technology Corp. +* Author: Meng-Huang Kuo <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/
This states the license is GPL v2. (So do the two headers this patch adds.)
sound/soc/codecs/nau8824.c line 806
Quoted 1 line
sound/soc/codecs/nau8824.c new file +1
-0+MODULE_LICENSE ("GPL" );
So that should probably be
MODULE_LICENSE("GPL v2");Paul Bolle
Mark Brown
maintainerQuoted 6 lines · Paul Bolle
Chih-Chiang Chang schreef op wo 04-03-2015 om 20:53 [+0800]:
Quoted 1 line
+struct
nau8824_platform_data{In the future something other than just
sound/soc/codecs/nau8824.his going to include this header, right?
It's platform data, that's the whole point of platform data...
Quoted 7 lines · Paul Bolle
Chih-Chiang Chang schreef op wo 04-03-2015 om 20:53 [+0800]:
Quoted 4 lines
From
fe37688e226f83ba477a3c2fbc1e64946cd4ec4eMon Sep 17 00:00:00 2001
From: Chih-Chiang Chang <[email protected]>
Date: Wed, 4 Mar 2015 20:03:21 +0800
Subject: [PATCH v2] ASoC: Add support for NAU8824 codec to ASoCIt seems that none of those lines were needed.
Sorry for the wrong patch format, will remove these lines in next submit.
Quoted 47 lines
Quoted 16 lines
include/sound/nau8824.h new file +12
-0@@ -0,0 +1,22 @@ +/* +* linux/sound/nau8824.h -- Platform data for NAU8824 +* +* Copyright 2015 Nuvoton Technology Corp. +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ + +#ifndef __LINUX_SND_NAU8824_H +#define __LINUX_SND_NAU8824_Hinclude/sound/nau8824.h line 22
Quoted 10 lines
include/sound/nau8824.h new file +10
-0+ +struct nau8824_platform_data { +unsigned int audio_mclk1; +unsigned int gpio_irq; +int naudint_irq; +int headset_detect; +int button_press_detect; +}; + +#endif In the future something other than just
sound/soc/codecs/nau8824.his going to include this header, right?sound/soc/codecs/nau8824.c line 10
Quoted 13 lines
sound/soc/codecs/nau8824.c new file +10
-0@@ -0,0 +1,807 @@ +/* +* linux/sound/soc/codecs/nau8824.c +* +* Copyright 2015 Nuvoton Technology Corp. +* Author: Meng-Huang Kuo <[email protected]> +* +* This program is free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License version 2 as +* published by the Free Software Foundation. +*/ This states the license is GPL v2. (So do the two headers this patch adds.)
Quoted 4 lines
sound/soc/codecs/nau8824.c line 806
Quoted 1 line
sound/soc/codecs/nau8824.c new file +1
-0+MODULE_LICENSE ("GPL" );So that should probably be
MODULE_LICENSE("GPL v2");
We will modify the code to be GPL v2.
Quoted 4 lines
Paul Bolle