From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Mark Brown <broonie@kernel.org>
Cc: "Daniel Baluta" <daniel.baluta@nxp.com>,
Linux-ALSA <alsa-devel@alsa-project.org>,
"Chunxu Li" <chunxu.li@mediatek.com>,
"Heiko Stuebner" <heiko@sntech.de>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Cezary Rojewski" <cezary.rojewski@intel.com>,
"Rander Wang" <rander.wang@intel.com>,
"Thierry Reding" <thierry.reding@gmail.com>,
"Minghao Chi" <chi.minghao@zte.com.cn>,
"Dmitry Osipenko" <digetx@gmail.com>,
"Bard Liao" <yung-chuan.liao@linux.intel.com>,
"Jerome Brunet" <jbrunet@baylibre.com>,
"Jiapeng Chong" <jiapeng.chong@linux.alibaba.com>,
"Kevin Hilman" <khilman@baylibre.com>,
"Pierre-Louis Bossart" <pierre-louis.bossart@linux.intel.com>,
"Jiaxin Yu" <jiaxin.yu@mediatek.com>,
"Jonathan Hunter" <jonathanh@nvidia.com>,
"Nicolas Frattaroli" <frattaroli.nicolas@gmail.com>,
"Ranjani Sridharan" <ranjani.sridharan@linux.intel.com>,
"Colin Ian King" <colin.i.king@gmail.com>,
"Charles Keepax" <ckeepax@opensource.cirrus.com>,
"Martin Blumenstingl" <martin.blumenstingl@googlemail.com>,
"Matthias Brugger" <matthias.bgg@gmail.com>,
"Peter Ujfalusi" <peter.ujfalusi@linux.intel.com>,
"AngeloGioacchino Del Regno"
<angelogioacchino.delregno@collabora.com>,
"Oder Chiou" <oder_chiou@realtek.com>,
"Neil Armstrong" <neil.armstrong@linaro.org>,
"Kai Vehmanen" <kai.vehmanen@linux.intel.com>,
"Takashi Iwai" <tiwai@suse.com>,
"\"Amadeusz Sławiński\"" <amadeuszx.slawinski@linux.intel.com>
Subject: [PATCH 04/25] ASoC: soc-dai.h: add snd_soc_dai_get/set_widget_playback/capture() helper
Date: Fri, 20 Jan 2023 06:53:26 +0000 [thread overview]
Message-ID: <87cz79lmsg.wl-kuninori.morimoto.gx@renesas.com> (raw)
In-Reply-To: <87ilh1lnbq.wl-kuninori.morimoto.gx@renesas.com>
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
snd_soc_dai_get_widget() requests SNDRV_PCM_STREAM_PLAYBACK/CAPTURE.
This patch adds helper for it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
include/sound/soc-dai.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
index 9b18e230e5b3..197dc1629708 100644
--- a/include/sound/soc-dai.h
+++ b/include/sound/soc-dai.h
@@ -477,6 +477,8 @@ snd_soc_dai_get_pcm_stream(const struct snd_soc_dai *dai, int stream)
&dai->driver->playback : &dai->driver->capture;
}
+#define snd_soc_dai_get_widget_playback(dai) snd_soc_dai_get_widget(dai, SNDRV_PCM_STREAM_PLAYBACK)
+#define snd_soc_dai_get_widget_capture(dai) snd_soc_dai_get_widget(dai, SNDRV_PCM_STREAM_CAPTURE)
static inline
struct snd_soc_dapm_widget *snd_soc_dai_get_widget(struct snd_soc_dai *dai, int stream)
{
@@ -484,6 +486,8 @@ struct snd_soc_dapm_widget *snd_soc_dai_get_widget(struct snd_soc_dai *dai, int
dai->playback_widget : dai->capture_widget;
}
+#define snd_soc_dai_set_widget_playback(dai, widget) snd_soc_dai_set_widget(dai, SNDRV_PCM_STREAM_PLAYBACK, widget)
+#define snd_soc_dai_set_widget_capture(dai, widget) snd_soc_dai_set_widget(dai, SNDRV_PCM_STREAM_CAPTURE, widget)
static inline
void snd_soc_dai_set_widget(struct snd_soc_dai *dai, int stream, struct snd_soc_dapm_widget *widget)
{
--
2.25.1
next prev parent reply other threads:[~2023-01-23 8:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-20 6:41 [PATCH 00/25] ASoC: use helper function and cleanup Kuninori Morimoto
2023-01-20 6:52 ` [PATCH 02/25] ASoC: soc-dai.h: add snd_soc_dai_dma_data_set/get() for low level Kuninori Morimoto
2023-01-20 6:53 ` [PATCH 03/25] ASoC: soc-dai.h: add snd_soc_dai_tdm_mask_set/get() helper Kuninori Morimoto
2023-01-20 6:53 ` Kuninori Morimoto [this message]
2023-01-20 6:56 ` [PATCH 00/25] ASoC: use helper function and cleanup Kuninori Morimoto
2023-01-20 6:59 ` [PATCH 01/25] ASoC: soc-dai.h: add missing snd_soc_dai_set_widget() Kuninori Morimoto
2023-01-20 11:12 ` Charles Keepax
-- strict thread matches above, loose matches on Subject: below --
2023-01-20 6:56 [PATCH 00/25] ASoC: use helper function and cleanup Kuninori Morimoto
2023-01-20 7:02 ` [PATCH 04/25] ASoC: soc-dai.h: add snd_soc_dai_get/set_widget_playback/capture() helper Kuninori Morimoto
2023-01-20 11:14 ` Charles Keepax
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=87cz79lmsg.wl-kuninori.morimoto.gx@renesas.com \
--to=kuninori.morimoto.gx@renesas.com \
--cc=alsa-devel@alsa-project.org \
--cc=amadeuszx.slawinski@linux.intel.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=chi.minghao@zte.com.cn \
--cc=chunxu.li@mediatek.com \
--cc=ckeepax@opensource.cirrus.com \
--cc=colin.i.king@gmail.com \
--cc=daniel.baluta@nxp.com \
--cc=digetx@gmail.com \
--cc=frattaroli.nicolas@gmail.com \
--cc=heiko@sntech.de \
--cc=jbrunet@baylibre.com \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=jiaxin.yu@mediatek.com \
--cc=jonathanh@nvidia.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=khilman@baylibre.com \
--cc=lgirdwood@gmail.com \
--cc=martin.blumenstingl@googlemail.com \
--cc=matthias.bgg@gmail.com \
--cc=neil.armstrong@linaro.org \
--cc=oder_chiou@realtek.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=pierre-louis.bossart@linux.intel.com \
--cc=rander.wang@intel.com \
--cc=ranjani.sridharan@linux.intel.com \
--cc=thierry.reding@gmail.com \
--cc=tiwai@suse.com \
--cc=yung-chuan.liao@linux.intel.com \
/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