Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f2390880 authored by Kuninori Morimoto's avatar Kuninori Morimoto Committed by Mark Brown
Browse files

ASoC: add generic simple-card support



Current ASoC requires card.c file to each platforms in order to
specifies its CPU and Codecs pair.
But the differences between these were only value/strings of setting.
In order to reduce duplicate driver, this patch adds generic/simple-card.

Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: default avatarMark Brown <broonie@opensource.wolfsonmicro.com>
parent cdc04fd1
Loading
Loading
Loading
Loading
+38 −0
Original line number Diff line number Diff line
/*
 * ASoC simple sound card support
 *
 * Copyright (C) 2012 Renesas Solutions Corp.
 * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
 *
 * 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 __SIMPLE_CARD_H
#define __SIMPLE_CARD_H

#include <sound/soc.h>

struct asoc_simple_dai_init_info {
	unsigned int fmt;
	unsigned int cpu_daifmt;
	unsigned int codec_daifmt;
	unsigned int sysclk;
};

struct asoc_simple_card_info {
	const char *name;
	const char *card;
	const char *cpu_dai;
	const char *codec;
	const char *platform;
	const char *codec_dai;
	struct asoc_simple_dai_init_info *init; /* for snd_link.init */

	/* used in simple-card.c */
	struct snd_soc_dai_link snd_link;
	struct snd_soc_card snd_card;
};

#endif /* __SIMPLE_CARD_H */
+3 −0
Original line number Diff line number Diff line
@@ -51,5 +51,8 @@ source "sound/soc/txx9/Kconfig"
# Supported codecs
source "sound/soc/codecs/Kconfig"

# generic frame-work
source "sound/soc/generic/Kconfig"

endif	# SND_SOC
+1 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@ obj-$(CONFIG_SND_SOC_DMAENGINE_PCM) += snd-soc-dmaengine-pcm.o

obj-$(CONFIG_SND_SOC)	+= snd-soc-core.o
obj-$(CONFIG_SND_SOC)	+= codecs/
obj-$(CONFIG_SND_SOC)	+= generic/
obj-$(CONFIG_SND_SOC)	+= atmel/
obj-$(CONFIG_SND_SOC)	+= au1x/
obj-$(CONFIG_SND_SOC)	+= blackfin/
+4 −0
Original line number Diff line number Diff line
config SND_SIMPLE_CARD
	tristate "ASoC Simple sound card support"
	help
	  This option enables generic simple sound card support
+3 −0
Original line number Diff line number Diff line
snd-soc-simple-card-objs	:= simple-card.o

obj-$(CONFIG_SND_SIMPLE_CARD)	+= snd-soc-simple-card.o
Loading