Linux Sound subsystem development
 help / color / mirror / Atom feed
From: "Ryan Walklin" <ryan@testtoast.com>
To: "Jernej Skrabec" <jernej.skrabec@gmail.com>,
	"Liam Girdwood" <lgirdwood@gmail.com>,
	"Mark Brown" <broonie@kernel.org>,
	"Jaroslav Kysela" <perex@perex.cz>,
	"Takashi Iwai" <tiwai@suse.com>, "Chen-Yu Tsai" <wens@csie.org>,
	"Samuel Holland" <samuel@sholland.org>
Cc: 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>,
	"Rob Herring" <robh@kernel.org>,
	"Philippe Simons" <simons.philippe@gmail.com>
Subject: Re: [PATCH v3 2/5] ASoC: sun4i-codec: correct dapm widgets and controls for h616
Date: Sat, 22 Feb 2025 18:10:46 +1300	[thread overview]
Message-ID: <69bce5eb-c478-4b9f-a875-1e2a8a540898@app.fastmail.com> (raw)
In-Reply-To: <2733255.KRxA6XjA2N@jernej-laptop>

On Fri, 21 Feb 2025, at 8:05 AM, Jernej Škrabec wrote:
> Dne petek, 14. februar 2025 ob 23:02:24 Srednjeevropski standardni čas 
> je Ryan Walklin napisal(a):

>>  static const struct snd_kcontrol_new sun50i_h616_card_controls[] = {
>> -	SOC_DAPM_PIN_SWITCH("LINEOUT"),
>> +	SOC_DAPM_PIN_SWITCH("Speaker"),

> Will this break sun50i-h616-x96-mate and sun50i-h616-orangepi-zero based boards?
> If so, other solution must be found.

My understanding is that this a separate concept from the codec power control itself, which is already covered by the analog and digital power supply DAPM widgets. For the H616's single lineout output, it doesn't make sense to have a separate control for this, as the codec should power off when idle using the existing DAPM widgets, and the lineout route is always active when the codec is on. The LINEOUT control here is redundant, and not connected to any userspace mechanism in the current state. 

However for the RG35XX, which has a speaker amp controlled externally, with audio routed via a passive mux, it make sense to specify this as a separate route in userspace with a corresponding control (via GPIO pin in this case).

The other H616 devices (Orange Pi etc) only have a single route defined in their DTS, and no internal speaker to require a speaker switch. This control does not do anything for them, and removing it should not have an impact. I do not have this hardware to test, but on the RG35XX devices audio is produced without it being present, and with the speaker switch in either state (headphones plugged in and speaker amp off, or speaker amp on and headphones connected).

I did try to convey in the commit message but happy to correct the comment if you feel it is not clear.

Regards,

Ryan

  reply	other threads:[~2025-02-22  5:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-14 22:02 [PATCH v3 0/5] ASoC: sun4i-codec: add headphone dectection for Anbernic RG35XX devices Ryan Walklin
2025-02-14 22:02 ` [PATCH v3 1/5] ASoC: dt-bindings: sun4i-a10-codec: add hp-det-gpios Ryan Walklin
2025-02-14 22:02 ` [PATCH v3 2/5] ASoC: sun4i-codec: correct dapm widgets and controls for h616 Ryan Walklin
2025-02-20 19:05   ` Jernej Škrabec
2025-02-22  5:10     ` Ryan Walklin [this message]
2025-02-14 22:02 ` [PATCH v3 3/5] ASoC: sun4i-codec: support hp-det-gpios property Ryan Walklin
2025-02-14 22:02 ` [PATCH v3 4/5] arm64: dts: allwinner: h700: Add hp-det-gpios for Anbernic RG35XX Ryan Walklin
2025-04-13  9:03   ` Ryan Walklin
2025-02-14 22:02 ` [PATCH v3 5/5] ASoC: sun4i-codec: add h616 card long_name Ryan Walklin
2025-03-14 15:52 ` (subset) [PATCH v3 0/5] ASoC: sun4i-codec: add headphone dectection for Anbernic RG35XX devices Mark Brown
2025-04-13 15:17 ` Chen-Yu Tsai

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=69bce5eb-c478-4b9f-a875-1e2a8a540898@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=robh@kernel.org \
    --cc=samuel@sholland.org \
    --cc=simons.philippe@gmail.com \
    --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