diff --git a/config/mipi-generator/archr-dtbo.py b/config/mipi-generator/archr-dtbo.py index 40a73a3250..e4f48a435d 100644 --- a/config/mipi-generator/archr-dtbo.py +++ b/config/mipi-generator/archr-dtbo.py @@ -818,10 +818,27 @@ def make_dtbo(dtb_data, args): elif force_simple_audio_routing: rk817_path = hpdet_ovl.path+'/__overlay__/rk817-sound-simple' args['logger'].info("audio: simple variant (SRs flag: external amp on regulator)") + elif 'SDCLONE' in args['flags']: + # Clone subdevice (rk3326-gameconsole-eeclone.dts) does NOT + # include r3xs.dtsi, so there is no default `rk817-sound` + # node already active in the base DTS — both `amplified` + # and `simple` variants ship status="disabled". When the + # vendor DTB doesn't expose an amp GPIO we have to enable + # SOMETHING explicitly or `aplay -l` reports "no + # soundcards" (issue #35). Amplified is the safe default: + # the vast majority of R36S clones (V20 2024-05 onward) + # carry an external amp gated by a GPIO line that just + # isn't surfaced in the partial vendor DTB. Users on the + # rare amp-less clones can pick a _SRs (simple) overlay + # variant from the flasher. + rk817_path = hpdet_ovl.path+'/__overlay__/rk817-sound-amplified' + args['logger'].info("audio: amplified fallback (SDCLONE without detectable amp gpio — eeclone base has no default rk817-sound)") else: - # No amp GPIO detected, no SRs flag, no NAm flag. Keep the - # default rk817-sound (amp routing) active. This preserves - # R36S original/clone behaviour that worked under RC-3. + # No amp GPIO detected, no SRs flag, no NAm flag, and the + # subdevice has a default rk817-sound active in its base + # DTS (original / soysauce — via r3xs.dtsi). Keep that + # default; previous behaviour preserved for everything + # that already worked under RC-3. rk817_path = None args['logger'].info("audio: keeping default rk817-sound (amp routing from base DTS)") diff --git a/config/mipi-generator/generator.sh b/config/mipi-generator/generator.sh index 1c12748c43..684bc89dea 100755 --- a/config/mipi-generator/generator.sh +++ b/config/mipi-generator/generator.sh @@ -143,9 +143,19 @@ process_subdevice() { # boards; several clone vendor DTBs are mislabeled with `odroidgo3` # compatible and previously slipped through the short-circuit, leaving # the overlay without GPIO fixes (= "backlight on, no image"). + # + # SDCLONE: lets archr-dtbo.py know that the base DTS for this + # subdevice (rk3326-gameconsole-eeclone.dts) does NOT include the + # r3xs.dtsi `rk817-sound` default — both sound card variants ship + # with status="disabled". Without an explicit overlay to enable + # one, `aplay -l` finds no soundcards on those clones (issue #35). + # The audio block in archr-dtbo.py uses this flag to pick the + # `amplified` fallback when the vendor DTB doesn't expose enough + # to auto-classify between amplified / simple / spko-direct. local sd_prefix="" case "$sd" in original|soysauce) sd_prefix="SDORIG" ;; + clone) sd_prefix="SDCLONE" ;; esac # Soysauce (Y3506) boards have NO external speaker amplifier on