
Adds latest 6.6 patches from the Raspberry Pi repository. These patches were generated from: https://github.com/raspberrypi/linux/commits/rpi-6.6.y/ With the following command: git format-patch -N v6.6.83..HEAD (HEAD -> 08d4e8f52256bd422d8a1f876411603f627d0a82) Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com> (cherry picked from commit 251f76c1c67d62c585d799c38dab31e1385d2ad5)
54 lines
1.8 KiB
Diff
54 lines
1.8 KiB
Diff
From 62c33972e3eb724d80179fb71b05e923920f0b0d Mon Sep 17 00:00:00 2001
|
|
From: Phil Elwell <phil@raspberrypi.com>
|
|
Date: Wed, 8 Jan 2025 16:05:02 +0000
|
|
Subject: [PATCH] ASoC: allo-piano-dac-plus: Remove pointless code
|
|
|
|
The codec control Digital Playback Volume is one of the controls deleted
|
|
by the allo-piano-dac-plus driver. It is effectively replaced by the
|
|
soundcard controls Master Playback Volume and Subwoofer Playback Volume.
|
|
|
|
Delete the code that sets the volume limit on those codec controls - the
|
|
limits on the soundcard volume controls are sufficient.
|
|
|
|
Signed-off-by: Phil Elwell <phil@raspberrypi.com>
|
|
---
|
|
sound/soc/bcm/allo-piano-dac-plus.c | 20 +-------------------
|
|
1 file changed, 1 insertion(+), 19 deletions(-)
|
|
|
|
--- a/sound/soc/bcm/allo-piano-dac-plus.c
|
|
+++ b/sound/soc/bcm/allo-piano-dac-plus.c
|
|
@@ -731,21 +731,6 @@ static int snd_allo_piano_dac_init(struc
|
|
|
|
mutex_init(&glb_ptr->lock);
|
|
|
|
- if (digital_gain_0db_limit) {
|
|
- int ret;
|
|
-
|
|
- //Set volume limit on both dacs
|
|
- for (i = 0; i < ARRAY_SIZE(codec_ctl_pfx); i++) {
|
|
- char cname[256];
|
|
-
|
|
- sprintf(cname, "%s %s", codec_ctl_pfx[i], codec_ctl_name[0]);
|
|
- ret = snd_soc_limit_volume(card, cname, 207);
|
|
- if (ret < 0)
|
|
- dev_warn(card->dev, "Failed to set %s volume limit: %d\n",
|
|
- cname, ret);
|
|
- }
|
|
- }
|
|
-
|
|
// Remove codec controls
|
|
for (i = 0; i < ARRAY_SIZE(codec_ctl_pfx); i++) {
|
|
for (j = 0; j < ARRAY_SIZE(codec_ctl_name); j++) {
|
|
@@ -753,10 +738,7 @@ static int snd_allo_piano_dac_init(struc
|
|
|
|
sprintf(cname, "%s %s", codec_ctl_pfx[i], codec_ctl_name[j]);
|
|
kctl = snd_soc_card_get_kcontrol(card, cname);
|
|
- if (!kctl) {
|
|
- dev_err(rtd->card->dev, "Control %s not found\n",
|
|
- cname);
|
|
- } else {
|
|
+ if (kctl) {
|
|
kctl->vd[0].access =
|
|
SNDRV_CTL_ELEM_ACCESS_READWRITE;
|
|
snd_ctl_remove(card->snd_card, kctl);
|