Commit 7885342c authored by Vaibhav Agarwal's avatar Vaibhav Agarwal Committed by Greg Kroah-Hartman

greybus: audio: Build audio module conditionally

Added CONFIG_XXX flag check before compiling audio module.
Once we add dynamic DAI link registration from audio driver,
this check wil be required to avoid compilation failures with
other kernel revisions.

Also, renamed header file to better align with .c file name.
Signed-off-by: default avatarVaibhav Agarwal <vaibhav.agarwal@linaro.org>
Signed-off-by: default avatarMark Greer <mgreer@animalcreek.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 8db00736
......@@ -47,6 +47,9 @@ obj-m += gb-raw.o
obj-m += gb-es2.o
obj-m += gb-arche.o
obj-m += gb-audio-codec.o
ifeq ($(CONFIG_SND_SOC_DYNAMIC_DAILINK),y)
obj-m += gb-audio-codec.o
endif
obj-m += gb-camera.o
obj-m += gb-audio-gb.o
obj-m += gb-audio-apbridgea.o
......
......@@ -7,7 +7,7 @@
*/
#include <linux/module.h>
#include "audio.h"
#include "audio_codec.h"
static int gbcodec_event_spk(struct snd_soc_dapm_widget *w,
struct snd_kcontrol *k, int event)
......
......@@ -6,10 +6,8 @@
* Released under the GPLv2 only.
*/
#ifndef __LINUX_GBAUDIO_H
#define __LINUX_GBAUDIO_H
#ifdef __KERNEL__
#ifndef __LINUX_GBAUDIO_CODEC_H
#define __LINUX_GBAUDIO_CODEC_H
#include <sound/soc.h>
......@@ -145,5 +143,4 @@ extern int gb_audio_apbridgea_start_rx(struct gb_connection *connection,
extern int gb_audio_apbridgea_stop_rx(struct gb_connection *connection,
__u16 i2s_port);
#endif /* __KERNEL__ */
#endif /* __LINUX_GBAUDIO_H */
#endif /* __LINUX_GBAUDIO_CODEC_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment