mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-12 12:59:51 +00:00
ASoC: soc-utils: add snd_soc_dlc_is_dummy()
We have snd_soc_xxx_is_dummy() functions, but not for dlc. Let's add it. Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Link: https://patch.msgid.link/87cydc8vup.wl-kuninori.morimoto.gx@renesas.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
committed by
Mark Brown
parent
b4432656b3
commit
3e021f3b81
@@ -935,7 +935,7 @@ snd_soc_link_to_platform(struct snd_soc_dai_link *link, int n) {
|
|||||||
|
|
||||||
extern struct snd_soc_dai_link_component null_dailink_component[0];
|
extern struct snd_soc_dai_link_component null_dailink_component[0];
|
||||||
extern struct snd_soc_dai_link_component snd_soc_dummy_dlc;
|
extern struct snd_soc_dai_link_component snd_soc_dummy_dlc;
|
||||||
|
int snd_soc_dlc_is_dummy(struct snd_soc_dai_link_component *dlc);
|
||||||
|
|
||||||
struct snd_soc_codec_conf {
|
struct snd_soc_codec_conf {
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -262,6 +262,19 @@ struct snd_soc_dai_link_component snd_soc_dummy_dlc = {
|
|||||||
};
|
};
|
||||||
EXPORT_SYMBOL_GPL(snd_soc_dummy_dlc);
|
EXPORT_SYMBOL_GPL(snd_soc_dummy_dlc);
|
||||||
|
|
||||||
|
int snd_soc_dlc_is_dummy(struct snd_soc_dai_link_component *dlc)
|
||||||
|
{
|
||||||
|
if (dlc == &snd_soc_dummy_dlc)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
if (strcmp(dlc->name, snd_soc_dummy_dlc.name) == 0 ||
|
||||||
|
strcmp(dlc->dai_name, snd_soc_dummy_dlc.dai_name) == 0)
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
EXPORT_SYMBOL_GPL(snd_soc_dlc_is_dummy);
|
||||||
|
|
||||||
static int snd_soc_dummy_probe(struct faux_device *fdev)
|
static int snd_soc_dummy_probe(struct faux_device *fdev)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user