[PATCH 02/19] ASoC: add soc-card.c

Ranjani Sridharan ranjani.sridharan at linux.intel.com
Wed May 27 02:26:02 CEST 2020


On Tue, 2020-05-26 at 10:16 +0900, Kuninori Morimoto wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> 
> Current ALSA SoC has some snd_soc_card_xxx() functions,
> and card->xxx() callbacks.
> But, it is implemented randomly at random place.
> 
> To collect all card related functions into one place,
> this patch creats new soc-card.c.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> ---
>  include/sound/soc-card.h | 11 +++++++++++
>  include/sound/soc.h      |  1 +
>  sound/soc/Makefile       |  2 +-
>  sound/soc/soc-card.c     | 26 ++++++++++++++++++++++++++
>  4 files changed, 39 insertions(+), 1 deletion(-)
>  create mode 100644 include/sound/soc-card.h
>  create mode 100644 sound/soc/soc-card.c
> 
> diff --git a/include/sound/soc-card.h b/include/sound/soc-card.h
> new file mode 100644
> index 000000000000..997809bb3afb
> --- /dev/null
> +++ b/include/sound/soc-card.h
> @@ -0,0 +1,11 @@
> +/* SPDX-License-Identifier: GPL-2.0
> + *
> + * soc-card.h
> + *
> + * Copyright (C) 2019 Renesas Electronics Corp.
> + * Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> + */
> +#ifndef __SOC_CARD_H
> +#define __SOC_CARD_H
> +
> +#endif /* __SOC_CARD_H */
> diff --git a/include/sound/soc.h b/include/sound/soc.h
> index 11ee3ed87aa1..5b880e29d106 100644
> --- a/include/sound/soc.h
> +++ b/include/sound/soc.h
> @@ -1450,5 +1450,6 @@ static inline void
> snd_soc_dapm_mutex_unlock(struct snd_soc_dapm_context *dapm)
>  }
>  
>  #include <sound/soc-component.h>
> +#include <sound/soc-card.h>
Morimoto-san,

soc-card.h should be added where it is needed. For example, in this
patch, it should be included in soc-card.c and in the following
patches, it should be included in soc-core.c, soc-dapm.c etc where it
is needed.

Thanks,
Ranjani



More information about the Alsa-devel mailing list