From: Jerome Brunet <jbrunet@baylibre.com>
To: Mark Brown <broonie@kernel.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Kevin Hilman <khilman@baylibre.com>,
Carlo Caione <carlo@caione.org>
Cc: Jerome Brunet <jbrunet@baylibre.com>,
alsa-devel@alsa-project.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org
Subject: [PATCH RESEND 13/15] ASoC: export snd_soc_of_get_slot_mask
Date: Tue, 17 Jul 2018 17:43:02 +0200 [thread overview]
Message-ID: <20180717154304.9973-14-jbrunet@baylibre.com> (raw)
In-Reply-To: <20180717154304.9973-1-jbrunet@baylibre.com>
Amlogic's axg card driver can't use snd_soc_of_parse_tdm_slot()
directly because it needs to handle 4 mask for each direction.
Yet the parsing of each mask is the same, so export
snd_soc_of_get_slot_mask() to reuse the the existing code.
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
---
include/sound/soc.h | 3 +++
sound/soc/soc-core.c | 7 ++++---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/include/sound/soc.h b/include/sound/soc.h
index a4915148f739..41cec42fb456 100644
--- a/include/sound/soc.h
+++ b/include/sound/soc.h
@@ -1426,6 +1426,9 @@ int snd_soc_of_parse_card_name(struct snd_soc_card *card,
const char *propname);
int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
const char *propname);
+int snd_soc_of_get_slot_mask(struct device_node *np,
+ const char *prop_name,
+ unsigned int *mask);
int snd_soc_of_parse_tdm_slot(struct device_node *np,
unsigned int *tx_mask,
unsigned int *rx_mask,
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 3be0310d5c81..1344e8e602fd 100644
--- a/sound/soc/soc-core.c
+++ b/sound/soc/soc-core.c
@@ -3366,9 +3366,9 @@ int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
}
EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_simple_widgets);
-static int snd_soc_of_get_slot_mask(struct device_node *np,
- const char *prop_name,
- unsigned int *mask)
+int snd_soc_of_get_slot_mask(struct device_node *np,
+ const char *prop_name,
+ unsigned int *mask)
{
u32 val;
const __be32 *of_slot_mask = of_get_property(np, prop_name, &val);
@@ -3383,6 +3383,7 @@ static int snd_soc_of_get_slot_mask(struct device_node *np,
return val;
}
+EXPORT_SYMBOL_GPL(snd_soc_of_get_slot_mask);
int snd_soc_of_parse_tdm_slot(struct device_node *np,
unsigned int *tx_mask,
--
2.14.4
next prev parent reply other threads:[~2018-07-17 15:43 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-07-17 15:42 [PATCH RESEND 00/15] ASoC: meson: add axg audio subsystem support Jerome Brunet
2018-07-17 15:42 ` [PATCH RESEND 01/15] ASoC: meson: add axg fifos DT binding documentation Jerome Brunet
2018-07-17 15:42 ` [PATCH RESEND 02/15] ASoC: meson: add axg fifo base driver Jerome Brunet
2018-07-18 11:50 ` Mark Brown
2018-07-18 15:39 ` [alsa-devel] " Takashi Iwai
2018-07-19 7:55 ` Jerome Brunet
2018-07-17 15:42 ` [PATCH RESEND 03/15] ASoC: meson: add axg frddr driver Jerome Brunet
2018-07-17 15:42 ` [PATCH RESEND 04/15] ASoC: meson: add axg toddr driver Jerome Brunet
2018-07-17 15:42 ` [PATCH RESEND 05/15] ASoC: meson: add axg spdif output DT bindings documentation Jerome Brunet
2018-07-17 15:42 ` [PATCH RESEND 06/15] ASoC: meson: add axg spdif output Jerome Brunet
2018-07-17 15:42 ` [PATCH RESEND 07/15] ASoC: meson: add axg tdm formatters DT bindings documentation Jerome Brunet
2018-07-17 15:42 ` [PATCH RESEND 08/15] ASoC: meson: add axg tdm interface " Jerome Brunet
2018-07-17 15:42 ` [PATCH RESEND 09/15] ASoC: meson: add tdm formatter base driver Jerome Brunet
2018-07-17 15:42 ` [PATCH RESEND 10/15] ASoC: meson: add tdm interface driver Jerome Brunet
2018-07-17 15:43 ` [PATCH RESEND 11/15] ASoC: meson: add tdm output driver Jerome Brunet
2018-07-17 15:43 ` [PATCH RESEND 12/15] ASoC: meson: add tdm input driver Jerome Brunet
2018-07-17 15:43 ` Jerome Brunet [this message]
2018-07-17 15:43 ` [PATCH RESEND 14/15] ASoC: meson: add axg sound card DT bindings documentation Jerome Brunet
2018-07-17 15:43 ` [PATCH RESEND 15/15] ASoC: meson: add axg sound card support Jerome Brunet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180717154304.9973-14-jbrunet@baylibre.com \
--to=jbrunet@baylibre.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=carlo@caione.org \
--cc=devicetree@vger.kernel.org \
--cc=khilman@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).