diff options
author | 2017-08-09 16:25:51 +0300 | |
---|---|---|
committer | 2017-08-09 16:39:53 +0300 | |
commit | fc79186f671f749f9f86acf8d774acafc8c7c58c (patch) | |
tree | 4447adf023c9f064c4447b9623ee06b26eb39cc5 /meta-rcar-gen3-adas/recipes-kernel | |
parent | 113ff6615d9302ccc8d4295f6b76f7e2875a2b02 (diff) |
Sound: ak4613: suppress warning during pulseaudio probe
Diffstat (limited to 'meta-rcar-gen3-adas/recipes-kernel')
-rw-r--r-- | meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0069-ASoC-ak4613-Improve-counting-DAI-number.patch | 60 | ||||
-rw-r--r-- | meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend | 1 |
2 files changed, 61 insertions, 0 deletions
diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0069-ASoC-ak4613-Improve-counting-DAI-number.patch b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0069-ASoC-ak4613-Improve-counting-DAI-number.patch new file mode 100644 index 0000000..d37479c --- /dev/null +++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas/0069-ASoC-ak4613-Improve-counting-DAI-number.patch @@ -0,0 +1,60 @@ +From 411652982a20ab60957283e9084c81d791cb69f9 Mon Sep 17 00:00:00 2001 +From: Ryo Kodama <ryo.kodama.vz@renesas.com> +Date: Wed, 7 Jun 2017 14:39:00 +0900 +Subject: [PATCH] ASoC: ak4613: Improve counting DAI number + +Add the startup function to count DAI instead of hw_params. +This change matches the number of opened DAIs. +If this change isn't applied, you may get unexpected error due to +mismatching of count. Since the excution number of hw_params and +shutdown may be different, the mismatching happens. + +Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> +Signed-off-by: Ryo Kodama <ryo.kodama.vz@renesas.com> +Signed-off-by: Mark Brown <broonie@kernel.org> +Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com> +--- + sound/soc/codecs/ak4613.c | 13 ++++++++++++- + 1 file changed, 12 insertions(+), 1 deletion(-) + +diff --git a/sound/soc/codecs/ak4613.c b/sound/soc/codecs/ak4613.c +index 557ac16d43e2..e3121ca3d1a2 100644 +--- a/sound/soc/codecs/ak4613.c ++++ b/sound/soc/codecs/ak4613.c +@@ -252,6 +252,17 @@ static void ak4613_dai_shutdown(struct snd_pcm_substream *substream, + mutex_unlock(&priv->lock); + } + ++static int ak4613_dai_startup(struct snd_pcm_substream *substream, ++ struct snd_soc_dai *dai) ++{ ++ struct snd_soc_codec *codec = dai->codec; ++ struct ak4613_priv *priv = snd_soc_codec_get_drvdata(codec); ++ ++ priv->cnt++; ++ ++ return 0; ++} ++ + static int ak4613_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt) + { + struct snd_soc_codec *codec = dai->codec; +@@ -349,7 +360,6 @@ static int ak4613_dai_hw_params(struct snd_pcm_substream *substream, + if ((priv->iface == NULL) || + (priv->iface == iface)) { + priv->iface = iface; +- priv->cnt++; + ret = 0; + } + mutex_unlock(&priv->lock); +@@ -398,6 +408,7 @@ static int ak4613_set_bias_level(struct snd_soc_codec *codec, + } + + static const struct snd_soc_dai_ops ak4613_dai_ops = { ++ .startup = ak4613_dai_startup, + .shutdown = ak4613_dai_shutdown, + .set_fmt = ak4613_dai_set_fmt, + .hw_params = ak4613_dai_hw_params, +-- +2.13.0 + diff --git a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend index 89ee785..041de43 100644 --- a/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend +++ b/meta-rcar-gen3-adas/recipes-kernel/linux/linux-renesas_4.9.bbappend @@ -51,6 +51,7 @@ SRC_URI_append = " \ file://0066-pci-pcie-rcar-add-regulators-support.patch \ file://0067-ti-st-use-proper-way-to-get-shutdown-gpio.patch \ file://0068-drm-adv7511-use-smbus-to-retrieve-edid.patch \ + file://0069-ASoC-ak4613-Improve-counting-DAI-number.patch \ " SRC_URI_append_h3ulcb = " file://ulcb.cfg" |