From: Michael Trimarchi <michael@amarulasolutions.com>
To: Mark Brown <broonie@kernel.org>
Cc: alsa-devel@alsa-project.org, linaro-kernel@lists.linaro.org,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@linaro.org>
Subject: Re: [PATCH 2/2] ASoC: pcm1792a: Add DAPM support
Date: Fri, 23 Aug 2013 17:16:48 +0200 [thread overview]
Message-ID: <20130823151648.GA32473@panicking> (raw)
In-Reply-To: <1376415048-6029-2-git-send-email-broonie@kernel.org>
Hi Mark
On Tue, Aug 13, 2013 at 06:30:48PM +0100, Mark Brown wrote:
> From: Mark Brown <broonie@linaro.org>
>
> Provide DAPM for the device, ensuring operation with DAPM required by the
> core and making it easier to hook up external hardware to it.
>
> Signed-off-by: Mark Brown <broonie@linaro.org>
> ---
> sound/soc/codecs/pcm1792a.c | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/sound/soc/codecs/pcm1792a.c b/sound/soc/codecs/pcm1792a.c
> index c57d3a5..2a8eccf 100644
> --- a/sound/soc/codecs/pcm1792a.c
> +++ b/sound/soc/codecs/pcm1792a.c
> @@ -154,6 +154,20 @@ static const struct snd_kcontrol_new pcm1792a_controls[] = {
> pcm1792a_dac_tlv),
> };
>
> +static const struct snd_soc_dapm_widget pcm1792a_dapm_widgets[] = {
> +SND_SOC_DAPM_OUTPUT("IOUTL+"),
> +SND_SOC_DAPM_OUTPUT("IOUTL-"),
> +SND_SOC_DAPM_OUTPUT("IOUTR+"),
> +SND_SOC_DAPM_OUTPUT("IOUTR-"),
> +};
> +
I'm working on support pcm1795 and pcm1796 too. They are registers compatible
but different sample rate support. So the idea is three patches?
- rename pcm1792a to pcm179x (is it possible?)
- add three different dai for pcm1792a, pcm1795 and pcm1796
- use of_device_id data pointer to select the correct dai
Michael
> +static const struct snd_soc_dapm_route pcm1792a_dapm_routes[] = {
> + { "IOUTL+", NULL, "Playback" },
> + { "IOUTL-", NULL, "Playback" },
> + { "IOUTR+", NULL, "Playback" },
> + { "IOUTR-", NULL, "Playback" },
> +};
> +
> static struct snd_soc_dai_driver pcm1792a_dai = {
> .name = "pcm1792a-hifi",
> .playback = {
> @@ -184,6 +198,10 @@ static const struct regmap_config pcm1792a_regmap = {
> static struct snd_soc_codec_driver soc_codec_dev_pcm1792a = {
> .controls = pcm1792a_controls,
> .num_controls = ARRAY_SIZE(pcm1792a_controls),
> + .dapm_widgets = pcm1792a_dapm_widgets,
> + .num_dapm_widgets = ARRAY_SIZE(pcm1792a_dapm_widgets),
> + .dapm_routes = pcm1792a_dapm_routes,
> + .num_dapm_routes = ARRAY_SIZE(pcm1792a_dapm_routes),
> };
>
> static int pcm1792a_spi_probe(struct spi_device *spi)
> --
> 1.8.4.rc2
>
next prev parent reply other threads:[~2013-08-23 15:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-13 17:30 [PATCH 1/2] ASoC: pcm1792a: Remove empty capture DAI stub Mark Brown
2013-08-13 17:30 ` [PATCH 2/2] ASoC: pcm1792a: Add DAPM support Mark Brown
2013-08-23 15:16 ` Michael Trimarchi [this message]
2013-08-23 15:36 ` Mark Brown
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=20130823151648.GA32473@panicking \
--to=michael@amarulasolutions.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=broonie@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linaro-kernel@lists.linaro.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