linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: suzuki.katsuhiro@socionext.com (Katsuhiro Suzuki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ASoC: audio-graph-card: add hp and mic detect gpios same as simple-card
Date: Mon, 11 Jun 2018 11:14:29 +0900	[thread overview]
Message-ID: <007301d40129$ee1c8380$ca558a80$@socionext.com> (raw)
In-Reply-To: <87h8makxt7.wl-kuninori.morimoto.gx@renesas.com>

Hello Morimoto-san,

Thank you for your reviewing.

> -----Original Message-----
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> Sent: Monday, June 11, 2018 8:53 AM
> To: Suzuki, Katsuhiro <suzuki.katsuhiro@socionext.com>
> Cc: Mark Brown <broonie@kernel.org>; alsa-devel at alsa-project.org; Masami
Hiramatsu
> <masami.hiramatsu@linaro.org>; Jassi Brar <jaswinder.singh@linaro.org>;
> linux-arm-kernel at lists.infradead.org; linux-kernel at vger.kernel.org
> Subject: Re: [PATCH] ASoC: audio-graph-card: add hp and mic detect gpios same
as
> simple-card
> 
> 
> Hi Katsuhiro-san
> 
> Thank you for your patch
> 
> > This patch adds headphone and microphone jack detection gpios as same
> > as simple-card driver. This feature move into simple-card-utils from
> > simple-card to avoid the duplicating code.
> >
> > Signed-off-by: Katsuhiro Suzuki <suzuki.katsuhiro@socionext.com>
> > ---
> 
> I think it can be 2 patches ?
>  1. move function from simple-card to simple-card-utils
>  2. use it from audio-graph-card
> 

OK, I'll split this patch.


> > +static int asoc_graph_soc_card_probe(struct snd_soc_card *card)
> > +{
> > +	struct graph_card_data *priv = snd_soc_card_get_drvdata(card);
> > +	int ret;
> > +
> > +	ret = asoc_simple_card_init_hp(card, &priv->hp_jack, NULL);
> > +	if (ret < 0)
> > +		return ret;
> > +
> > +	ret = asoc_simple_card_init_mic(card, &priv->mic_jack, NULL);
> > +	if (ret < 0)
> > +		return ret;
> > +
> > +	return 0;
> > +}
> > +
> >  static int asoc_graph_card_probe(struct platform_device *pdev)
> >  {
> >  	struct graph_card_data *priv;
> > @@ -319,6 +336,7 @@ static int asoc_graph_card_probe(struct platform_device
> *pdev)
> >  	card->num_links	= num;
> >  	card->dapm_widgets = asoc_graph_card_dapm_widgets;
> >  	card->num_dapm_widgets = ARRAY_SIZE(asoc_graph_card_dapm_widgets);
> > +	card->probe	= asoc_graph_soc_card_probe;
> 
> Current simple-card is calling init_hp/init_mic from
> asoc_simple_card_dai_init(), and audio-graph-card has
> asoc_graph_card_dai_init().
> simple/audio card are doing samethings in different style.
> Thus, I want to synchronized whole simple/audio card.
> 

Indeed. I need to add more one patch.

  1. move function from simple-card to simple-card-utils
  2. change calling init_hp/mic from soc_dai_link.init() to
     soc_card.probe()
  3. use it from audio-graph-card


Regards,
--
Katsuhiro Suzuki


> Best regards
> ---
> Kuninori Morimoto

      parent reply	other threads:[~2018-06-11  2:14 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-08  8:08 [PATCH] ASoC: audio-graph-card: add hp and mic detect gpios same as simple-card Katsuhiro Suzuki
2018-06-10 23:52 ` Kuninori Morimoto
2018-06-11  2:03   ` [alsa-devel] " Katsuhiro Suzuki
2018-06-11  2:14   ` Katsuhiro Suzuki [this message]

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='007301d40129$ee1c8380$ca558a80$@socionext.com' \
    --to=suzuki.katsuhiro@socionext.com \
    --cc=linux-arm-kernel@lists.infradead.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).