Skip to content

overlays: interludeaudio-analog: Fix codec reset polarity - #7690

Open
benpayne wants to merge 1 commit into
raspberrypi:rpi-6.18.yfrom
InterludeAudio:interludeaudio-analog-reset-polarity
Open

benpayne wants to merge 1 commit into
raspberrypi:rpi-6.18.yfrom
InterludeAudio:interludeaudio-analog-reset-polarity

Conversation

@benpayne

Copy link
Copy Markdown

The CS4272 codec on the Interlude Audio Analog Hat has an active-low reset, but interludeaudio-analog-overlay.dts declares GPIO24 as active high. That was harmless while cs4271.c drove the reset pin with raw GPIO values. Since 42d1178 ("ASoC: cs4271: Convert to GPIO descriptors") the driver honours the polarity flag, so the codec is left held in reset and the card fails to probe:

cs4271 1-0010: ASoC error (-5): at snd_soc_component_probe() on cs4271.1-0010
asoc-simple-card soc:sound: ASoC: failed to instantiate card -5
asoc-simple-card soc:sound: probe with driver asoc-simple-card failed with error -5

This change declares the reset GPIO as GPIO_ACTIVE_LOW. Kernels before the conversion ignore the flag, so it is a no-op there. The only difference in the compiled .dtbo is the flag cell of reset-gpio.

Tested on a Pi 4 with Raspberry Pi OS Trixie, kernel 6.12.47: with the fixed overlay the card enumerates as sndIAAnalogHat. The reset handling in cs4271.c is identical in rpi-6.18.y.

Please could this also be picked into rpi-6.12.y? Trixie images on 6.12 are affected.

audioinjector-isolated-soundcard-overlay.dts uses the same pattern (reset-gpio = <&gpio 5 0> on a CS4272), so it is probably affected too. We don't have that board to test, so I haven't changed it.

The CS4272 on the Interlude Audio Analog Hat has an active-low reset,
but the overlay declared GPIO24 as active high. This was harmless while
the cs4271 driver drove the reset pin with raw GPIO values, but since
commit 42d1178 ("ASoC: cs4271: Convert to GPIO descriptors") the
driver honours the polarity flag and leaves the codec held in reset, so
the card fails to probe:

  cs4271 1-0010: ASoC error (-5): at snd_soc_component_probe() on cs4271.1-0010
  asoc-simple-card soc:sound: ASoC: failed to instantiate card -5

Declare the reset GPIO as GPIO_ACTIVE_LOW. Kernels before the
conversion ignore the flag, so this is a no-op there.

Signed-off-by: Ben Payne <ben@bluerocksoft.com>
reg = <0x10>;
status = "okay";
reset-gpio = <&gpio 24 0>; /* Pin 26, active high */
reset-gpio = <&gpio 24 GPIO_ACTIVE_LOW>; /* Pin 26 */

@pelwell pelwell Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

In what way can GPIO 24 be pin 26? I could understand if it was pin 18, but header pin 26 carries GPIO 7. Aside from that, I'm ready to hit merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants