All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Carl Philipp Klemm <philipp@uvos.xyz>,
	"kuninori.morimoto.gx@gmail.com" <kuninori.morimoto.gx@gmail.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	"merlijn@wizzup.org" <merlijn@wizzup.org>,
	"tony@atomide.com" <tony@atomide.com>,
	"sre@kernel.org" <sre@kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Subject: RE: [RFC PATCH 1/3] ASoC: simple-card-utils: add support for componants provideing jack events via set_jack
Date: Mon, 10 Jan 2022 23:27:52 +0000	[thread overview]
Message-ID: <OS3PR01MB8426FD3FD1B45BB31C971A56D4509@OS3PR01MB8426.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20220108145749.f55500222b049f344415a5c3@uvos.xyz>


Hi Carl

>> (X)	int asoc_simple_init_jack(...)
>> 	{
>> 		...
>> 		if (gpio_is_valid(det)) {
>> 			...
>> 
>> 			snd_soc_card_jack_new(...);
>> 			snd_soc_jack_add_gpios(...);
>> 			for_each_card_components(card, component)
>> (Y)				snd_soc_component_set_jack(component, ...);
>> 		}
>> 		...
>> 	}
>
> So for the case of cpcap codec on motorola mapphones this dosent help,
> because we dont have a gpio to sense plug state, thus no gpio in dts
> and thus gpio_is_valid will return false, therefore, no jack.
>
> Moving 
>
> sjack->pin.pin		= pin_name;
> sjack->pin.mask		= mask;
>
> snd_soc_card_jack_new(card, pin_name, mask,
> 		      &sjack->jack,
> 		      &sjack->pin, 1);
>
> and
>
> for_each_card_components(card, component)
> 			snd_soc_component_set_jack(component, &sjack->jack, NULL);
>
> outside of the if block should make this work, at least cpcap gets the jack then.

I see.

simple-card is checking hp-det-gpio on DT now.
I guess it can help you if simple-card also check "hp-det" (no gpio)
(and customize previous patch) ?
Is "enable-hp" better naming... ?

Best regards
---
Kuninori Morimoto

WARNING: multiple messages have this Message-ID (diff)
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
To: Carl Philipp Klemm <philipp@uvos.xyz>,
	"kuninori.morimoto.gx@gmail.com" <kuninori.morimoto.gx@gmail.com>
Cc: "alsa-devel@alsa-project.org" <alsa-devel@alsa-project.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	"tony@atomide.com" <tony@atomide.com>,
	"merlijn@wizzup.org" <merlijn@wizzup.org>,
	"sre@kernel.org" <sre@kernel.org>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>
Subject: RE: [RFC PATCH 1/3] ASoC: simple-card-utils: add support for componants provideing jack events via set_jack
Date: Mon, 10 Jan 2022 23:27:52 +0000	[thread overview]
Message-ID: <OS3PR01MB8426FD3FD1B45BB31C971A56D4509@OS3PR01MB8426.jpnprd01.prod.outlook.com> (raw)
In-Reply-To: <20220108145749.f55500222b049f344415a5c3@uvos.xyz>


Hi Carl

>> (X)	int asoc_simple_init_jack(...)
>> 	{
>> 		...
>> 		if (gpio_is_valid(det)) {
>> 			...
>> 
>> 			snd_soc_card_jack_new(...);
>> 			snd_soc_jack_add_gpios(...);
>> 			for_each_card_components(card, component)
>> (Y)				snd_soc_component_set_jack(component, ...);
>> 		}
>> 		...
>> 	}
>
> So for the case of cpcap codec on motorola mapphones this dosent help,
> because we dont have a gpio to sense plug state, thus no gpio in dts
> and thus gpio_is_valid will return false, therefore, no jack.
>
> Moving 
>
> sjack->pin.pin		= pin_name;
> sjack->pin.mask		= mask;
>
> snd_soc_card_jack_new(card, pin_name, mask,
> 		      &sjack->jack,
> 		      &sjack->pin, 1);
>
> and
>
> for_each_card_components(card, component)
> 			snd_soc_component_set_jack(component, &sjack->jack, NULL);
>
> outside of the if block should make this work, at least cpcap gets the jack then.

