lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 11 Jun 2018 11:14:29 +0900
From:   "Katsuhiro Suzuki" <suzuki.katsuhiro@...ionext.com>
To:     "'Kuninori Morimoto'" <kuninori.morimoto.gx@...esas.com>
Cc:     "Mark Brown" <broonie@...nel.org>, <alsa-devel@...a-project.org>,
        "Masami Hiramatsu" <masami.hiramatsu@...aro.org>,
        "Jassi Brar" <jaswinder.singh@...aro.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: audio-graph-card: add hp and mic detect gpios same as simple-card

Hello Morimoto-san,

Thank you for your reviewing.

> -----Original Message-----
> From: Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
> Sent: Monday, June 11, 2018 8:53 AM
> To: Suzuki, Katsuhiro <suzuki.katsuhiro@...ionext.com>
> Cc: Mark Brown <broonie@...nel.org>; alsa-devel@...a-project.org; Masami
Hiramatsu
> <masami.hiramatsu@...aro.org>; Jassi Brar <jaswinder.singh@...aro.org>;
> linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.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@...ionext.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


Powered by blists - more mailing lists