All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Jaroslav Kysela <perex@perex.cz>
Cc: Hans de Goede <hdegoede@redhat.com>,
	alsa-devel@alsa-project.org,
	Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>,
	Bard Liao <bard.liao@intel.com>
Subject: [PATCH alsa-ucm-conf 3/3] bytcr-rt5640: Add support for controlling a speaker-mute LED
Date: Fri,  7 May 2021 15:11:39 +0200	[thread overview]
Message-ID: <20210507131139.10231-4-hdegoede@redhat.com> (raw)
In-Reply-To: <20210507131139.10231-1-hdegoede@redhat.com>

Add support for controlling a speaker-mute LED using the new snd_ctl_led
kernel module for generic mute LED control.

Tested on a HP Pavilion X2 10-n000nd and a HP Pavilion X2 10-p002nd both of
which have a detachable USB keyboard with a speaker mute LED embedded in
the audio-mute button.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
---
 ucm2/bytcr-rt5640/bytcr-rt5640.conf | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/ucm2/bytcr-rt5640/bytcr-rt5640.conf b/ucm2/bytcr-rt5640/bytcr-rt5640.conf
index af966ef..6b54d8f 100644
--- a/ucm2/bytcr-rt5640/bytcr-rt5640.conf
+++ b/ucm2/bytcr-rt5640/bytcr-rt5640.conf
@@ -4,3 +4,9 @@ SectionUseCase."HiFi" {
 	File "HiFi.conf"
 	Comment "Play HiFi quality Music"
 }
+
+FixedBootSequence [
+	exec "/sbin/modprobe snd_ctl_led"
+	sysw "-/class/sound/ctl-led/speaker/card${CardNumber}/attach:Speaker Channel Switch"
+	sysw "-/class/sound/ctl-led/speaker/card${CardNumber}/attach:HP Channel Switch"
+]
-- 
2.31.1


  parent reply	other threads:[~2021-05-07 13:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-07 13:11 [PATCH alsa-ucm-conf 0/3] byt/cht: Add support for controlling mute LEDs using the new snd_ctl_led kmod Hans de Goede
2021-05-07 13:11 ` [PATCH alsa-ucm-conf 1/3] cht-bsw-rt5672: Add support for the components string Hans de Goede
2021-05-07 13:11 ` [PATCH alsa-ucm-conf 2/3] cht-bsw-rt5672: Add support for controlling speaker- and mic-mute LEDs Hans de Goede
2021-05-07 13:11 ` Hans de Goede [this message]
2021-05-18 16:25 ` [PATCH alsa-ucm-conf 0/3] byt/cht: Add support for controlling mute LEDs using the new snd_ctl_led kmod Jaroslav Kysela

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=20210507131139.10231-4-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=alsa-devel@alsa-project.org \
    --cc=bard.liao@intel.com \
    --cc=perex@perex.cz \
    --cc=pierre-louis.bossart@linux.intel.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.