I see.

simple-card is checking hp-det-gpio on DT now.
I guess it can help you if simple-card also check "hp-det" (no gpio)
(and customize previous patch) ?
Is "enable-hp" better naming... ?

Best regards
---
Kuninori Morimoto

  reply	other threads:[~2022-01-10 23:27 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-28 18:09 [RFC PATCH 1/3] ASoC: simple-card-utils: add support for componants provideing jack events via set_jack Carl Philipp Klemm
2021-12-28 18:09 ` Carl Philipp Klemm
2021-12-28 18:11 ` [RFC PATCH 2/3] ARM: dts: motorola-mapphone: add interrupt for headphone detection Carl Philipp Klemm
2021-12-28 18:11   ` Carl Philipp Klemm
2021-12-28 18:15   ` [RFC PATCH 3/3] ASoC: cpcap: add headphone jack plug detection support Carl Philipp Klemm
2021-12-28 18:15     ` Carl Philipp Klemm
2022-01-04 15:50     ` [RFC PATCH 3/3 V2] " Carl Philipp Klemm
2022-01-04 15:51       ` Carl Philipp Klemm
2022-01-05  5:36 ` [RFC PATCH 1/3] ASoC: simple-card-utils: add support for componants provideing jack events via set_jack kuninori.morimoto.gx
2022-01-05  5:36   ` kuninori.morimoto.gx
2022-01-05  9:10   ` Carl Philipp Klemm
2022-01-05  9:10     ` Carl Philipp Klemm
2022-01-06  1:47     ` kuninori.morimoto.gx
2022-01-06  1:47       ` kuninori.morimoto.gx
2022-01-08 13:57       ` Carl Philipp Klemm
2022-01-08 13:57         ` Carl Philipp Klemm
2022-01-10 23:27         ` Kuninori Morimoto [this message]
2022-01-10 23:27           ` Kuninori Morimoto
2022-02-20  0:14           ` [PATCH 1/6] ASoC: simple_card_utils: call snd_soc_component_set_jack() at asoc_simple_init_jack() Carl Philipp Klemm
2022-02-20  0:14             ` Carl Philipp Klemm
2022-02-20  0:15           ` [PATCH 2/6] ASoC: audio-graph-card: use new functionality in simple_card_utils to implement has-hp-jack of property Carl Philipp Klemm
2022-02-20  0:15             ` Carl Philipp Klemm
2022-02-20  0:15           ` [PATCH 3/6] ASoC: cpcap: add headphone jack plug detection support Carl Philipp Klemm
2022-02-20  0:15             ` Carl Philipp Klemm
2022-02-20  0:15           ` [PATCH 4/6] ARM: dts: motorola-mapphone: add interrupt for headphone detection Carl Philipp Klemm
2022-02-20  0:15             ` Carl Philipp Klemm
2022-02-20  0:15           ` [PATCH 5/6] ARM: dts: motorola-mapphone: add has-hp-jack for audio-graph-card Carl Philipp Klemm
2022-02-20  0:15             ` Carl Philipp Klemm
2022-02-20  0:18           ` [PATCH 6/6] Documentation: sound: audio-graph-card: update dts bindings to add has-hp-jack Carl Philipp Klemm
2022-02-20  0:18             ` Carl Philipp Klemm

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=OS3PR01MB8426FD3FD1B45BB31C971A56D4509@OS3PR01MB8426.jpnprd01.prod.outlook.com \
    --to=kuninori.morimoto.gx@renesas.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=kuninori.morimoto.gx@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=merlijn@wizzup.org \
    --cc=philipp@uvos.xyz \
    --cc=sre@kernel.org \
    --cc=tony@atomide.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.