From: "Ryan Walklin" <ryan@testtoast.com>
To: "Chen-Yu Tsai" <wens@csie.org>
Cc: "Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Jaroslav Kysela" <perex@perex.cz>,
"Takashi Iwai" <tiwai@suse.com>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Samuel Holland" <samuel@sholland.org>,
linux-sound@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org,
"Chris Morgan" <macromorgan@hotmail.com>
Subject: Re: [PATCH 2/3] ASoC: sun4i-codec: support hp-det-gpios property
Date: Mon, 23 Dec 2024 10:20:11 +1300 [thread overview]
Message-ID: <982a7d32-ab58-434e-a125-4f7143928caf@app.fastmail.com> (raw)
In-Reply-To: <CAGb2v64qf0jNv72uHUK+aSj0Xt-bf+DW0NCnsZmLf-6xHZF_ew@mail.gmail.com>
Hi Chen-Yu,
Thanks for the review!
On Mon, 23 Dec 2024, at 6:15 AM, Chen-Yu Tsai wrote:
> On Sat, Dec 21, 2024 at 5:41 PM Ryan Walklin <ryan@testtoast.com> wrote:
>> @@ -1635,10 +1681,11 @@ static const struct snd_soc_component_driver sun50i_h616_codec_codec = {
>> };
>>
>> static const struct snd_kcontrol_new sun50i_h616_card_controls[] = {
>> - SOC_DAPM_PIN_SWITCH("LINEOUT"),
>> + SOC_DAPM_PIN_SWITCH("Speaker"),
>
> Why?
The speaker amp is controlled by a GPIO, this needs a specific card control to toggle on and off, discrete from the line-out volume. Muting the output entirely is not what is required, hence the separate control. I also understand (although it is IMO not well documented on the user-space side) that "Speaker" has a specific meaning to the user-space routing. Can add this to the merge message.
>> @@ -1684,7 +1731,7 @@ static struct snd_soc_card *sun50i_h616_codec_create_card(struct device *dev)
>>
>> card->dev = dev;
>> card->owner = THIS_MODULE;
>> - card->name = "H616 Audio Codec";
>> + card->name = "h616-audio-codec";
>
> Why?
As mentioned in the cover letter, ALSA UCM in user space uses the card name to detect and apply the relevant configuration, by loading /usr/share/alsa/ucm2/conf.d/<driver_name>/<card_name>.conf. Spaces are therefore removed in the card name to make this easier to manage. Happy to add this to the commit message too, and this could be changed to card->long_name if it is desired to maintain a human-readable card->name.
See https://github.com/alsa-project/alsa-ucm-conf/pull/491/files for the UCM patch.
>> @@ -1940,6 +1987,14 @@ static int sun4i_codec_probe(struct platform_device *pdev)
>> return ret;
>> }
>>
>> + scodec->gpio_hp = devm_gpiod_get_optional(&pdev->dev, "allwinner,hp-det",
>> + GPIOD_IN);
>
> Just put it on the same line. Lines can go up to 100 characters.
Thanks, will do.
Regards,
Ryan
next prev parent reply other threads:[~2024-12-22 21:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-21 9:26 [PATCH 0/3] ASoC: sun4i-codec: add headphone dectection for Anbernic RG35XX devices Ryan Walklin
2024-12-21 9:26 ` [PATCH 1/3] ASoC: dt-bindings: sun4i-a10-codec: add hp-det-gpios Ryan Walklin
2024-12-22 16:51 ` Chris Morgan
2024-12-22 21:23 ` Ryan Walklin
2024-12-31 13:37 ` Rob Herring
2024-12-21 9:26 ` [PATCH 2/3] ASoC: sun4i-codec: support hp-det-gpios property Ryan Walklin
2024-12-22 17:15 ` Chen-Yu Tsai
2024-12-22 21:20 ` Ryan Walklin [this message]
2025-01-01 8:56 ` Chen-Yu Tsai
2025-01-07 21:33 ` Ryan Walklin
2024-12-21 9:26 ` [PATCH 3/3] arm64: dts: allwinner: h700: Add hp-det-gpios for Anbernic RG35XX Ryan Walklin
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=982a7d32-ab58-434e-a125-4f7143928caf@app.fastmail.com \
--to=ryan@testtoast.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jernej.skrabec@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-sound@vger.kernel.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=macromorgan@hotmail.com \
--cc=perex@perex.cz \
--cc=samuel@sholland.org \
--cc=tiwai@suse.com \
--cc=wens@csie.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