* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema
From: Rhodes, David @ 2026-06-24 20:05 UTC (permalink / raw)
To: Rob Herring, David Heidelberg
Cc: David Rhodes, Richard Fitzgerald, Liam Girdwood, Mark Brown,
Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas,
linux-sound, devicetree, linux-kernel, phone-devel
In-Reply-To: <20260624194541.GA672824-robh@kernel.org>
On 6/24/26 2:45 PM, Rob Herring wrote:
> On Wed, Jun 24, 2026 at 08:39:28PM +0200, David Heidelberg wrote:
>> On 24/06/2026 20:17, Rob Herring wrote:
>>> On Wed, Jun 24, 2026 at 11:02 AM David Heidelberg via B4 Relay
>>> <devnull+david.ixit.cz@kernel.org> wrote:
>>>>
>>>> From: David Heidelberg <david@ixit.cz>
>>>>
>>>> Convert CS35L36 Speaker Amplifier to yaml.
>>>>
>>>> Changes:
>>>> - maintainers email to the generic Cirrus email
>>>> - Both the codec and downstream worked just fine without
>>>> VP-supply provided. Align with datasheet for similar models.
>>>> - add dai-common.yaml to cover for '#sound-dai-cells',
>>>> 'sound-name-prefix'
>>>>
>>>> Reviewed-by: David Rhodes <David.Rhodes@cirrus.com>
>>>
>>> If you are going to take stuff I haven't fixed:
>>>
>>> Assisted-by: OpenAI:gpt-4
>>>
>>> (I don't remember the exact flavor I used)
>>>
>>>> Co-developed-by: Rob Herring (Arm) <robh@kernel.org>
>>>> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
>>>> Signed-off-by: David Heidelberg <david@ixit.cz>
>>>> ---
>>>> Relevant for Pixel 3 / 3XL / 4.
>>>> ---
>>>> Changes in v2:
>>>> - Rename the commit. (Mark)
>>>> - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz
>>>> ---
>>>> .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++
>>>> .../devicetree/bindings/sound/cs35l36.txt | 168 ----------------
>>>> 2 files changed, 224 insertions(+), 168 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
>>>> new file mode 100644
>>>> index 0000000000000..af0acaaefb68e
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
>>>> @@ -0,0 +1,224 @@
>>>> +# SPDX-License-Identifier: GPL-2.0-only
>>>> +%YAML 1.2
>>>> +---
>>>> +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Cirrus Logic CS35L36 Speaker Amplifier
>>>> +
>>>> +maintainers:
>>>> + - patches@opensource.cirrus.com
>>>> + - Bjorn Helgaas <bhelgaas@google.com>
>>>
>>> Bjorn is not correct. Generally we want a person, not a company list.
>>
>> I'm adding back James, can I keep the patches at 2nd place?
>
> Yes.
Please put me down and the patches list as well. James will not respond
at that address any longer.
>
>>>> + cirrus,vpbr-thld:
>>>> + description: Initial VPBR threshold voltage
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
minimum: 2
maximum: 31
>>>> +
>>>> + cirrus,vpbr-atk-rate:
>>>> + description: Attenuation attack step rate
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
minimum: 0
maximum: 7
>>>> + cirrus,vpbr-atk-vol:
>>>> + description: VP brownout prevention step size
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
minimum: 0
maximum: 7
>>>> + cirrus,vpbr-max-attn:
>>>> + description: Maximum attenuation during VP brownout prevention
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
minimum: 0
maximum: 15
this is just an integer dB value
>>>> + cirrus,vpbr-wait:
>>>> + description: Delay between brownout clearance and attenuation release
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +enum:
- 0 # 10ms
- 1 # 100ms (Default)
- 2 # 250ms
- 3 # 500ms
>>>> + cirrus,vpbr-rel-rate:
>>>> + description: Attenuation release step rate
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
minimum: 0
maximum: 7
>>>> + cirrus,vpbr-mute-en:
>>>> + description: Mute audio if maximum attenuation reached
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>
minimum: 0
maximum: 1
>>> Constraints on any of these?
>>
>> Code just applies whatever is thrown at it, maybe David knows more?
>>
>> #nodatasheet (but would be lovely to have one)
>
> Unless the driver just takes these values and shoves them straight into
> a 32-bit register, the driver should give some clue about the size or
> possible values.
>
> Rob
>
Got some constraints for you.
Thanks,
David
^ permalink raw reply
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema
From: David Heidelberg @ 2026-06-24 20:04 UTC (permalink / raw)
To: Rob Herring
Cc: David Rhodes, Richard Fitzgerald, Liam Girdwood, Mark Brown,
Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas,
linux-sound, devicetree, linux-kernel, phone-devel
In-Reply-To: <20260624194541.GA672824-robh@kernel.org>
On 24/06/2026 21:45, Rob Herring wrote:
> On Wed, Jun 24, 2026 at 08:39:28PM +0200, David Heidelberg wrote:
>> On 24/06/2026 20:17, Rob Herring wrote:
>>> On Wed, Jun 24, 2026 at 11:02 AM David Heidelberg via B4 Relay
>>> <devnull+david.ixit.cz@kernel.org> wrote:
>>>>
>>>> From: David Heidelberg <david@ixit.cz>
>>>>
>>>> Convert CS35L36 Speaker Amplifier to yaml.
>>>>
>>>> Changes:
>>>> - maintainers email to the generic Cirrus email
>>>> - Both the codec and downstream worked just fine without
>>>> VP-supply provided. Align with datasheet for similar models.
>>>> - add dai-common.yaml to cover for '#sound-dai-cells',
>>>> 'sound-name-prefix'
>>>>
>>>> Reviewed-by: David Rhodes <David.Rhodes@cirrus.com>
>>>
>>> If you are going to take stuff I haven't fixed:
>>>
>>> Assisted-by: OpenAI:gpt-4
>>>
>>> (I don't remember the exact flavor I used)
>>>
>>>> Co-developed-by: Rob Herring (Arm) <robh@kernel.org>
>>>> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
>>>> Signed-off-by: David Heidelberg <david@ixit.cz>
>>>> ---
>>>> Relevant for Pixel 3 / 3XL / 4.
>>>> ---
>>>> Changes in v2:
>>>> - Rename the commit. (Mark)
>>>> - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz
>>>> ---
>>>> .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++
>>>> .../devicetree/bindings/sound/cs35l36.txt | 168 ----------------
>>>> 2 files changed, 224 insertions(+), 168 deletions(-)
>>>>
>>>> diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
>>>> new file mode 100644
>>>> index 0000000000000..af0acaaefb68e
>>>> --- /dev/null
>>>> +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
>>>> @@ -0,0 +1,224 @@
>>>> +# SPDX-License-Identifier: GPL-2.0-only
>>>> +%YAML 1.2
>>>> +---
>>>> +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml#
>>>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>>>> +
>>>> +title: Cirrus Logic CS35L36 Speaker Amplifier
>>>> +
>>>> +maintainers:
>>>> + - patches@opensource.cirrus.com
>>>> + - Bjorn Helgaas <bhelgaas@google.com>
>>>
>>> Bjorn is not correct. Generally we want a person, not a company list.
>>
>> I'm adding back James, can I keep the patches at 2nd place?
>
> Yes.
>
>>>> + cirrus,vpbr-thld:
>>>> + description: Initial VPBR threshold voltage
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
>>>> + cirrus,vpbr-atk-rate:
>>>> + description: Attenuation attack step rate
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
>>>> + cirrus,vpbr-atk-vol:
>>>> + description: VP brownout prevention step size
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
>>>> + cirrus,vpbr-max-attn:
>>>> + description: Maximum attenuation during VP brownout prevention
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
>>>> + cirrus,vpbr-wait:
>>>> + description: Delay between brownout clearance and attenuation release
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
>>>> + cirrus,vpbr-rel-rate:
>>>> + description: Attenuation release step rate
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>> +
>>>> + cirrus,vpbr-mute-en:
>>>> + description: Mute audio if maximum attenuation reached
>>>> + $ref: /schemas/types.yaml#/definitions/uint32
>>>
>>> Constraints on any of these?
>>
>> Code just applies whatever is thrown at it, maybe David knows more?
>>
>> #nodatasheet (but would be lovely to have one)
>
> Unless the driver just takes these values and shoves them straight into
> a 32-bit register, the driver should give some clue about the size or
> possible values.
Okay, that's me being too lazy. Fair enough, I'll fill the constraints :)
Thanks
David
>
> Rob
--
David Heidelberg
^ permalink raw reply
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema
From: Rob Herring @ 2026-06-24 19:45 UTC (permalink / raw)
To: David Heidelberg
Cc: David Rhodes, Richard Fitzgerald, Liam Girdwood, Mark Brown,
Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas,
linux-sound, devicetree, linux-kernel, phone-devel
In-Reply-To: <3873b111-36d5-442e-996c-31d05d23c8e8@ixit.cz>
On Wed, Jun 24, 2026 at 08:39:28PM +0200, David Heidelberg wrote:
> On 24/06/2026 20:17, Rob Herring wrote:
> > On Wed, Jun 24, 2026 at 11:02 AM David Heidelberg via B4 Relay
> > <devnull+david.ixit.cz@kernel.org> wrote:
> > >
> > > From: David Heidelberg <david@ixit.cz>
> > >
> > > Convert CS35L36 Speaker Amplifier to yaml.
> > >
> > > Changes:
> > > - maintainers email to the generic Cirrus email
> > > - Both the codec and downstream worked just fine without
> > > VP-supply provided. Align with datasheet for similar models.
> > > - add dai-common.yaml to cover for '#sound-dai-cells',
> > > 'sound-name-prefix'
> > >
> > > Reviewed-by: David Rhodes <David.Rhodes@cirrus.com>
> >
> > If you are going to take stuff I haven't fixed:
> >
> > Assisted-by: OpenAI:gpt-4
> >
> > (I don't remember the exact flavor I used)
> >
> > > Co-developed-by: Rob Herring (Arm) <robh@kernel.org>
> > > Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> > > Signed-off-by: David Heidelberg <david@ixit.cz>
> > > ---
> > > Relevant for Pixel 3 / 3XL / 4.
> > > ---
> > > Changes in v2:
> > > - Rename the commit. (Mark)
> > > - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz
> > > ---
> > > .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++
> > > .../devicetree/bindings/sound/cs35l36.txt | 168 ----------------
> > > 2 files changed, 224 insertions(+), 168 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
> > > new file mode 100644
> > > index 0000000000000..af0acaaefb68e
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
> > > @@ -0,0 +1,224 @@
> > > +# SPDX-License-Identifier: GPL-2.0-only
> > > +%YAML 1.2
> > > +---
> > > +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml#
> > > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > > +
> > > +title: Cirrus Logic CS35L36 Speaker Amplifier
> > > +
> > > +maintainers:
> > > + - patches@opensource.cirrus.com
> > > + - Bjorn Helgaas <bhelgaas@google.com>
> >
> > Bjorn is not correct. Generally we want a person, not a company list.
>
> I'm adding back James, can I keep the patches at 2nd place?
Yes.
> > > + cirrus,vpbr-thld:
> > > + description: Initial VPBR threshold voltage
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > +
> > > + cirrus,vpbr-atk-rate:
> > > + description: Attenuation attack step rate
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > +
> > > + cirrus,vpbr-atk-vol:
> > > + description: VP brownout prevention step size
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > +
> > > + cirrus,vpbr-max-attn:
> > > + description: Maximum attenuation during VP brownout prevention
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > +
> > > + cirrus,vpbr-wait:
> > > + description: Delay between brownout clearance and attenuation release
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > +
> > > + cirrus,vpbr-rel-rate:
> > > + description: Attenuation release step rate
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> > > +
> > > + cirrus,vpbr-mute-en:
> > > + description: Mute audio if maximum attenuation reached
> > > + $ref: /schemas/types.yaml#/definitions/uint32
> >
> > Constraints on any of these?
>
> Code just applies whatever is thrown at it, maybe David knows more?
>
> #nodatasheet (but would be lovely to have one)
Unless the driver just takes these values and shoves them straight into
a 32-bit register, the driver should give some clue about the size or
possible values.
Rob
^ permalink raw reply
* [PATCH] ALSA: hda/realtek: Add quirk for Acer Nitro ANV15-41
From: Oleg4260 @ 2026-06-24 19:13 UTC (permalink / raw)
To: linux-sound; +Cc: tiwai, Oleg Kucheryavenko
From: Oleg Kucheryavenko <oleg.kucheryavenko2018@gmail.com>
The Acer Nitro ANV15-41 laptop with ALC245 codec does not
detect the headset microphone in the combo jack by default.
Apply the ALC2XX_FIXUP_HEADSET_MIC quirk to fix it.
Signed-off-by: Oleg Kucheryavenko <oleg.kucheryavenko2018@gmail.com>
---
sound/hda/codecs/realtek/alc269.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index 5d09baa6d32e..2bb42ebb9638 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -6812,6 +6812,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x1025, 0x169a, "Acer Swift SFG16", ALC256_FIXUP_ACER_SFG16_MICMUTE_LED),
SND_PCI_QUIRK(0x1025, 0x171e, "Acer Nitro ANV15-51", ALC245_FIXUP_ACER_MICMUTE_LED),
SND_PCI_QUIRK(0x1025, 0x173a, "Acer Swift SFG14-73", ALC245_FIXUP_ACER_MICMUTE_LED),
+ SND_PCI_QUIRK(0x1025, 0x1758, "Acer Nitro ANV15-41", ALC2XX_FIXUP_HEADSET_MIC),
SND_PCI_QUIRK(0x1025, 0x1826, "Acer Helios ZPC", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1025, 0x182c, "Acer Helios ZPD", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
SND_PCI_QUIRK(0x1025, 0x1844, "Acer Helios ZPS", ALC287_FIXUP_PREDATOR_SPK_CS35L41_I2C_2),
--
2.54.0
^ permalink raw reply related
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema
From: David Heidelberg @ 2026-06-24 18:39 UTC (permalink / raw)
To: Rob Herring, David Rhodes
Cc: Richard Fitzgerald, Liam Girdwood, Mark Brown,
Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas,
linux-sound, devicetree, linux-kernel, phone-devel
In-Reply-To: <CAL_JsqLE8Z-LbeF9r=sqRqAoGUcs7R-T4cN+hF3QzjGydHctgQ@mail.gmail.com>
On 24/06/2026 20:17, Rob Herring wrote:
> On Wed, Jun 24, 2026 at 11:02 AM David Heidelberg via B4 Relay
> <devnull+david.ixit.cz@kernel.org> wrote:
>>
>> From: David Heidelberg <david@ixit.cz>
>>
>> Convert CS35L36 Speaker Amplifier to yaml.
>>
>> Changes:
>> - maintainers email to the generic Cirrus email
>> - Both the codec and downstream worked just fine without
>> VP-supply provided. Align with datasheet for similar models.
>> - add dai-common.yaml to cover for '#sound-dai-cells',
>> 'sound-name-prefix'
>>
>> Reviewed-by: David Rhodes <David.Rhodes@cirrus.com>
>
> If you are going to take stuff I haven't fixed:
>
> Assisted-by: OpenAI:gpt-4
>
> (I don't remember the exact flavor I used)
>
>> Co-developed-by: Rob Herring (Arm) <robh@kernel.org>
>> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
>> Signed-off-by: David Heidelberg <david@ixit.cz>
>> ---
>> Relevant for Pixel 3 / 3XL / 4.
>> ---
>> Changes in v2:
>> - Rename the commit. (Mark)
>> - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz
>> ---
>> .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++
>> .../devicetree/bindings/sound/cs35l36.txt | 168 ----------------
>> 2 files changed, 224 insertions(+), 168 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
>> new file mode 100644
>> index 0000000000000..af0acaaefb68e
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
>> @@ -0,0 +1,224 @@
>> +# SPDX-License-Identifier: GPL-2.0-only
>> +%YAML 1.2
>> +---
>> +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml#
>> +$schema: http://devicetree.org/meta-schemas/core.yaml#
>> +
>> +title: Cirrus Logic CS35L36 Speaker Amplifier
>> +
>> +maintainers:
>> + - patches@opensource.cirrus.com
>> + - Bjorn Helgaas <bhelgaas@google.com>
>
> Bjorn is not correct. Generally we want a person, not a company list.
I'm adding back James, can I keep the patches at 2nd place?
>
>> +
>> +description: |
>
> Don't need '|'.
>
>> + CS35L36 is a boosted mono Class D amplifier
>> +
>> +allOf:
>> + - $ref: /schemas/sound/dai-common.yaml#
>> +
>> +properties:
>> + compatible:
>> + enum:
>> + - cirrus,cs35l36
>> +
>> + reg:
>> + maxItems: 1
>> +
>> + interrupts:
>> + maxItems: 1
>> +
>> + VA-supply:
>> + description: Voltage regulator of analog internal section
>> +
>> + VP-supply:
>> + description: Voltage regulator of boost converter
>> +
>> + reset-gpios:
>> + maxItems: 1
>> +
>> + cirrus,boost-ctl-millivolt:
>> + description: Boost converter output voltage in millivolts (step 50)
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + minimum: 2550
>> + maximum: 12000
>> +
>> + cirrus,boost-peak-milliamp:
>> + description: Boost-converter peak current limit in mA (step 50)
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + default: 4500
>> + minimum: 1600
>> + maximum: 4500
>> +
>> + cirrus,boost-ind-nanohenry:
>> + description: Initial inductor estimation reference value in nanohenry (1000=1μH, 1200=1.2μH)
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + default: 1000
>> +
>> + cirrus,multi-amp-mode:
>> + description: Hi-Z ASP port when more than one amplifier in system.
>> + type: boolean
>> +
>> + cirrus,boost-ctl-select:
>> + description: Boost converter control source selection
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + default: 0x01
>> + enum:
>> + - 0x00 # Control Port
>> + - 0x01 # Class
>> + - 0x10 # Sync
>> +
>> + cirrus,amp-pcm-inv:
>> + description: Invert incoming PCM data when true.
>> + type: boolean
>> +
>> + cirrus,imon-pol-inv:
>> + description: Invert polarity of outbound IMON feedback when true.
>> + type: boolean
>> +
>> + cirrus,vmon-pol-inv:
>> + description: Invert polarity of outbound VMON feedback when true.
>> + type: boolean
>> +
>> + cirrus,dcm-mode-enable:
>> + description: Enable boost converter automatic Discontinuous Conduction Mode.
>> + type: boolean
>> +
>> + cirrus,weak-fet-disable:
>> + description: Reduce output driver strength in Weak-FET Drive Mode when true.
>> + type: boolean
>> +
>> + cirrus,classh-wk-fet-delay:
>> + description: Weak-FET entry delay in ms
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + default: 100
>
> How? Range is 0-7.
Oh yeah, this was not thought, in next revision I converted this to
cirrus,classh-wk-fet-delay mentioned in the example. Then I checked for it in
the code, nowhere implemented or used, thus I switched to
cirrus,classh-wk-fet-delay-ms and using the values directly.
>
>> + enum:
>> + - 0 # 0
>> + - 1 # 5
>> + - 2 # 10
>> + - 3 # 50
>> + - 4 # 100
>> + - 5 # 200
>> + - 6 # 500
>> + - 7 # 1000
>> +
>> + cirrus,classh-weak-fet-thld-millivolt:
>> + description: Weak-FET drive threshold in mV
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + enum: [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700]
>> +
>> + cirrus,temp-warn-threshold:
>> + description: Overtemperature warning threshold
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + default: 2
>> + enum:
>> + - 0 # 105°C
>> + - 1 # 115°C
>> + - 2 # 125°C
>> + - 3 # 135°C
>> +
>> + cirrus,irq-drive-select:
>> + description: Interrupt output driver type
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + default: 1
>> + enum:
>> + - 0 # open-drain
>> + - 1 # push-pull
>> +
>> + cirrus,irq-gpio-select:
>> + description: Programmable IRQ pin selection
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + enum:
>> + - 0 # PDM_DATA/SWIRE_SD/INT
>> + - 1 # GPIO
>> +
>> + cirrus,vpbr-config:
>> + description: Brownout prevention configuration sub-node
>> + type: object
>> + additionalProperties: false
>> +
>> + properties:
>> + cirrus,vpbr-en:
>> + description: VBST brownout prevention enable
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> + default: 0
>> + enum:
>> + - 0 # disabled
>> + - 1 # enabled
>> +
>> + cirrus,vpbr-thld:
>> + description: Initial VPBR threshold voltage
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> +
>> + cirrus,vpbr-atk-rate:
>> + description: Attenuation attack step rate
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> +
>> + cirrus,vpbr-atk-vol:
>> + description: VP brownout prevention step size
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> +
>> + cirrus,vpbr-max-attn:
>> + description: Maximum attenuation during VP brownout prevention
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> +
>> + cirrus,vpbr-wait:
>> + description: Delay between brownout clearance and attenuation release
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> +
>> + cirrus,vpbr-rel-rate:
>> + description: Attenuation release step rate
>> + $ref: /schemas/types.yaml#/definitions/uint32
>> +
>> + cirrus,vpbr-mute-en:
>> + description: Mute audio if maximum attenuation reached
>> + $ref: /schemas/types.yaml#/definitions/uint32
>
> Constraints on any of these?
Code just applies whatever is thrown at it, maybe David knows more?
#nodatasheet (but would be lovely to have one)
David
>
>> +
>> +required:
>> + - compatible
>> + - reg
>> + - interrupts
>> + - VA-supply
>> +
>> +unevaluatedProperties: false
>> +
>> +examples:
>> + - |
>> + #include <dt-bindings/gpio/gpio.h>
>> + #include <dt-bindings/interrupt-controller/irq.h>
>> +
>> + i2c {
>> + #address-cells = <1>;
>> + #size-cells = <0>;
>> +
>> + codec@40 {
>> + compatible = "cirrus,cs35l36";
>> + reg = <0x40>;
>> + VA-supply = <&dummy_vreg>;
>> + VP-supply = <&dummy_vreg>;
>> + reset-gpios = <&gpio0 54 GPIO_ACTIVE_HIGH>;
>> + interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
>> +
>> + cirrus,boost-ind-nanohenry = <1000>;
>> + cirrus,boost-ctl-millivolt = <10000>;
>> + cirrus,boost-peak-milliamp = <4500>;
>> + cirrus,boost-ctl-select = <0x00>;
>> + cirrus,weak-fet-delay = <4>;
>> + cirrus,weak-fet-thld = <0x01>;
>> + cirrus,temp-warn-threshold = <1>;
>> + cirrus,multi-amp-mode;
>> + cirrus,irq-drive-select = <1>;
>> + cirrus,irq-gpio-select = <0x01>;
>> +
>> + cirrus,vpbr-config {
>> + cirrus,vpbr-en = <0>;
>> + cirrus,vpbr-thld = <0x05>;
>> + cirrus,vpbr-atk-rate = <0x02>;
>> + cirrus,vpbr-atk-vol = <0x01>;
>> + cirrus,vpbr-max-attn = <0x09>;
>> + cirrus,vpbr-wait = <0x01>;
>> + cirrus,vpbr-rel-rate = <0x05>;
>> + cirrus,vpbr-mute-en = <0x00>;
>> + };
>> + };
>> + };
>> +...
>> diff --git a/Documentation/devicetree/bindings/sound/cs35l36.txt b/Documentation/devicetree/bindings/sound/cs35l36.txt
>> deleted file mode 100644
>> index d34117b8558e5..0000000000000
>> --- a/Documentation/devicetree/bindings/sound/cs35l36.txt
>> +++ /dev/null
>> @@ -1,168 +0,0 @@
>> -CS35L36 Speaker Amplifier
>> -
>> -Required properties:
>> -
>> - - compatible : "cirrus,cs35l36"
>> -
>> - - reg : the I2C address of the device for I2C
>> -
>> - - VA-supply, VP-supply : power supplies for the device,
>> - as covered in
>> - Documentation/devicetree/bindings/regulator/regulator.txt.
>> -
>> - - cirrus,boost-ctl-millivolt : Boost Voltage Value. Configures the boost
>> - converter's output voltage in mV. The range is from 2550mV to 12000mV with
>> - increments of 50mV.
>> - (Default) VP
>> -
>> - - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
>> - Configures the peak current by monitoring the current through the boost FET.
>> - Range starts at 1600mA and goes to a maximum of 4500mA with increments of
>> - 50mA.
>> - (Default) 4.50 Amps
>> -
>> - - cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value.
>> - Seeds the digital boost converter's inductor estimation block with the initial
>> - inductance value to reference.
>> -
>> - 1000 = 1uH (Default)
>> - 1200 = 1.2uH
>> -
>> -Optional properties:
>> - - cirrus,multi-amp-mode : Boolean to determine if there are more than
>> - one amplifier in the system. If more than one it is best to Hi-Z the ASP
>> - port to prevent bus contention on the output signal
>> -
>> - - cirrus,boost-ctl-select : Boost converter control source selection.
>> - Selects the source of the BST_CTL target VBST voltage for the boost
>> - converter to generate.
>> - 0x00 - Control Port Value
>> - 0x01 - Class H Tracking (Default)
>> - 0x10 - MultiDevice Sync Value
>> -
>> - - cirrus,amp-pcm-inv : Boolean to determine Amplifier will invert incoming
>> - PCM data
>> -
>> - - cirrus,imon-pol-inv : Boolean to determine Amplifier will invert the
>> - polarity of outbound IMON feedback data
>> -
>> - - cirrus,vmon-pol-inv : Boolean to determine Amplifier will invert the
>> - polarity of outbound VMON feedback data
>> -
>> - - cirrus,dcm-mode-enable : Boost converter automatic DCM Mode enable.
>> - This enables the digital boost converter to operate in a low power
>> - (Discontinuous Conduction) mode during low loading conditions.
>> -
>> - - cirrus,weak-fet-disable : Boolean : The strength of the output drivers is
>> - reduced when operating in a Weak-FET Drive Mode and must not be used to drive
>> - a large load.
>> -
>> - - cirrus,classh-wk-fet-delay : Weak-FET entry delay. Controls the delay
>> - (in ms) before the Class H algorithm switches to the weak-FET voltage
>> - (after the audio falls and remains below the value specified in WKFET_AMP_THLD).
>> -
>> - 0 = 0ms
>> - 1 = 5ms
>> - 2 = 10ms
>> - 3 = 50ms
>> - 4 = 100ms (Default)
>> - 5 = 200ms
>> - 6 = 500ms
>> - 7 = 1000ms
>> -
>> - - cirrus,classh-weak-fet-thld-millivolt : Weak-FET amplifier drive threshold.
>> - Configures the signal threshold at which the PWM output stage enters
>> - weak-FET operation. The range is 50mV to 700mV in 50mV increments.
>> -
>> - - cirrus,temp-warn-threshold : Amplifier overtemperature warning threshold.
>> - Configures the threshold at which the overtemperature warning condition occurs.
>> - When the threshold is met, the overtemperature warning attenuation is applied
>> - and the TEMP_WARN_EINT interrupt status bit is set.
>> - If TEMP_WARN_MASK = 0, INTb is asserted.
>> -
>> - 0 = 105C
>> - 1 = 115C
>> - 2 = 125C (Default)
>> - 3 = 135C
>> -
>> - - cirrus,irq-drive-select : Selects the driver type of the selected interrupt
>> - output.
>> -
>> - 0 = Open-drain
>> - 1 = Push-pull (Default)
>> -
>> - - cirrus,irq-gpio-select : Selects the pin to serve as the programmable
>> - interrupt output.
>> -
>> - 0 = PDM_DATA / SWIRE_SD / INT (Default)
>> - 1 = GPIO
>> -
>> -Optional properties for the "cirrus,vpbr-config" Sub-node
>> -
>> - - cirrus,vpbr-en : VBST brownout prevention enable. Configures whether the
>> - VBST brownout prevention algorithm is enabled or disabled.
>> -
>> - 0 = VBST brownout prevention disabled (default)
>> - 1 = VBST brownout prevention enabled
>> -
>> - See Section 7.31.1 VPBR Config for configuration options & further details
>> -
>> - - cirrus,vpbr-thld : Initial VPBR threshold. Configures the VP brownout
>> - threshold voltage
>> -
>> - - cirrus,cirrus,vpbr-atk-rate : Attenuation attack step rate. Configures the
>> - amount delay between consecutive volume attenuation steps when a brownout
>> - condition is present and the VP brownout condition is in an attacking state.
>> -
>> - - cirrus,vpbr-atk-vol : VP brownout prevention step size. Configures the VP
>> - brownout prevention attacking attenuation step size when operating in either
>> - digital volume or analog gain modes.
>> -
>> - - cirrus,vpbr-max-attn : Maximum attenuation that the VP brownout prevention
>> - can apply to the audio signal.
>> -
>> - - cirrus,vpbr-wait : Configures the delay time between a brownout condition
>> - no longer being present and the VP brownout prevention entering an attenuation
>> - release state.
>> -
>> - - cirrus,vpbr-rel-rate : Attenuation release step rate. Configures the delay
>> - between consecutive volume attenuation release steps when a brownout condition
>> - is not longer present and the VP brownout is in an attenuation release state.
>> -
>> - - cirrus,vpbr-mute-en : During the attack state, if the vpbr-max-attn value
>> - is reached, the error condition still remains, and this bit is set, the audio
>> - is muted.
>> -
>> -Example:
>> -
>> -cs35l36: cs35l36@40 {
>> - compatible = "cirrus,cs35l36";
>> - reg = <0x40>;
>> - VA-supply = <&dummy_vreg>;
>> - VP-supply = <&dummy_vreg>;
>> - reset-gpios = <&gpio0 54 0>;
>> - interrupt-parent = <&gpio8>;
>> - interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
>> -
>> - cirrus,boost-ind-nanohenry = <1000>;
>> - cirrus,boost-ctl-millivolt = <10000>;
>> - cirrus,boost-peak-milliamp = <4500>;
>> - cirrus,boost-ctl-select = <0x00>;
>> - cirrus,weak-fet-delay = <0x04>;
>> - cirrus,weak-fet-thld = <0x01>;
>> - cirrus,temp-warn-threshold = <0x01>;
>> - cirrus,multi-amp-mode;
>> - cirrus,irq-drive-select = <0x01>;
>> - cirrus,irq-gpio-select = <0x01>;
>> -
>> - cirrus,vpbr-config {
>> - cirrus,vpbr-en = <0x00>;
>> - cirrus,vpbr-thld = <0x05>;
>> - cirrus,vpbr-atk-rate = <0x02>;
>> - cirrus,vpbr-atk-vol = <0x01>;
>> - cirrus,vpbr-max-attn = <0x09>;
>> - cirrus,vpbr-wait = <0x01>;
>> - cirrus,vpbr-rel-rate = <0x05>;
>> - cirrus,vpbr-mute-en = <0x00>;
>> - };
>> -};
>>
>> ---
>> base-commit: 8cd9520d35a6c38db6567e97dd93b1f11f185dc6
>> change-id: 20260618-dt-cirrus-cs35l36-99c466fb13fd
>>
>> Best regards,
>> --
>> David Heidelberg <david@ixit.cz>
>>
>>
>>
--
David Heidelberg
^ permalink raw reply
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema
From: Rob Herring @ 2026-06-24 18:17 UTC (permalink / raw)
To: david
Cc: David Rhodes, Richard Fitzgerald, Liam Girdwood, Mark Brown,
Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas,
linux-sound, devicetree, linux-kernel, phone-devel
In-Reply-To: <20260624-dt-cirrus-cs35l36-v2-1-74eccdbd8fe4@ixit.cz>
On Wed, Jun 24, 2026 at 11:02 AM David Heidelberg via B4 Relay
<devnull+david.ixit.cz@kernel.org> wrote:
>
> From: David Heidelberg <david@ixit.cz>
>
> Convert CS35L36 Speaker Amplifier to yaml.
>
> Changes:
> - maintainers email to the generic Cirrus email
> - Both the codec and downstream worked just fine without
> VP-supply provided. Align with datasheet for similar models.
> - add dai-common.yaml to cover for '#sound-dai-cells',
> 'sound-name-prefix'
>
> Reviewed-by: David Rhodes <David.Rhodes@cirrus.com>
If you are going to take stuff I haven't fixed:
Assisted-by: OpenAI:gpt-4
(I don't remember the exact flavor I used)
> Co-developed-by: Rob Herring (Arm) <robh@kernel.org>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> Relevant for Pixel 3 / 3XL / 4.
> ---
> Changes in v2:
> - Rename the commit. (Mark)
> - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz
> ---
> .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++
> .../devicetree/bindings/sound/cs35l36.txt | 168 ----------------
> 2 files changed, 224 insertions(+), 168 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
> new file mode 100644
> index 0000000000000..af0acaaefb68e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
> @@ -0,0 +1,224 @@
> +# SPDX-License-Identifier: GPL-2.0-only
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Cirrus Logic CS35L36 Speaker Amplifier
> +
> +maintainers:
> + - patches@opensource.cirrus.com
> + - Bjorn Helgaas <bhelgaas@google.com>
Bjorn is not correct. Generally we want a person, not a company list.
> +
> +description: |
Don't need '|'.
> + CS35L36 is a boosted mono Class D amplifier
> +
> +allOf:
> + - $ref: /schemas/sound/dai-common.yaml#
> +
> +properties:
> + compatible:
> + enum:
> + - cirrus,cs35l36
> +
> + reg:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + VA-supply:
> + description: Voltage regulator of analog internal section
> +
> + VP-supply:
> + description: Voltage regulator of boost converter
> +
> + reset-gpios:
> + maxItems: 1
> +
> + cirrus,boost-ctl-millivolt:
> + description: Boost converter output voltage in millivolts (step 50)
> + $ref: /schemas/types.yaml#/definitions/uint32
> + minimum: 2550
> + maximum: 12000
> +
> + cirrus,boost-peak-milliamp:
> + description: Boost-converter peak current limit in mA (step 50)
> + $ref: /schemas/types.yaml#/definitions/uint32
> + default: 4500
> + minimum: 1600
> + maximum: 4500
> +
> + cirrus,boost-ind-nanohenry:
> + description: Initial inductor estimation reference value in nanohenry (1000=1μH, 1200=1.2μH)
> + $ref: /schemas/types.yaml#/definitions/uint32
> + default: 1000
> +
> + cirrus,multi-amp-mode:
> + description: Hi-Z ASP port when more than one amplifier in system.
> + type: boolean
> +
> + cirrus,boost-ctl-select:
> + description: Boost converter control source selection
> + $ref: /schemas/types.yaml#/definitions/uint32
> + default: 0x01
> + enum:
> + - 0x00 # Control Port
> + - 0x01 # Class
> + - 0x10 # Sync
> +
> + cirrus,amp-pcm-inv:
> + description: Invert incoming PCM data when true.
> + type: boolean
> +
> + cirrus,imon-pol-inv:
> + description: Invert polarity of outbound IMON feedback when true.
> + type: boolean
> +
> + cirrus,vmon-pol-inv:
> + description: Invert polarity of outbound VMON feedback when true.
> + type: boolean
> +
> + cirrus,dcm-mode-enable:
> + description: Enable boost converter automatic Discontinuous Conduction Mode.
> + type: boolean
> +
> + cirrus,weak-fet-disable:
> + description: Reduce output driver strength in Weak-FET Drive Mode when true.
> + type: boolean
> +
> + cirrus,classh-wk-fet-delay:
> + description: Weak-FET entry delay in ms
> + $ref: /schemas/types.yaml#/definitions/uint32
> + default: 100
How? Range is 0-7.
> + enum:
> + - 0 # 0
> + - 1 # 5
> + - 2 # 10
> + - 3 # 50
> + - 4 # 100
> + - 5 # 200
> + - 6 # 500
> + - 7 # 1000
> +
> + cirrus,classh-weak-fet-thld-millivolt:
> + description: Weak-FET drive threshold in mV
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum: [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700]
> +
> + cirrus,temp-warn-threshold:
> + description: Overtemperature warning threshold
> + $ref: /schemas/types.yaml#/definitions/uint32
> + default: 2
> + enum:
> + - 0 # 105°C
> + - 1 # 115°C
> + - 2 # 125°C
> + - 3 # 135°C
> +
> + cirrus,irq-drive-select:
> + description: Interrupt output driver type
> + $ref: /schemas/types.yaml#/definitions/uint32
> + default: 1
> + enum:
> + - 0 # open-drain
> + - 1 # push-pull
> +
> + cirrus,irq-gpio-select:
> + description: Programmable IRQ pin selection
> + $ref: /schemas/types.yaml#/definitions/uint32
> + enum:
> + - 0 # PDM_DATA/SWIRE_SD/INT
> + - 1 # GPIO
> +
> + cirrus,vpbr-config:
> + description: Brownout prevention configuration sub-node
> + type: object
> + additionalProperties: false
> +
> + properties:
> + cirrus,vpbr-en:
> + description: VBST brownout prevention enable
> + $ref: /schemas/types.yaml#/definitions/uint32
> + default: 0
> + enum:
> + - 0 # disabled
> + - 1 # enabled
> +
> + cirrus,vpbr-thld:
> + description: Initial VPBR threshold voltage
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + cirrus,vpbr-atk-rate:
> + description: Attenuation attack step rate
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + cirrus,vpbr-atk-vol:
> + description: VP brownout prevention step size
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + cirrus,vpbr-max-attn:
> + description: Maximum attenuation during VP brownout prevention
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + cirrus,vpbr-wait:
> + description: Delay between brownout clearance and attenuation release
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + cirrus,vpbr-rel-rate:
> + description: Attenuation release step rate
> + $ref: /schemas/types.yaml#/definitions/uint32
> +
> + cirrus,vpbr-mute-en:
> + description: Mute audio if maximum attenuation reached
> + $ref: /schemas/types.yaml#/definitions/uint32
Constraints on any of these?
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - VA-supply
> +
> +unevaluatedProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/gpio/gpio.h>
> + #include <dt-bindings/interrupt-controller/irq.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + codec@40 {
> + compatible = "cirrus,cs35l36";
> + reg = <0x40>;
> + VA-supply = <&dummy_vreg>;
> + VP-supply = <&dummy_vreg>;
> + reset-gpios = <&gpio0 54 GPIO_ACTIVE_HIGH>;
> + interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> +
> + cirrus,boost-ind-nanohenry = <1000>;
> + cirrus,boost-ctl-millivolt = <10000>;
> + cirrus,boost-peak-milliamp = <4500>;
> + cirrus,boost-ctl-select = <0x00>;
> + cirrus,weak-fet-delay = <4>;
> + cirrus,weak-fet-thld = <0x01>;
> + cirrus,temp-warn-threshold = <1>;
> + cirrus,multi-amp-mode;
> + cirrus,irq-drive-select = <1>;
> + cirrus,irq-gpio-select = <0x01>;
> +
> + cirrus,vpbr-config {
> + cirrus,vpbr-en = <0>;
> + cirrus,vpbr-thld = <0x05>;
> + cirrus,vpbr-atk-rate = <0x02>;
> + cirrus,vpbr-atk-vol = <0x01>;
> + cirrus,vpbr-max-attn = <0x09>;
> + cirrus,vpbr-wait = <0x01>;
> + cirrus,vpbr-rel-rate = <0x05>;
> + cirrus,vpbr-mute-en = <0x00>;
> + };
> + };
> + };
> +...
> diff --git a/Documentation/devicetree/bindings/sound/cs35l36.txt b/Documentation/devicetree/bindings/sound/cs35l36.txt
> deleted file mode 100644
> index d34117b8558e5..0000000000000
> --- a/Documentation/devicetree/bindings/sound/cs35l36.txt
> +++ /dev/null
> @@ -1,168 +0,0 @@
> -CS35L36 Speaker Amplifier
> -
> -Required properties:
> -
> - - compatible : "cirrus,cs35l36"
> -
> - - reg : the I2C address of the device for I2C
> -
> - - VA-supply, VP-supply : power supplies for the device,
> - as covered in
> - Documentation/devicetree/bindings/regulator/regulator.txt.
> -
> - - cirrus,boost-ctl-millivolt : Boost Voltage Value. Configures the boost
> - converter's output voltage in mV. The range is from 2550mV to 12000mV with
> - increments of 50mV.
> - (Default) VP
> -
> - - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
> - Configures the peak current by monitoring the current through the boost FET.
> - Range starts at 1600mA and goes to a maximum of 4500mA with increments of
> - 50mA.
> - (Default) 4.50 Amps
> -
> - - cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value.
> - Seeds the digital boost converter's inductor estimation block with the initial
> - inductance value to reference.
> -
> - 1000 = 1uH (Default)
> - 1200 = 1.2uH
> -
> -Optional properties:
> - - cirrus,multi-amp-mode : Boolean to determine if there are more than
> - one amplifier in the system. If more than one it is best to Hi-Z the ASP
> - port to prevent bus contention on the output signal
> -
> - - cirrus,boost-ctl-select : Boost converter control source selection.
> - Selects the source of the BST_CTL target VBST voltage for the boost
> - converter to generate.
> - 0x00 - Control Port Value
> - 0x01 - Class H Tracking (Default)
> - 0x10 - MultiDevice Sync Value
> -
> - - cirrus,amp-pcm-inv : Boolean to determine Amplifier will invert incoming
> - PCM data
> -
> - - cirrus,imon-pol-inv : Boolean to determine Amplifier will invert the
> - polarity of outbound IMON feedback data
> -
> - - cirrus,vmon-pol-inv : Boolean to determine Amplifier will invert the
> - polarity of outbound VMON feedback data
> -
> - - cirrus,dcm-mode-enable : Boost converter automatic DCM Mode enable.
> - This enables the digital boost converter to operate in a low power
> - (Discontinuous Conduction) mode during low loading conditions.
> -
> - - cirrus,weak-fet-disable : Boolean : The strength of the output drivers is
> - reduced when operating in a Weak-FET Drive Mode and must not be used to drive
> - a large load.
> -
> - - cirrus,classh-wk-fet-delay : Weak-FET entry delay. Controls the delay
> - (in ms) before the Class H algorithm switches to the weak-FET voltage
> - (after the audio falls and remains below the value specified in WKFET_AMP_THLD).
> -
> - 0 = 0ms
> - 1 = 5ms
> - 2 = 10ms
> - 3 = 50ms
> - 4 = 100ms (Default)
> - 5 = 200ms
> - 6 = 500ms
> - 7 = 1000ms
> -
> - - cirrus,classh-weak-fet-thld-millivolt : Weak-FET amplifier drive threshold.
> - Configures the signal threshold at which the PWM output stage enters
> - weak-FET operation. The range is 50mV to 700mV in 50mV increments.
> -
> - - cirrus,temp-warn-threshold : Amplifier overtemperature warning threshold.
> - Configures the threshold at which the overtemperature warning condition occurs.
> - When the threshold is met, the overtemperature warning attenuation is applied
> - and the TEMP_WARN_EINT interrupt status bit is set.
> - If TEMP_WARN_MASK = 0, INTb is asserted.
> -
> - 0 = 105C
> - 1 = 115C
> - 2 = 125C (Default)
> - 3 = 135C
> -
> - - cirrus,irq-drive-select : Selects the driver type of the selected interrupt
> - output.
> -
> - 0 = Open-drain
> - 1 = Push-pull (Default)
> -
> - - cirrus,irq-gpio-select : Selects the pin to serve as the programmable
> - interrupt output.
> -
> - 0 = PDM_DATA / SWIRE_SD / INT (Default)
> - 1 = GPIO
> -
> -Optional properties for the "cirrus,vpbr-config" Sub-node
> -
> - - cirrus,vpbr-en : VBST brownout prevention enable. Configures whether the
> - VBST brownout prevention algorithm is enabled or disabled.
> -
> - 0 = VBST brownout prevention disabled (default)
> - 1 = VBST brownout prevention enabled
> -
> - See Section 7.31.1 VPBR Config for configuration options & further details
> -
> - - cirrus,vpbr-thld : Initial VPBR threshold. Configures the VP brownout
> - threshold voltage
> -
> - - cirrus,cirrus,vpbr-atk-rate : Attenuation attack step rate. Configures the
> - amount delay between consecutive volume attenuation steps when a brownout
> - condition is present and the VP brownout condition is in an attacking state.
> -
> - - cirrus,vpbr-atk-vol : VP brownout prevention step size. Configures the VP
> - brownout prevention attacking attenuation step size when operating in either
> - digital volume or analog gain modes.
> -
> - - cirrus,vpbr-max-attn : Maximum attenuation that the VP brownout prevention
> - can apply to the audio signal.
> -
> - - cirrus,vpbr-wait : Configures the delay time between a brownout condition
> - no longer being present and the VP brownout prevention entering an attenuation
> - release state.
> -
> - - cirrus,vpbr-rel-rate : Attenuation release step rate. Configures the delay
> - between consecutive volume attenuation release steps when a brownout condition
> - is not longer present and the VP brownout is in an attenuation release state.
> -
> - - cirrus,vpbr-mute-en : During the attack state, if the vpbr-max-attn value
> - is reached, the error condition still remains, and this bit is set, the audio
> - is muted.
> -
> -Example:
> -
> -cs35l36: cs35l36@40 {
> - compatible = "cirrus,cs35l36";
> - reg = <0x40>;
> - VA-supply = <&dummy_vreg>;
> - VP-supply = <&dummy_vreg>;
> - reset-gpios = <&gpio0 54 0>;
> - interrupt-parent = <&gpio8>;
> - interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
> -
> - cirrus,boost-ind-nanohenry = <1000>;
> - cirrus,boost-ctl-millivolt = <10000>;
> - cirrus,boost-peak-milliamp = <4500>;
> - cirrus,boost-ctl-select = <0x00>;
> - cirrus,weak-fet-delay = <0x04>;
> - cirrus,weak-fet-thld = <0x01>;
> - cirrus,temp-warn-threshold = <0x01>;
> - cirrus,multi-amp-mode;
> - cirrus,irq-drive-select = <0x01>;
> - cirrus,irq-gpio-select = <0x01>;
> -
> - cirrus,vpbr-config {
> - cirrus,vpbr-en = <0x00>;
> - cirrus,vpbr-thld = <0x05>;
> - cirrus,vpbr-atk-rate = <0x02>;
> - cirrus,vpbr-atk-vol = <0x01>;
> - cirrus,vpbr-max-attn = <0x09>;
> - cirrus,vpbr-wait = <0x01>;
> - cirrus,vpbr-rel-rate = <0x05>;
> - cirrus,vpbr-mute-en = <0x00>;
> - };
> -};
>
> ---
> base-commit: 8cd9520d35a6c38db6567e97dd93b1f11f185dc6
> change-id: 20260618-dt-cirrus-cs35l36-99c466fb13fd
>
> Best regards,
> --
> David Heidelberg <david@ixit.cz>
>
>
>
^ permalink raw reply
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema
From: Rob Herring (Arm) @ 2026-06-24 17:30 UTC (permalink / raw)
To: David Heidelberg
Cc: David Rhodes, linux-sound, Bjorn Helgaas, devicetree,
linux-kernel, Conor Dooley, Krzysztof Kozlowski, phone-devel,
Mark Brown, patches, Richard Fitzgerald, David Rhodes,
Liam Girdwood
In-Reply-To: <20260624-dt-cirrus-cs35l36-v2-1-74eccdbd8fe4@ixit.cz>
On Wed, 24 Jun 2026 18:02:25 +0200, David Heidelberg wrote:
> Convert CS35L36 Speaker Amplifier to yaml.
>
> Changes:
> - maintainers email to the generic Cirrus email
> - Both the codec and downstream worked just fine without
> VP-supply provided. Align with datasheet for similar models.
> - add dai-common.yaml to cover for '#sound-dai-cells',
> 'sound-name-prefix'
>
> Reviewed-by: David Rhodes <David.Rhodes@cirrus.com>
> Co-developed-by: Rob Herring (Arm) <robh@kernel.org>
> Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
> Signed-off-by: David Heidelberg <david@ixit.cz>
> ---
> Relevant for Pixel 3 / 3XL / 4.
> ---
> Changes in v2:
> - Rename the commit. (Mark)
> - Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz
> ---
> .../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++
> .../devicetree/bindings/sound/cs35l36.txt | 168 ----------------
> 2 files changed, 224 insertions(+), 168 deletions(-)
>
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml: properties:cirrus,vpbr-config:type: 'boolean' was expected
hint: A vendor boolean property can use "type: boolean"
from schema $id: http://devicetree.org/meta-schemas/vendor-props.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml: Unresolvable reference: /schemas/sound/dai-common.yaml#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/cirrus,cs35l36.example.dtb: codec@40 (cirrus,cs35l36): Unevaluated properties are not allowed ('cirrus,weak-fet-delay', 'cirrus,weak-fet-thld' were unexpected)
from schema $id: http://devicetree.org/schemas/cirrus,cs35l36.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/20260624-dt-cirrus-cs35l36-v2-1-74eccdbd8fe4@ixit.cz
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply
* Re: [PATCH] ALSA: hda/hdmi: disable KAE for Intel Panther Lake
From: Kai Vehmanen @ 2026-06-24 17:04 UTC (permalink / raw)
To: Alexander Kaplan
Cc: Kai Vehmanen, Péter Ujfalusi, Péter Ujfalusi,
Takashi Iwai, linux-sound, Jaroslav Kysela, Pierre-Louis Bossart,
stable, Uma Shankar
In-Reply-To: <178196763509.3248.8656978100050911066@sms-medipool.de>
Hello Alexander,
On Sat, 20 Jun 2026, Alexander Kaplan wrote:
> thanks for the quick test patch.
>
> I ran it on Panther Lake with PTL kept at MODEL_ADLP so the KAE path is
> active.
[...]
> # speaker-test -D hw:0,3 -c6 (silent)
> hdmi_pin_setup_infoframe: pin NID=0xa channels=6 ca=0x0b
> HDMI: KAE 0 cvt-NID=0x3
> hdmi_pin_hbr_setup: NID=0xa, pinctl=0x40
> i915_hsw_setup_stream: HDMI: multichannel stream, disable KAE
>
> # speaker-test -D hw:0,3 -c2 (stays silent)
> hdmi_pin_setup_infoframe: pin NID=0xa channels=2 ca=0x00
> HDMI: KAE 0 cvt-NID=0x3
> hdmi_pin_hbr_setup: NID=0xa, pinctl=0x40
> HDMI: KAE 1 cvt-NID=0x3
[...]
> So the wedge happens earlier in the sequence, as you suspected, not at
> the re-arm.
> The trigger looks like the multichannel DMA start itself once the KAE
> block has been active in the running power cycle, below the codec verb
> level.
thanks for the quick test. I'm working with our display folks to test
this out with some Synaptic DP-alt HDMI converter. This same test
worked ok with one converter (Lenovo USB-C to HDMI Adapter GX90K37871),
but I'll try to get someone to test with more converters. Given you see
this with multiple DP-HDMI converters, we should be able to hit this.
And a bit suspicious how this could work with the Lenovo adapter. I wonder
if we have something else differing in the test setup. Given you cannot
recover by unplugging and reconnecting the converter, it would seem the
issue is on transmitter side and should be visible with all DP-alt
receivers.
I filed a bug to Xe/display to track this effort:
https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8412
Br, Kai
^ permalink raw reply
* [PATCH] ALSA: hda/realtek: Add mic mute LED quirk for HP Laptop 15-fd0xxx
From: Kshamendra Kumar Mishra @ 2026-06-24 16:48 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai, linux-sound, linux-kernel
The HP Laptop 15-fd0xxx uses GPIO bit 0 to control the mic mute LED,
but currently the quirk only enables the speaker mute LED (via coef
bit). Switch to the existing ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO
fixup which additionally registers a GPIO-based mic mute LED, mapping
to the same verbs (SET_GPIO_DATA/SET_GPIO_DIRECTION bit 0) that the
platform firmware uses.
Signed-off-by: Kshamendra Kumar Mishra <kshamendrakumarmishra@gmail.com>
---
sound/hda/codecs/realtek/alc269.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/hda/codecs/realtek/alc269.c b/sound/hda/codecs/realtek/alc269.c
index XXXXXXXX..YYYYYYYY 100644
--- a/sound/hda/codecs/realtek/alc269.c
+++ b/sound/hda/codecs/realtek/alc269.c
@@ -7185,7 +7185,7 @@ static const struct snd_pci_quirk alc269_fixup_tbl[] = {
SND_PCI_QUIRK(0x103c, 0x8dc9, "HP Laptop 15-fc0xxx", ALC236_FIXUP_HP_DMIC),
SND_PCI_QUIRK(0x103c, 0x8dd4, "HP EliteStudio 8 AIO", ALC274_FIXUP_HP_AIO_BIND_DACS),
- SND_PCI_QUIRK(0x103c, 0x8dd7, "HP Laptop 15-fd0xxx", ALC236_FIXUP_HP_MUTE_LED_COEFBIT2),
+ SND_PCI_QUIRK(0x103c, 0x8dd7, "HP Laptop 15-fd0xxx", ALC236_FIXUP_HP_MUTE_LED_MICMUTE_GPIO),
SND_PCI_QUIRK(0x103c, 0x8de8, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2),
SND_PCI_QUIRK(0x103c, 0x8de9, "HP Gemtree", ALC245_FIXUP_TAS2781_SPI_2),
SND_PCI_QUIRK(0x103c, 0x8dec, "HP EliteBook 640 G12", ALC236_FIXUP_HP_GPIO_LED),
--
2.54.0
^ permalink raw reply
* Re: [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema
From: Mark Brown @ 2026-06-24 16:41 UTC (permalink / raw)
To: david
Cc: David Rhodes, Richard Fitzgerald, Liam Girdwood, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, patches, Bjorn Helgaas,
linux-sound, devicetree, linux-kernel, phone-devel
In-Reply-To: <20260624-dt-cirrus-cs35l36-v2-1-74eccdbd8fe4@ixit.cz>
[-- Attachment #1: Type: text/plain, Size: 183 bytes --]
On Wed, Jun 24, 2026 at 06:02:25PM +0200, David Heidelberg via B4 Relay wrote:
> +$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml#
Other bindings include sound/ in the path.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* [PATCH v2] ASoC: dt-bindings: Convert cirrus,cs35l36 to DT schema
From: David Heidelberg via B4 Relay @ 2026-06-24 16:02 UTC (permalink / raw)
To: David Rhodes, Richard Fitzgerald, Liam Girdwood, Mark Brown,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, patches,
Bjorn Helgaas
Cc: David Rhodes, linux-sound, devicetree, linux-kernel, phone-devel,
David Heidelberg
From: David Heidelberg <david@ixit.cz>
Convert CS35L36 Speaker Amplifier to yaml.
Changes:
- maintainers email to the generic Cirrus email
- Both the codec and downstream worked just fine without
VP-supply provided. Align with datasheet for similar models.
- add dai-common.yaml to cover for '#sound-dai-cells',
'sound-name-prefix'
Reviewed-by: David Rhodes <David.Rhodes@cirrus.com>
Co-developed-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: Rob Herring (Arm) <robh@kernel.org>
Signed-off-by: David Heidelberg <david@ixit.cz>
---
Relevant for Pixel 3 / 3XL / 4.
---
Changes in v2:
- Rename the commit. (Mark)
- Link to v1: https://lore.kernel.org/r/20260618-dt-cirrus-cs35l36-v1-1-1a43515666ad@ixit.cz
---
.../devicetree/bindings/sound/cirrus,cs35l36.yaml | 224 +++++++++++++++++++++
.../devicetree/bindings/sound/cs35l36.txt | 168 ----------------
2 files changed, 224 insertions(+), 168 deletions(-)
diff --git a/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
new file mode 100644
index 0000000000000..af0acaaefb68e
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/cirrus,cs35l36.yaml
@@ -0,0 +1,224 @@
+# SPDX-License-Identifier: GPL-2.0-only
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/cirrus,cs35l36.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Cirrus Logic CS35L36 Speaker Amplifier
+
+maintainers:
+ - patches@opensource.cirrus.com
+ - Bjorn Helgaas <bhelgaas@google.com>
+
+description: |
+ CS35L36 is a boosted mono Class D amplifier
+
+allOf:
+ - $ref: /schemas/sound/dai-common.yaml#
+
+properties:
+ compatible:
+ enum:
+ - cirrus,cs35l36
+
+ reg:
+ maxItems: 1
+
+ interrupts:
+ maxItems: 1
+
+ VA-supply:
+ description: Voltage regulator of analog internal section
+
+ VP-supply:
+ description: Voltage regulator of boost converter
+
+ reset-gpios:
+ maxItems: 1
+
+ cirrus,boost-ctl-millivolt:
+ description: Boost converter output voltage in millivolts (step 50)
+ $ref: /schemas/types.yaml#/definitions/uint32
+ minimum: 2550
+ maximum: 12000
+
+ cirrus,boost-peak-milliamp:
+ description: Boost-converter peak current limit in mA (step 50)
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 4500
+ minimum: 1600
+ maximum: 4500
+
+ cirrus,boost-ind-nanohenry:
+ description: Initial inductor estimation reference value in nanohenry (1000=1μH, 1200=1.2μH)
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 1000
+
+ cirrus,multi-amp-mode:
+ description: Hi-Z ASP port when more than one amplifier in system.
+ type: boolean
+
+ cirrus,boost-ctl-select:
+ description: Boost converter control source selection
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0x01
+ enum:
+ - 0x00 # Control Port
+ - 0x01 # Class
+ - 0x10 # Sync
+
+ cirrus,amp-pcm-inv:
+ description: Invert incoming PCM data when true.
+ type: boolean
+
+ cirrus,imon-pol-inv:
+ description: Invert polarity of outbound IMON feedback when true.
+ type: boolean
+
+ cirrus,vmon-pol-inv:
+ description: Invert polarity of outbound VMON feedback when true.
+ type: boolean
+
+ cirrus,dcm-mode-enable:
+ description: Enable boost converter automatic Discontinuous Conduction Mode.
+ type: boolean
+
+ cirrus,weak-fet-disable:
+ description: Reduce output driver strength in Weak-FET Drive Mode when true.
+ type: boolean
+
+ cirrus,classh-wk-fet-delay:
+ description: Weak-FET entry delay in ms
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 100
+ enum:
+ - 0 # 0
+ - 1 # 5
+ - 2 # 10
+ - 3 # 50
+ - 4 # 100
+ - 5 # 200
+ - 6 # 500
+ - 7 # 1000
+
+ cirrus,classh-weak-fet-thld-millivolt:
+ description: Weak-FET drive threshold in mV
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [50, 100, 150, 200, 250, 300, 350, 400, 450, 500, 550, 600, 650, 700]
+
+ cirrus,temp-warn-threshold:
+ description: Overtemperature warning threshold
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 2
+ enum:
+ - 0 # 105°C
+ - 1 # 115°C
+ - 2 # 125°C
+ - 3 # 135°C
+
+ cirrus,irq-drive-select:
+ description: Interrupt output driver type
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 1
+ enum:
+ - 0 # open-drain
+ - 1 # push-pull
+
+ cirrus,irq-gpio-select:
+ description: Programmable IRQ pin selection
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum:
+ - 0 # PDM_DATA/SWIRE_SD/INT
+ - 1 # GPIO
+
+ cirrus,vpbr-config:
+ description: Brownout prevention configuration sub-node
+ type: object
+ additionalProperties: false
+
+ properties:
+ cirrus,vpbr-en:
+ description: VBST brownout prevention enable
+ $ref: /schemas/types.yaml#/definitions/uint32
+ default: 0
+ enum:
+ - 0 # disabled
+ - 1 # enabled
+
+ cirrus,vpbr-thld:
+ description: Initial VPBR threshold voltage
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-atk-rate:
+ description: Attenuation attack step rate
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-atk-vol:
+ description: VP brownout prevention step size
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-max-attn:
+ description: Maximum attenuation during VP brownout prevention
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-wait:
+ description: Delay between brownout clearance and attenuation release
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-rel-rate:
+ description: Attenuation release step rate
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+ cirrus,vpbr-mute-en:
+ description: Mute audio if maximum attenuation reached
+ $ref: /schemas/types.yaml#/definitions/uint32
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - VA-supply
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ i2c {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ codec@40 {
+ compatible = "cirrus,cs35l36";
+ reg = <0x40>;
+ VA-supply = <&dummy_vreg>;
+ VP-supply = <&dummy_vreg>;
+ reset-gpios = <&gpio0 54 GPIO_ACTIVE_HIGH>;
+ interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+
+ cirrus,boost-ind-nanohenry = <1000>;
+ cirrus,boost-ctl-millivolt = <10000>;
+ cirrus,boost-peak-milliamp = <4500>;
+ cirrus,boost-ctl-select = <0x00>;
+ cirrus,weak-fet-delay = <4>;
+ cirrus,weak-fet-thld = <0x01>;
+ cirrus,temp-warn-threshold = <1>;
+ cirrus,multi-amp-mode;
+ cirrus,irq-drive-select = <1>;
+ cirrus,irq-gpio-select = <0x01>;
+
+ cirrus,vpbr-config {
+ cirrus,vpbr-en = <0>;
+ cirrus,vpbr-thld = <0x05>;
+ cirrus,vpbr-atk-rate = <0x02>;
+ cirrus,vpbr-atk-vol = <0x01>;
+ cirrus,vpbr-max-attn = <0x09>;
+ cirrus,vpbr-wait = <0x01>;
+ cirrus,vpbr-rel-rate = <0x05>;
+ cirrus,vpbr-mute-en = <0x00>;
+ };
+ };
+ };
+...
diff --git a/Documentation/devicetree/bindings/sound/cs35l36.txt b/Documentation/devicetree/bindings/sound/cs35l36.txt
deleted file mode 100644
index d34117b8558e5..0000000000000
--- a/Documentation/devicetree/bindings/sound/cs35l36.txt
+++ /dev/null
@@ -1,168 +0,0 @@
-CS35L36 Speaker Amplifier
-
-Required properties:
-
- - compatible : "cirrus,cs35l36"
-
- - reg : the I2C address of the device for I2C
-
- - VA-supply, VP-supply : power supplies for the device,
- as covered in
- Documentation/devicetree/bindings/regulator/regulator.txt.
-
- - cirrus,boost-ctl-millivolt : Boost Voltage Value. Configures the boost
- converter's output voltage in mV. The range is from 2550mV to 12000mV with
- increments of 50mV.
- (Default) VP
-
- - cirrus,boost-peak-milliamp : Boost-converter peak current limit in mA.
- Configures the peak current by monitoring the current through the boost FET.
- Range starts at 1600mA and goes to a maximum of 4500mA with increments of
- 50mA.
- (Default) 4.50 Amps
-
- - cirrus,boost-ind-nanohenry : Inductor estimation LBST reference value.
- Seeds the digital boost converter's inductor estimation block with the initial
- inductance value to reference.
-
- 1000 = 1uH (Default)
- 1200 = 1.2uH
-
-Optional properties:
- - cirrus,multi-amp-mode : Boolean to determine if there are more than
- one amplifier in the system. If more than one it is best to Hi-Z the ASP
- port to prevent bus contention on the output signal
-
- - cirrus,boost-ctl-select : Boost converter control source selection.
- Selects the source of the BST_CTL target VBST voltage for the boost
- converter to generate.
- 0x00 - Control Port Value
- 0x01 - Class H Tracking (Default)
- 0x10 - MultiDevice Sync Value
-
- - cirrus,amp-pcm-inv : Boolean to determine Amplifier will invert incoming
- PCM data
-
- - cirrus,imon-pol-inv : Boolean to determine Amplifier will invert the
- polarity of outbound IMON feedback data
-
- - cirrus,vmon-pol-inv : Boolean to determine Amplifier will invert the
- polarity of outbound VMON feedback data
-
- - cirrus,dcm-mode-enable : Boost converter automatic DCM Mode enable.
- This enables the digital boost converter to operate in a low power
- (Discontinuous Conduction) mode during low loading conditions.
-
- - cirrus,weak-fet-disable : Boolean : The strength of the output drivers is
- reduced when operating in a Weak-FET Drive Mode and must not be used to drive
- a large load.
-
- - cirrus,classh-wk-fet-delay : Weak-FET entry delay. Controls the delay
- (in ms) before the Class H algorithm switches to the weak-FET voltage
- (after the audio falls and remains below the value specified in WKFET_AMP_THLD).
-
- 0 = 0ms
- 1 = 5ms
- 2 = 10ms
- 3 = 50ms
- 4 = 100ms (Default)
- 5 = 200ms
- 6 = 500ms
- 7 = 1000ms
-
- - cirrus,classh-weak-fet-thld-millivolt : Weak-FET amplifier drive threshold.
- Configures the signal threshold at which the PWM output stage enters
- weak-FET operation. The range is 50mV to 700mV in 50mV increments.
-
- - cirrus,temp-warn-threshold : Amplifier overtemperature warning threshold.
- Configures the threshold at which the overtemperature warning condition occurs.
- When the threshold is met, the overtemperature warning attenuation is applied
- and the TEMP_WARN_EINT interrupt status bit is set.
- If TEMP_WARN_MASK = 0, INTb is asserted.
-
- 0 = 105C
- 1 = 115C
- 2 = 125C (Default)
- 3 = 135C
-
- - cirrus,irq-drive-select : Selects the driver type of the selected interrupt
- output.
-
- 0 = Open-drain
- 1 = Push-pull (Default)
-
- - cirrus,irq-gpio-select : Selects the pin to serve as the programmable
- interrupt output.
-
- 0 = PDM_DATA / SWIRE_SD / INT (Default)
- 1 = GPIO
-
-Optional properties for the "cirrus,vpbr-config" Sub-node
-
- - cirrus,vpbr-en : VBST brownout prevention enable. Configures whether the
- VBST brownout prevention algorithm is enabled or disabled.
-
- 0 = VBST brownout prevention disabled (default)
- 1 = VBST brownout prevention enabled
-
- See Section 7.31.1 VPBR Config for configuration options & further details
-
- - cirrus,vpbr-thld : Initial VPBR threshold. Configures the VP brownout
- threshold voltage
-
- - cirrus,cirrus,vpbr-atk-rate : Attenuation attack step rate. Configures the
- amount delay between consecutive volume attenuation steps when a brownout
- condition is present and the VP brownout condition is in an attacking state.
-
- - cirrus,vpbr-atk-vol : VP brownout prevention step size. Configures the VP
- brownout prevention attacking attenuation step size when operating in either
- digital volume or analog gain modes.
-
- - cirrus,vpbr-max-attn : Maximum attenuation that the VP brownout prevention
- can apply to the audio signal.
-
- - cirrus,vpbr-wait : Configures the delay time between a brownout condition
- no longer being present and the VP brownout prevention entering an attenuation
- release state.
-
- - cirrus,vpbr-rel-rate : Attenuation release step rate. Configures the delay
- between consecutive volume attenuation release steps when a brownout condition
- is not longer present and the VP brownout is in an attenuation release state.
-
- - cirrus,vpbr-mute-en : During the attack state, if the vpbr-max-attn value
- is reached, the error condition still remains, and this bit is set, the audio
- is muted.
-
-Example:
-
-cs35l36: cs35l36@40 {
- compatible = "cirrus,cs35l36";
- reg = <0x40>;
- VA-supply = <&dummy_vreg>;
- VP-supply = <&dummy_vreg>;
- reset-gpios = <&gpio0 54 0>;
- interrupt-parent = <&gpio8>;
- interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
-
- cirrus,boost-ind-nanohenry = <1000>;
- cirrus,boost-ctl-millivolt = <10000>;
- cirrus,boost-peak-milliamp = <4500>;
- cirrus,boost-ctl-select = <0x00>;
- cirrus,weak-fet-delay = <0x04>;
- cirrus,weak-fet-thld = <0x01>;
- cirrus,temp-warn-threshold = <0x01>;
- cirrus,multi-amp-mode;
- cirrus,irq-drive-select = <0x01>;
- cirrus,irq-gpio-select = <0x01>;
-
- cirrus,vpbr-config {
- cirrus,vpbr-en = <0x00>;
- cirrus,vpbr-thld = <0x05>;
- cirrus,vpbr-atk-rate = <0x02>;
- cirrus,vpbr-atk-vol = <0x01>;
- cirrus,vpbr-max-attn = <0x09>;
- cirrus,vpbr-wait = <0x01>;
- cirrus,vpbr-rel-rate = <0x05>;
- cirrus,vpbr-mute-en = <0x00>;
- };
-};
---
base-commit: 8cd9520d35a6c38db6567e97dd93b1f11f185dc6
change-id: 20260618-dt-cirrus-cs35l36-99c466fb13fd
Best regards,
--
David Heidelberg <david@ixit.cz>
^ permalink raw reply related
* Re: [PATCH v1] ASoC: rockchip: rockchip_sai: #include <linux/platform_device.h> explicitly
From: Mark Brown @ 2026-06-24 12:01 UTC (permalink / raw)
To: Nicolas Frattaroli, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
Uwe Kleine-König (The Capable Hub)
Cc: Heiko Stuebner, linux-rockchip, linux-sound, linux-arm-kernel,
linux-kernel
In-Reply-To: <20260624083708.254517-2-u.kleine-koenig@baylibre.com>
On Wed, 24 Jun 2026 10:37:07 +0200, Uwe Kleine-König (The Capable Hub) wrote:
> ASoC: rockchip: rockchip_sai: #include <linux/platform_device.h> explicitly
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2
Thanks!
[1/1] ASoC: rockchip: rockchip_sai: #include <linux/platform_device.h> explicitly
https://git.kernel.org/broonie/sound/c/83d53eca7e55
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply
* Re: [PATCH] ASoC: soc-core: Don't fail if device_link could not be created
From: Mark Brown @ 2026-06-24 12:01 UTC (permalink / raw)
To: Richard Fitzgerald
Cc: linux-sound, linux-kernel, patches, m.szyprowski, mripard,
dave.stevenson, linux-rpi-kernel, florian.fainelli
In-Reply-To: <20260623135821.4125543-1-rf@opensource.cirrus.com>
On Tue, 23 Jun 2026 14:58:21 +0100, Richard Fitzgerald wrote:
> ASoC: soc-core: Don't fail if device_link could not be created
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2
Thanks!
[1/1] ASoC: soc-core: Don't fail if device_link could not be created
https://git.kernel.org/broonie/sound/c/a7ea04d1ad39
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply
* [PATCH] ALSA: usb-audio: avoid kobject path lookup in DualSense match
From: Darvell Long @ 2026-06-24 14:37 UTC (permalink / raw)
To: Jaroslav Kysela, Takashi Iwai; +Cc: linux-sound, linux-kernel, stable
The DualSense jack-detection input handler verifies that a matching input
device belongs to the same physical controller by building kobject path
strings for both the input device and the USB audio device, then comparing
the path prefix.
This was observed when a weak physical connection caused the controller
to rapidly disconnect and reconnect. During that repeated hotplug,
snd_dualsense_ih_match() can run while the controller's USB device is
being disconnected. kobject_get_path() walks ancestor kobjects and
dereferences their names; if the USB device kobject name is no longer
valid, this can fault in strlen():
RIP: 0010:strlen+0x10/0x30
Call Trace:
kobject_get_path+0x34/0x150
snd_dualsense_ih_match+0x49/0xd0 [snd_usb_audio]
input_register_device+0x566/0x6a0
ps_probe+0xb89/0x1590 [hid_playstation]
The same ownership check can be done without building kobject path
strings. The input device is parented below the HID device, USB interface
and USB device, so walking the input device parent chain and comparing
against the mixer USB device preserves the check without dereferencing
kobject names during disconnect.
Fixes: 79d561c4ec04 ("ALSA: usb-audio: Add mixer quirk for Sony DualSense PS5")
Cc: <stable@vger.kernel.org>
Assisted-by: Cute:gpt-5.5
Signed-off-by: Darvell Long <contact@darvell.me>
---
sound/usb/mixer_quirks.c | 46 ++++++++++++----------------------------------
1 file changed, 12 insertions(+), 34 deletions(-)
diff --git a/sound/usb/mixer_quirks.c b/sound/usb/mixer_quirks.c
index 50c42a4..912b8b8 100644
--- a/sound/usb/mixer_quirks.c
+++ b/sound/usb/mixer_quirks.c
@@ -567,46 +567,30 @@ static bool snd_dualsense_ih_match(struct input_handler *handler,
{
struct dualsense_mixer_elem_info *mei;
struct usb_device *snd_dev;
- char *input_dev_path, *usb_dev_path;
- size_t usb_dev_path_len;
- bool match = false;
+ struct device *parent;
mei = container_of(handler, struct dualsense_mixer_elem_info, ih);
snd_dev = mei->info.head.mixer->chip->dev;
- input_dev_path = kobject_get_path(&dev->dev.kobj, GFP_KERNEL);
- if (!input_dev_path) {
- dev_warn(&snd_dev->dev, "Failed to get input dev path\n");
- return false;
- }
-
- usb_dev_path = kobject_get_path(&snd_dev->dev.kobj, GFP_KERNEL);
- if (!usb_dev_path) {
- dev_warn(&snd_dev->dev, "Failed to get USB dev path\n");
- goto free_paths;
- }
-
/*
* Ensure the VID:PID matched input device supposedly owned by the
* hid-playstation driver belongs to the actual hardware handled by
- * the current USB audio device, which implies input_dev_path being
- * a subpath of usb_dev_path.
+ * the current USB audio device.
*
* This verification is necessary when there is more than one identical
* controller attached to the host system.
+ *
+ * The input device is registered below the HID device, USB interface and
+ * USB device, so compare the parent chain directly instead of building
+ * kobject path strings. This avoids dereferencing kobject names while the
+ * USB device hierarchy is being torn down during disconnect.
*/
- usb_dev_path_len = strlen(usb_dev_path);
- if (usb_dev_path_len >= strlen(input_dev_path))
- goto free_paths;
-
- usb_dev_path[usb_dev_path_len] = '/';
- match = !memcmp(input_dev_path, usb_dev_path, usb_dev_path_len + 1);
-
-free_paths:
- kfree(input_dev_path);
- kfree(usb_dev_path);
+ for (parent = dev->dev.parent; parent; parent = parent->parent) {
+ if (parent == &snd_dev->dev)
+ return true;
+ }
- return match;
+ return false;
}
static int snd_dualsense_ih_connect(struct input_handler *handler,
^ permalink raw reply related
* Re: [PATCH v2] ASoC: qcom: q6apm-dai: add carveout SCM assignment for mDSP buffers
From: Mark Brown @ 2026-06-24 14:11 UTC (permalink / raw)
To: Ajay Kumar Nandam
Cc: Srinivas Kandagatla, Liam Girdwood, Jaroslav Kysela, Takashi Iwai,
linux-sound, linux-arm-msm, linux-kernel
In-Reply-To: <20260624123748.502781-1-ajay.nandam@oss.qualcomm.com>
[-- Attachment #1: Type: text/plain, Size: 371 bytes --]
On Wed, Jun 24, 2026 at 06:07:48PM +0530, Ajay Kumar Nandam wrote:
> On targets like Shikra where audio processing runs on the mDSP (modem
> DSP) instead of the ADSP, the DSP operates with stage-2 secured memory.
...
> Depends-on: https://lore.kernel.org/all/20260609064038.492641-1-ajay.nandam@oss.qualcomm.com/
There's already substantial feedback on that series...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply
* [PATCH v2] ASoC: qcom: q6apm-dai: add carveout SCM assignment for mDSP buffers
From: Ajay Kumar Nandam @ 2026-06-24 12:37 UTC (permalink / raw)
To: Srinivas Kandagatla, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: linux-sound, linux-arm-msm, linux-kernel, ajay.nandam
On targets like Shikra where audio processing runs on the mDSP (modem
DSP) instead of the ADSP, the DSP operates with stage-2 secured memory.
Unlike ADSP platforms where SMMU-mapped system RAM is directly
accessible, the mDSP cannot access buffers unless they are explicitly
SCM-assigned to the appropriate VMIDs. This requires allocating PCM DMA
buffers from reserved carveout regions and performing SCM assignment to
grant both HLOS and the mDSP shared RW access.
Add support for reserved-memory carveout regions listed in the
memory-region DT property of the q6apm-dais node. When qcom,vmid is
configured, the control-path carveout (memory-region index 0) is
SCM-assigned to HLOS + the configured destination VMIDs (RW) at
pcm_new() time and restored to HLOS-only at pcm_free().
For the data-path region (memory-region index 1), the device DMA pool
is attached via of_reserved_mem_device_init_by_idx() so that PCM buffers
are allocated directly from the carveout. The per-substream buffer size
is derived from the region (capped at BUFFER_BYTES_MAX) and the same
size is used consistently for the buffer-bytes constraint, the DSP
memory map, runtime->dma_bytes, and the per-substream SCM window so all
layers see a single coherent window. Only index 0 is SCM-assigned via
the carveout list; the data-path region is assigned per-substream, so
the carveout walk stops after index 0 to avoid double-assigning the
same physical region (which TZ rejects with -EINVAL).
Use a typed reserved-memory release callback for
devm_add_action_or_reset() instead of casting
of_reserved_mem_device_release(), so the function-pointer prototype
matches and stays CFI-clean.
All paths are gated on use_scm_assign and has_reserved_mem so existing
platforms without memory-region or qcom,vmid in DT are unaffected.
Depends-on: https://lore.kernel.org/all/20260609064038.492641-1-ajay.nandam@oss.qualcomm.com/
Signed-off-by: Ajay Kumar Nandam <ajay.nandam@oss.qualcomm.com>
---
v1: https://lore.kernel.org/all/20260618112810.2009847-1-ajay.nandam@oss.qualcomm.com/
Changes since v1:
- Fix double SCM assignment of the data-path region: the carveout walk
now stops after index 0, since index 1+ are assigned per-substream.
Assigning the same physical region twice was rejected by TZ (-EINVAL).
- Size the per-substream buffer from the carveout (region / 4, capped at
BUFFER_BYTES_MAX) and use that same size consistently for the
buffer-bytes constraint, DSP memory map, runtime->dma_bytes and the
SCM window (v1 mixed BUFFER_BYTES_MAX with the full region size).
- Use a typed reserved-memory release callback for
devm_add_action_or_reset() instead of casting
of_reserved_mem_device_release() (CFI-clean).
- Drop a debug print that triggered a -Wformat warning (%zu vs
phys_addr_t).
sound/soc/qcom/qdsp6/q6apm-dai.c | 238 +++++++++++++++++++++++++++++--
1 file changed, 230 insertions(+), 8 deletions(-)
diff --git a/sound/soc/qcom/qdsp6/q6apm-dai.c b/sound/soc/qcom/qdsp6/q6apm-dai.c
index f3dac2932afe..44c5ad97efae 100644
--- a/sound/soc/qcom/qdsp6/q6apm-dai.c
+++ b/sound/soc/qcom/qdsp6/q6apm-dai.c
@@ -15,6 +15,7 @@
#include <asm/dma.h>
#include <linux/dma-mapping.h>
#include <linux/firmware/qcom/qcom_scm.h>
+#include <linux/of_reserved_mem.h>
#include <sound/pcm_params.h>
#include "q6apm.h"
@@ -35,7 +36,8 @@
#define COMPR_PLAYBACK_MAX_NUM_FRAGMENTS (16 * 4)
#define COMPR_PLAYBACK_MIN_FRAGMENT_SIZE (8 * 1024)
#define COMPR_PLAYBACK_MIN_NUM_FRAGMENTS (4)
-#define Q6APM_MAX_VMIDS 8
+#define Q6APM_MAX_VMIDS 8
+#define Q6APM_MAX_CARVEOUTS 8
#define Q6APM_SCM_MAX_VMID 63
#define SID_MASK_DEFAULT 0xF
@@ -99,6 +101,16 @@ struct q6apm_dai_data {
int num_vmids;
u32 vmids[Q6APM_MAX_VMIDS];
bool use_scm_assign;
+ /*
+ * carveout regions from memory-region DT property
+ * (index 0: control path, index 1+: data path)
+ */
+ struct q6apm_scm_region carveout_regions[Q6APM_MAX_CARVEOUTS];
+ int num_carveouts;
+ /* true when memory-region DT property is present and DMA pool attached */
+ bool has_reserved_mem;
+ /* size of the data-path reserved region, capped at BUFFER_BYTES_MAX */
+ size_t reserved_buf_size;
};
static int q6apm_dai_assign_memory(struct q6apm_dai_rtd *prtd,
@@ -188,6 +200,102 @@ static int q6apm_dai_unassign_memory(struct snd_soc_component *component,
return ret;
}
+static int q6apm_dai_assign_one_region(struct q6apm_scm_region *region,
+ struct q6apm_dai_data *pdata)
+{
+ struct qcom_scm_vmperm *dst_vmids;
+ int dst_count = 0;
+ int ret, i;
+
+ if (region->assigned)
+ return 0;
+
+ dst_vmids = kcalloc(pdata->num_vmids + 1, sizeof(*dst_vmids),
+ GFP_KERNEL);
+ if (!dst_vmids)
+ return -ENOMEM;
+
+ /* Always keep HLOS RW so CPU can continue carveout access. */
+ dst_vmids[dst_count].vmid = QCOM_SCM_VMID_HLOS;
+ dst_vmids[dst_count].perm = QCOM_SCM_PERM_RW;
+ dst_count++;
+
+ for (i = 0; i < pdata->num_vmids; i++) {
+ if (WARN_ON_ONCE(pdata->vmids[i] == QCOM_SCM_VMID_HLOS))
+ continue;
+ dst_vmids[dst_count].vmid = pdata->vmids[i];
+ dst_vmids[dst_count].perm = QCOM_SCM_PERM_RW;
+ dst_count++;
+ }
+
+ if (dst_count == 1) {
+ /* Nothing to assign beyond HLOS access. */
+ kfree(dst_vmids);
+ return 0;
+ }
+
+ ret = qcom_scm_assign_mem(region->dma_addr, region->size,
+ ®ion->src_perms, dst_vmids, dst_count);
+ kfree(dst_vmids);
+ if (!ret)
+ region->assigned = true;
+ return ret;
+}
+
+static int q6apm_dai_assign_carveout(struct q6apm_dai_data *pdata)
+{
+ int i, ret;
+
+ if (!pdata->use_scm_assign || !pdata->num_carveouts)
+ return 0;
+
+ for (i = 0; i < pdata->num_carveouts; i++) {
+ ret = q6apm_dai_assign_one_region(&pdata->carveout_regions[i],
+ pdata);
+ if (ret)
+ return ret;
+ }
+ return 0;
+}
+
+static void q6apm_dai_unassign_one_region(struct snd_soc_component *component,
+ struct q6apm_scm_region *region)
+{
+ struct device *dev = component->dev;
+ struct qcom_scm_vmperm hlos = {
+ .vmid = QCOM_SCM_VMID_HLOS,
+ .perm = QCOM_SCM_PERM_RW,
+ };
+ int ret;
+
+ if (!region->assigned)
+ return;
+
+ ret = qcom_scm_assign_mem(region->dma_addr, region->size,
+ ®ion->src_perms, &hlos, 1);
+ if (!ret) {
+ region->assigned = false;
+ region->src_perms = BIT_ULL(QCOM_SCM_VMID_HLOS);
+ } else {
+ dev_err(dev,
+ "Failed to unassign carveout %pa from VMIDs: %d\n",
+ ®ion->dma_addr, ret);
+ }
+}
+
+static void q6apm_dai_unassign_carveout(struct snd_soc_component *component,
+ struct q6apm_dai_data *pdata)
+{
+ int i;
+
+ if (!pdata->use_scm_assign || !pdata->num_carveouts)
+ return;
+
+ for (i = 0; i < pdata->num_carveouts; i++)
+ q6apm_dai_unassign_one_region(component,
+ &pdata->carveout_regions[i]);
+}
+
static const struct snd_pcm_hardware q6apm_dai_hardware_capture = {
.info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_BLOCK_TRANSFER |
SNDRV_PCM_INFO_MMAP_VALID | SNDRV_PCM_INFO_INTERLEAVED |
@@ -469,7 +577,8 @@ static int q6apm_dai_open(struct snd_soc_component *component,
struct device *dev = component->dev;
struct q6apm_dai_data *pdata;
struct q6apm_dai_rtd *prtd;
- unsigned int assign_size = BUFFER_BYTES_MAX + PAGE_SIZE;
+ unsigned int buf_size;
+ unsigned int assign_size;
int graph_id, ret;
graph_id = cpu_dai->driver->id;
@@ -480,6 +589,9 @@ static int q6apm_dai_open(struct snd_soc_component *component,
return -EINVAL;
}
+ buf_size = pdata->has_reserved_mem ? pdata->reserved_buf_size : BUFFER_BYTES_MAX;
+ assign_size = buf_size + PAGE_SIZE;
+
prtd = kzalloc_obj(*prtd);
if (prtd == NULL)
return -ENOMEM;
@@ -507,7 +619,7 @@ static int q6apm_dai_open(struct snd_soc_component *component,
if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
ret = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES,
- BUFFER_BYTES_MIN, BUFFER_BYTES_MAX);
+ BUFFER_BYTES_MIN, buf_size);
if (ret < 0) {
dev_err(dev, "constraint for buffer bytes min max ret = %d\n", ret);
goto err;
@@ -528,7 +640,7 @@ static int q6apm_dai_open(struct snd_soc_component *component,
}
runtime->private_data = prtd;
- runtime->dma_bytes = BUFFER_BYTES_MAX;
+ runtime->dma_bytes = buf_size;
if (pdata->sid < 0)
prtd->phys = substream->dma_buffer.addr;
else
@@ -538,8 +650,8 @@ static int q6apm_dai_open(struct snd_soc_component *component,
void *pos_buffer;
assign_size += POS_BUFFER_BYTES;
- prtd->pos_phys = prtd->phys + BUFFER_BYTES_MAX;
- pos_buffer = (void *)(substream->dma_buffer.area + BUFFER_BYTES_MAX);
+ prtd->pos_phys = prtd->phys + buf_size;
+ pos_buffer = (void *)(substream->dma_buffer.area + buf_size);
prtd->pos_buffer = (struct sh_mem_pull_push_mode_position_buffer *)(pos_buffer);
}
@@ -660,7 +772,9 @@ static int q6apm_dai_memory_map(struct snd_soc_component *component,
else
phys = substream->dma_buffer.addr | (pdata->sid << 32);
- ret = q6apm_map_memory_fixed_region(dev, graph_id, phys, BUFFER_BYTES_MAX);
+ ret = q6apm_map_memory_fixed_region(dev, graph_id, phys,
+ pdata->has_reserved_mem ?
+ pdata->reserved_buf_size : BUFFER_BYTES_MAX);
if (ret < 0)
dev_err(dev, "Audio Start: Buffer Allocation failed rc = %d\n", ret);
@@ -716,7 +830,19 @@ static int q6apm_dai_pcm_new(struct snd_soc_component *component, struct snd_soc
if (is_push_pull)
size += POS_BUFFER_BYTES;
- ret = snd_pcm_set_fixed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV, component->dev, size);
+ /*
+ * When a reserved DMA pool is attached (memory-region in DT), allocate
+ * PCM buffers from it so the DSP accesses the carveout address directly.
+ * Fall back to the standard fixed system-RAM buffer on other platforms.
+ */
+ if (pdata->has_reserved_mem)
+ ret = snd_pcm_set_managed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
+ component->dev,
+ pdata->reserved_buf_size,
+ pdata->reserved_buf_size);
+ else
+ ret = snd_pcm_set_fixed_buffer_all(pcm, SNDRV_DMA_TYPE_DEV,
+ component->dev, size);
if (ret)
return ret;
@@ -725,6 +851,12 @@ static int q6apm_dai_pcm_new(struct snd_soc_component *component, struct snd_soc
return ret;
}
+ if (pdata->use_scm_assign && pdata->num_carveouts) {
+ ret = q6apm_dai_assign_carveout(pdata);
+ if (ret)
+ return ret;
+ }
+
return 0;
}
@@ -758,6 +890,9 @@ static void q6apm_dai_pcm_free(struct snd_soc_component *component, struct snd_p
if (!pdata)
return;
+ if (pdata->use_scm_assign && pdata->num_carveouts)
+ q6apm_dai_unassign_carveout(component, pdata);
+
substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream;
if (substream)
q6apm_dai_memory_unmap(component, substream);
@@ -1157,6 +1292,11 @@ static const struct snd_soc_component_driver q6apm_fe_dai_component = {
.remove_order = SND_SOC_COMP_ORDER_EARLY,
};
+static void q6apm_dai_reserved_mem_release(void *data)
+{
+ of_reserved_mem_device_release(data);
+}
+
static int q6apm_dai_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -1214,6 +1354,88 @@ static int q6apm_dai_probe(struct platform_device *pdev)
pdata->use_scm_assign = true;
}
+ /*
+ * Attach the data-path reserved memory region (index 1 in
+ * memory-region, e.g. audio_mdsp_carveout_mem on shikra) as a DMA
+ * pool so that snd_pcm_set_managed_buffer_all() allocates PCM
+ * buffers from the carveout instead of system RAM. The size is read
+ * from the DT node and capped at BUFFER_BYTES_MAX.
+ * Index 0 is the control-path carveout (SCM-assigned separately).
+ * Platforms without memory-region are completely unaffected.
+ */
+ if (of_property_present(node, "memory-region")) {
+ struct device_node *rmem_node;
+ struct reserved_mem *rmem = NULL;
+
+ /* index 1 = data path (PCM DMA buffer pool) */
+ rmem_node = of_parse_phandle(node, "memory-region", 1);
+ if (rmem_node) {
+ rmem = of_reserved_mem_lookup(rmem_node);
+ of_node_put(rmem_node);
+ }
+
+ if (rmem) {
+ rc = of_reserved_mem_device_init_by_idx(dev, node, 1);
+ if (rc) {
+ dev_err(dev,
+ "failed to attach reserved memory pool: %d\n",
+ rc);
+ return rc;
+ }
+ rc = devm_add_action_or_reset(dev,
+ q6apm_dai_reserved_mem_release,
+ dev);
+ if (rc)
+ return rc;
+ pdata->reserved_buf_size = min_t(size_t, rmem->size / 4,
+ BUFFER_BYTES_MAX);
+ pdata->has_reserved_mem = true;
+ } else {
+ dev_warn(dev,
+ "memory-region index 1 not found, using system RAM\n");
+ }
+ }
+
+ if (pdata->use_scm_assign) {
+ struct device_node *mem_node;
+ int idx = 0;
+
+ while ((mem_node = of_parse_phandle(node, "memory-region",
+ idx++))) {
+ struct reserved_mem *rmem;
+ struct q6apm_scm_region *r;
+
+ /*
+ * Only index 0 (control-path carveout) is SCM-assigned
+ * via carveout_regions[]. Index 1+ are data-path DMA
+ * pools handled per-substream by q6apm_dai_assign_memory()
+ * in open(). Including them here causes a double-assignment
+ * of the same physical region which TZ rejects with -EINVAL.
+ */
+ if (idx > 1) {
+ of_node_put(mem_node);
+ break;
+ }
+
+ if (pdata->num_carveouts >= Q6APM_MAX_CARVEOUTS) {
+ dev_warn(dev,
+ "memory-region: too many entries, ignoring rest\n");
+ of_node_put(mem_node);
+ break;
+ }
+
+ rmem = of_reserved_mem_lookup(mem_node);
+ of_node_put(mem_node);
+ if (!rmem)
+ continue;
+
+ r = &pdata->carveout_regions[pdata->num_carveouts++];
+ r->dma_addr = rmem->base;
+ r->size = ALIGN(rmem->size, PAGE_SIZE);
+ r->src_perms = BIT_ULL(QCOM_SCM_VMID_HLOS);
+ }
+ }
+
if (pdata->use_scm_assign && !qcom_scm_is_available())
return -EPROBE_DEFER;
--
2.34.1
^ permalink raw reply related
* Re: [PATCH] ASoC: SDCA: Validate written enum value in ge_put_enum_double()
From: Mark Brown @ 2026-06-23 13:47 UTC (permalink / raw)
To: Liam Girdwood, Charles Keepax, Maciej Strozek, HyeongJun An
Cc: Bard Liao, Pierre-Louis Bossart, Jaroslav Kysela, Takashi Iwai,
linux-sound, linux-kernel
In-Reply-To: <20260623110526.813217-1-sammiee5311@gmail.com>
On Tue, 23 Jun 2026 20:05:26 +0900, HyeongJun An wrote:
> ASoC: SDCA: Validate written enum value in ge_put_enum_double()
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2
Thanks!
[1/1] ASoC: SDCA: Validate written enum value in ge_put_enum_double()
https://git.kernel.org/broonie/sound/c/1ce42a11bed1
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply
* Re: [PATCH] ASoC: rt5575: Use __le32 for SPI burst write address
From: Mark Brown @ 2026-06-23 14:04 UTC (permalink / raw)
To: lgirdwood, Oder Chiou
Cc: linux-sound, flove, shumingf, jack.yu, derek.fang,
kernel test robot
In-Reply-To: <20260623102514.2422990-1-oder_chiou@realtek.com>
On Tue, 23 Jun 2026 18:25:14 +0800, Oder Chiou wrote:
> ASoC: rt5575: Use __le32 for SPI burst write address
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2
Thanks!
[1/1] ASoC: rt5575: Use __le32 for SPI burst write address
https://git.kernel.org/broonie/sound/c/d0c415f0076b
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply
* Re: [PATCH v2 0/5] Fix SoundWire randconfig issues
From: Mark Brown @ 2026-06-23 13:47 UTC (permalink / raw)
To: Charles Keepax
Cc: vkoul, arnd, lgirdwood, pierre-louis.bossart, yung-chuan.liao,
peter.ujfalusi, oder_chiou, jack.yu, shumingf, niranjan.hy,
shenghao-ding, kevin-lu, baojun.xu, sen, zhangyi, linux-sound,
linux-kernel, patches
In-Reply-To: <20260623101814.24044-1-ckeepax@opensource.cirrus.com>
On Tue, 23 Jun 2026 11:18:09 +0100, Charles Keepax wrote:
> Fix SoundWire randconfig issues
>
> Moving all the waiting for soundwire devices to enumerate into the core
> code [1] has caused some randconfig issues. This is the second attempt
> to fix this after there were some short coming in [2].
>
> Sorry for sending during the merge window, but people are keen to see
> a solution posted.
>
> [...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2
Thanks!
[1/5] soundwire: Move wait for initialisation helper to header
https://git.kernel.org/broonie/sound/c/5714c8359f4f
[2/5] ASoC: es9356: Add back local call to sdw_show_ping_status()
https://git.kernel.org/broonie/sound/c/ce52450319fb
[3/5] ASoC: max98373: Add back local call to sdw_show_ping_status()
https://git.kernel.org/broonie/sound/c/1921303a1d2f
[4/5] ASoC: ti: Add back local call to sdw_show_ping_status()
https://git.kernel.org/broonie/sound/c/ea9ff3b7bcfb
[5/5] ASoC: realtek: Add back local call to sdw_show_ping_status()
https://git.kernel.org/broonie/sound/c/6540b9d9ccc3
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply
* Re: [PATCH v4] ASoC: tas2783: Update loaded firmware names to linux-firmware 20260519
From: Mark Brown @ 2026-06-23 14:03 UTC (permalink / raw)
To: Bartosz Juraszewski
Cc: Shenghao Ding, Kevin Lu, Baojun Xu, Sen Wang, Liam Girdwood,
Jaroslav Kysela, Takashi Iwai, linux-sound, linux-kernel
In-Reply-To: <20260622182733.23947-1-bjuraszewski@gmail.com>
On Mon, 22 Jun 2026 20:27:33 +0200, Bartosz Juraszewski wrote:
> ASoC: tas2783: Update loaded firmware names to linux-firmware 20260519
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-7.2
Thanks!
[1/1] ASoC: tas2783: Update loaded firmware names to linux-firmware 20260519
https://git.kernel.org/broonie/sound/c/e26bb459d0f3
All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying
to this mail.
Thanks,
Mark
^ permalink raw reply
* Re: [PATCH v3 2/5] ASoC: Intel: avs: Use guard() for locking
From: Bui Duc Phuc @ 2026-06-24 9:52 UTC (permalink / raw)
To: Cezary Rojewski
Cc: Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi, Bard Liao,
Kai Vehmanen, Pierre-Louis Bossart, linux-sound, linux-kernel,
Mark Brown, Liam Girdwood
In-Reply-To: <6461a163-e223-40c2-ac50-f238ecbd56c0@intel.com>
On Wed, Jun 24, 2026 at 2:47 AM Cezary Rojewski
<cezary.rojewski@intel.com> wrote:
>
> On 6/23/2026 12:57 PM, phucduc.bui@gmail.com wrote:
> > From: bui duc phuc <phucduc.bui@gmail.com>
> >
> > Clean up the code using guard() for spin & mutex locks.
> > Merely code refactoring, and no behavior change.
>
> Apart from one point below, looks good overall. What bothers me is lack
> of includes - all these files are missing linux/cleanup.h header despite
> clearly using its members.
>
> > sound/soc/intel/avs/apl.c | 7 ++-----
> > sound/soc/intel/avs/control.c | 7 ++-----
> > sound/soc/intel/avs/core.c | 3 +--
> > sound/soc/intel/avs/debug.h | 9 ++------
> > sound/soc/intel/avs/ipc.c | 10 +++------
> > sound/soc/intel/avs/path.c | 29 +++++++-------------------
> > sound/soc/intel/avs/utils.c | 39 ++++++++++++-----------------------
> > 7 files changed, 31 insertions(+), 73 deletions(-)
>
> ...
>
> > int avs_module_id_alloc(struct avs_dev *adev, u16 module_id)
> > {
> > int ret, idx, max_id;
> >
> > - mutex_lock(&adev->modres_mutex);
> > + guard(mutex)(&adev->modres_mutex);
> >
> > idx = avs_module_id_entry_index(adev, module_id);
> > if (idx == -ENOENT) {
> > dev_err(adev->dev, "invalid module id: %d", module_id);
> > - ret = -EINVAL;
> > - goto exit;
> > + return -EINVAL;
> > }
> > max_id = adev->mods_info->entries[idx].instance_max_count - 1;
> > ret = ida_alloc_max(adev->mod_idas[idx], max_id, GFP_KERNEL);
> > -exit:
> > - mutex_unlock(&adev->modres_mutex);
> > +
>
> Drop 'ret' entirely and just 'return ida_alloc_max()'.
>
> > return ret;
> > }
Thanks for the review.
I'll make that change in the next revision.
^ permalink raw reply
* Re: [PATCH v3 5/5] ASoC: Intel: atom: Use guard() for locking
From: Bui Duc Phuc @ 2026-06-24 9:49 UTC (permalink / raw)
To: Cezary Rojewski
Cc: Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi, Bard Liao,
Kai Vehmanen, Pierre-Louis Bossart, linux-sound, linux-kernel,
Mark Brown, Liam Girdwood
In-Reply-To: <ad96abd2-dd6b-4fdd-8033-bda4e1389884@intel.com>
On Wed, Jun 24, 2026 at 3:54 PM Cezary Rojewski
<cezary.rojewski@intel.com> wrote:
>
> On 6/24/2026 10:07 AM, Bui Duc Phuc wrote:
> > Thanks for the review.
> >
> >>> Clean up the code using guard() for spin & mutex locks.
> >>> Merely code refactoring, and no behavior change.
> >>
> >> The change looks good - just dropping by to mention that the cleanup.h
> >> is missing everywhere : )
> >
> > I noticed that both spinlock.h and mutex.h already pull in cleanup.h,
> > so the guard()/scoped_guard() macros are available without an explicit include.
> > Could you clarify the reasoning for adding #include <linux/cleanup.h>
> > explicitly here?
>
> Follow the include-what-you-use (IWYU) approach. While the approach
> could be tailored per-header, in general it makes any future job of
> cleaning up the headers easier.
Thanks for the clarification.
I will explicitly add #include <linux/cleanup.h> to follow the IWYU
principle in the next version.
^ permalink raw reply
* Re: [PATCH] ALSA: seq: Fix uninitialised heap leak in snd_seq_event_dup()
From: Takashi Iwai @ 2026-06-24 9:03 UTC (permalink / raw)
To: HyeongJun An
Cc: Takashi Iwai, Jaroslav Kysela, linux-sound, linux-kernel, stable
In-Reply-To: <20260623233841.853326-1-sammiee5311@gmail.com>
On Wed, 24 Jun 2026 01:38:40 +0200,
HyeongJun An wrote:
>
> snd_seq_event_dup() copies an incoming event into a pool cell and, in
> the UMP-enabled build, clears the trailing cell->ump.raw.extra word that
> the memcpy() did not cover. The guard deciding whether to clear it
> compares the copied size against sizeof(cell->event):
>
> memcpy(&cell->ump, event, size);
> if (size < sizeof(cell->event))
> cell->ump.raw.extra = 0;
>
> For a legacy (non-UMP) event, size == sizeof(struct snd_seq_event) ==
> sizeof(cell->event), so the condition is false and the extra word keeps
> stale data. The cell pool is allocated with kvmalloc() (not zeroed) and
> cells are reused via a free list, so that word holds uninitialised heap
> or leftover event data.
>
> When such a cell is delivered to a UMP client (client->midi_version > 0)
> that set SNDRV_SEQ_FILTER_NO_CONVERT -- so the legacy event reaches it
> unconverted -- snd_seq_read() reads it out as the larger struct
> snd_seq_ump_event and copies the stale word to user space, a 4-byte
> kernel heap infoleak to an unprivileged /dev/snd/seq client.
>
> Compare against sizeof(cell->ump) instead, so the trailing word is zeroed
> for every event shorter than the UMP cell.
>
> Fixes: 46397622a3fa ("ALSA: seq: Add UMP support")
> Cc: stable@vger.kernel.org
> Assisted-by: Claude:claude-opus-4-8
> Signed-off-by: HyeongJun An <sammiee5311@gmail.com>
Applied now. Thanks.
Takashi
^ permalink raw reply
* Re: [PATCH v1] ASoC: rockchip: rockchip_sai: #include <linux/platform_device.h> explicitly
From: Nicolas Frattaroli @ 2026-06-24 8:57 UTC (permalink / raw)
To: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Uwe Kleine-König (The Capable Hub)
Cc: Heiko Stuebner, linux-rockchip, linux-sound, linux-arm-kernel,
linux-kernel
In-Reply-To: <20260624083708.254517-2-u.kleine-koenig@baylibre.com>
On Wednesday, 24 June 2026 10:37:07 Central European Summer Time Uwe Kleine-König (The Capable Hub) wrote:
> Currently that header is only included via:
>
> <sound/dmaengine_pcm.h> ->
> <sound/soc.h> ->
> <linux/platform_device.h>
>
> which doesn't look reliable, still more in the presence of the comment:
>
> /* For the current users of sound/soc.h to avoid build issues */
>
> in <sound/soc.h>.
>
> Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
> ---
> sound/soc/rockchip/rockchip_sai.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/sound/soc/rockchip/rockchip_sai.c b/sound/soc/rockchip/rockchip_sai.c
> index a195e96fed0a..37e81d56bc16 100644
> --- a/sound/soc/rockchip/rockchip_sai.c
> +++ b/sound/soc/rockchip/rockchip_sai.c
> @@ -11,6 +11,7 @@
> #include <linux/delay.h>
> #include <linux/of_device.h>
> #include <linux/clk.h>
> +#include <linux/platform_device.h>
> #include <linux/pm_runtime.h>
> #include <linux/regmap.h>
> #include <linux/reset.h>
>
> base-commit: ef0c9f75a19532d7675384708fc8621e10850104
>
Makes sense.
Reviewed-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
^ permalink raw reply
* Re: [PATCH v3 5/5] ASoC: Intel: atom: Use guard() for locking
From: Cezary Rojewski @ 2026-06-24 8:54 UTC (permalink / raw)
To: Bui Duc Phuc
Cc: Jaroslav Kysela, Takashi Iwai, Peter Ujfalusi, Bard Liao,
Kai Vehmanen, Pierre-Louis Bossart, linux-sound, linux-kernel,
Mark Brown, Liam Girdwood
In-Reply-To: <CAABR9nEWAcwTBet022zyDJPFVc55q4xZR7y8HNzc_x3WeCPtRA@mail.gmail.com>
On 6/24/2026 10:07 AM, Bui Duc Phuc wrote:
> Thanks for the review.
>
>>> Clean up the code using guard() for spin & mutex locks.
>>> Merely code refactoring, and no behavior change.
>>
>> The change looks good - just dropping by to mention that the cleanup.h
>> is missing everywhere : )
>
> I noticed that both spinlock.h and mutex.h already pull in cleanup.h,
> so the guard()/scoped_guard() macros are available without an explicit include.
> Could you clarify the reasoning for adding #include <linux/cleanup.h>
> explicitly here?
Follow the include-what-you-use (IWYU) approach. While the approach
could be tailored per-header, in general it makes any future job of
cleaning up the headers easier.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox