Skip to content

add rt713 & rt1318 LED control#512

Closed
shumingfan wants to merge 3 commits intoalsa-project:masterfrom
shumingfan:rt713-rt1318-led-ctl
Closed

add rt713 & rt1318 LED control#512
shumingfan wants to merge 3 commits intoalsa-project:masterfrom
shumingfan:rt713-rt1318-led-ctl

Conversation

@shumingfan
Copy link
Copy Markdown
Contributor

add rt713 & rt1318 LED control

oortcomet and others added 3 commits February 26, 2025 16:38
Signed-off-by: Derek Fang <derek.fang@realtek.com>
This patch adds rt712/rt713 FU05 Playback Switch control in the headphone section.

Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
@mrhpearson
Copy link
Copy Markdown

Just a note that I've tested this on Fedora 41 on a X1 Carbon G13 (Lunarlake) and can confirm that both Mic and Speaker LEDs are working correctly.

(I did pull in upstream kernel commit as well https://patchwork.kernel.org/project/alsa-devel/patch/20250226084728.1889082-1-shumingf@realtek.com/ )

@Ameer-Ivan
Copy link
Copy Markdown

To add to this, I've also tested on X1 Carbon G13 and an X1 2-in-1 Gen 10 (both LunarLake) and also confirmed that the Mic and speaker LED's are working correctly. @perexg apologies for suddenly pulling you in, may I ask for your help in reviewing this patch? we are trying to get this included on the upcoming SRU cycle on 3/14 if possible.

perexg pushed a commit to perexg/alsa-ucm-conf that referenced this pull request Mar 11, 2025
Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit to perexg/alsa-ucm-conf that referenced this pull request Mar 11, 2025
This patch adds rt712/rt713 FU05 Playback Switch control in the headphone section.

Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit to perexg/alsa-ucm-conf that referenced this pull request Mar 11, 2025
Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit to perexg/alsa-ucm-conf that referenced this pull request Mar 11, 2025
Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit to perexg/alsa-ucm-conf that referenced this pull request Mar 11, 2025
This patch adds rt712/rt713 FU05 Playback Switch control in the headphone section.

Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit to perexg/alsa-ucm-conf that referenced this pull request Mar 11, 2025
Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
cset "name='rt713 FU05 Playback Switch' off"
]

ConflictingDevice [
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like this settings. Is there other reason other than LED control to mark those devices conflicting together?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@perexg The customer's machine has one speaker mute LED and also wants to mute the output of the headphones.
Therefore, we added device conflicting to avoid the speaker being on while the headphones are plugged.
e.g.
We registered two controls for the speaker mute LED.
attach:rt1318-1 DAC Switch
attach:rt713 FU05 Playback Switch
The kernel driver (control_led.c) will check these two controls. These two controls turn off, LED could turn ON.
Therefore, we set conflicting devices for the speaker and headphones each other.

perexg pushed a commit to perexg/alsa-ucm-conf that referenced this pull request Mar 11, 2025
This patch adds rt712/rt713 FU05 Playback Switch control in the headphone section.

Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit to perexg/alsa-ucm-conf that referenced this pull request Mar 11, 2025
Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg
Copy link
Copy Markdown
Member

perexg commented Mar 11, 2025

I tried to improve the LED settings in PR #517 and included those changes (except the ConflictingDevice change). It would be nice, if you can retest those changes, too.

@perexg
Copy link
Copy Markdown
Member

perexg commented Mar 11, 2025

Also, starring at PR #487, we need really define the circumstances when LEDs should follow some inputs or outputs. For me, the logical way is to follow only internal microphone and internal speakers. If you plug USB headset for example, then LEDs are not controlled, too. It should be highly confusing to users.

Also see issue #440 . Here user expects different way, but "selected output" is problem for external hw like mentioned USB devices.

@shumingfan
Copy link
Copy Markdown
Contributor Author

I tried to improve the LED settings in PR #517 and included those changes (except the ConflictingDevice change). It would be nice, if you can retest those changes, too.

@perexg I will test PR #517 tomorrow. If there are any results, I will get back to you.

@shumingfan
Copy link
Copy Markdown
Contributor Author

I tried to improve the LED settings in PR #517 and included those changes (except the ConflictingDevice change). It would be nice, if you can retest those changes, too.

@perexg I will test PR #517 tomorrow. If there are any results, I will get back to you.

@perexg I tested PR #517 on Lenovo machine (rt713+rt1318).
The capture devices(headset mic/internal mic) can control LED on/off.
The playback devices(internal speaker + headphones) can't control LED on/off.
Unless I add the conflicting device "speaker" in the Headphones section.
As I mentioned (#512 (comment)), the kernel driver will check all attached speaker controls to decide the LED on/off.

perexg pushed a commit to perexg/alsa-ucm-conf that referenced this pull request Mar 13, 2025
Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@perexg
Copy link
Copy Markdown
Member

perexg commented Mar 13, 2025

As I wrote, we should probably drop the LED bindings for headphones/headsets. I updated my PR #517, so only rt1318 speaker changes (with a little fix for mixer controls) are kept . I am open to any discussion for the explanation in https://github.com/alsa-project/alsa-ucm-conf/blob/4f10a8491fbb1819fe99b926de2ab1ec8befdfc7/ucm2/common/ctl/led.conf .

@perexg perexg closed this in 8b42ca5 Mar 15, 2025
jglathe pushed a commit to jglathe/alsa-ucm-conf that referenced this pull request Mar 22, 2025
Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
perexg pushed a commit that referenced this pull request Mar 31, 2025
As per conversation in [1], let headsets be dropped from LED bindings.

[1]: #512

Link: https://lore.kernel.org/alsa-devel/20250328134809.3008238-1-mstrozek@opensource.cirrus.com/
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sigurs pushed a commit to Sigurs/alsa-ucm-conf that referenced this pull request Apr 22, 2025
Closes: alsa-project#512
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Signed-off-by: Shuming Fan <shumingf@realtek.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Sigurs pushed a commit to Sigurs/alsa-ucm-conf that referenced this pull request Apr 22, 2025
As per conversation in [1], let headsets be dropped from LED bindings.

[1]: alsa-project#512

Link: https://lore.kernel.org/alsa-devel/20250328134809.3008238-1-mstrozek@opensource.cirrus.com/
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
@shumingfan shumingfan deleted the rt713-rt1318-led-ctl branch June 6, 2025 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants