diff mbox series

[RESEND,v1,6/6] staging: greybus: audio: Enable GB codec, audio module compilation.

Message ID 77cfc355b87ee21636430f787764700de1983f38.1591040859.git.vaibhav.sr@gmail.com (mailing list archive)
State New, archived
Headers show
Series Enable Greybus Audio codec driver | expand

Commit Message

Vaibhav Agarwal June 2, 2020, 5:21 a.m. UTC
Currently, GB codec and audio module is conditionally compiled based on
GREYBUS_AUDIO_MSM8994. However, audio module is not dependent on MSM8994
platform and can be used generically with any platform that follows
GB Audio class specification.

Also, GB codec driver corresponds to dummy codec represented by I2S port
available on Toshiba AP Bridge. Added config option for the same in
kconfig file and accordingly updated Makefile.

Signed-off-by: Vaibhav Agarwal <vaibhav.sr@gmail.com>
---
 drivers/staging/greybus/Kconfig  | 14 +++++++++++++-
 drivers/staging/greybus/Makefile |  4 ++--
 2 files changed, 15 insertions(+), 3 deletions(-)

Comments

Vaibhav Agarwal June 3, 2020, 5:42 p.m. UTC | #1
On Tue, Jun 02, 2020 at 03:57:15PM +0300, Dan Carpenter wrote:
> On Tue, Jun 02, 2020 at 10:51:15AM +0530, Vaibhav Agarwal wrote:
> > Currently, GB codec and audio module is conditionally compiled based on
> > GREYBUS_AUDIO_MSM8994. However, audio module is not dependent on MSM8994
> > platform and can be used generically with any platform that follows
> > GB Audio class specification.
> > 
> > Also, GB codec driver corresponds to dummy codec represented by I2S port
> > available on Toshiba AP Bridge. Added config option for the same in
> > kconfig file and accordingly updated Makefile.
> > 
> 
> This commit message was a bit confusing to me.  Just say:
> 
> "Currently you can't enable the Grey Bus Audio Codec because there is no
> entry for it in the Kconfig file.  Originally the config name was going
> to be AUDIO_MSM8994 but that's not correct because other types of
> hardware are supported now.  I have chosen the name AUDIO_APB_CODEC
> instead.  Also I had to update the dependencies for GREYBUS_AUDIO to
> make the compile work."
> 
> Otherwise this looks fine.

Thanks Dan for sharing your valuable feedback. I'll make the suggested 
changes for the complete series in v2 patchset.

regards,
vaibhav

> 
> regards,
> dan carpenter
>
diff mbox series

Patch

diff --git a/drivers/staging/greybus/Kconfig b/drivers/staging/greybus/Kconfig
index d4777f5a8b90..cbcfcbba239b 100644
--- a/drivers/staging/greybus/Kconfig
+++ b/drivers/staging/greybus/Kconfig
@@ -3,7 +3,7 @@  if GREYBUS
 
 config GREYBUS_AUDIO
 	tristate "Greybus Audio Class driver"
-	depends on SOUND
+	depends on SOUND && SND_SOC
 	---help---
 	  Select this option if you have a device that follows the
 	  Greybus Audio Class specification.
@@ -11,6 +11,18 @@  config GREYBUS_AUDIO
 	  To compile this code as a module, chose M here: the module
 	  will be called gb-audio.ko
 
+config GREYBUS_AUDIO_APB_CODEC
+	tristate "Greybus APBridge Audio codec driver"
+	depends on SND_SOC && GREYBUS_AUDIO
+	help
+	  Select this option if you have a Toshiba APB device that has I2S
+          ports and acts as a Greybus "Dummy codec". This device is a
+          bridge from an APB-I2S port to a Unipro network.
+
+	  To compile this code as a module, chose M here: the module
+	  will be called gb-audio-codec.ko
+
+
 config GREYBUS_BOOTROM
 	tristate "Greybus Bootrom Class driver"
 	---help---
diff --git a/drivers/staging/greybus/Makefile b/drivers/staging/greybus/Makefile
index 3b4b6cabff19..7c5e89622334 100644
--- a/drivers/staging/greybus/Makefile
+++ b/drivers/staging/greybus/Makefile
@@ -40,8 +40,8 @@  gb-audio-manager-y	:= audio_manager.o audio_manager_module.o
 #ccflags-y += -DGB_AUDIO_MANAGER_SYSFS
 #endif
 
-obj-$(CONFIG_GREYBUS_AUDIO_MSM8994)	+= gb-audio-codec.o
-obj-$(CONFIG_GREYBUS_AUDIO_MSM8994)	+= gb-audio-module.o
+obj-$(CONFIG_GREYBUS_AUDIO_APB_CODEC)  	+= gb-audio-codec.o
+obj-$(CONFIG_GREYBUS_AUDIO_APB_CODEC)	+= gb-audio-module.o
 obj-$(CONFIG_GREYBUS_AUDIO)		+= gb-audio-gb.o
 obj-$(CONFIG_GREYBUS_AUDIO)		+= gb-audio-apbridgea.o
 obj-$(CONFIG_GREYBUS_AUDIO)		+= gb-audio-manager.o