Re: [PATCH RFC 0/4] ALSA: Consolidate CEA channel allocation data

From: Takashi Iwai

Date: Fri Jun 12 2026 - 05:18:15 EST


On Fri, 12 Jun 2026 06:53:22 +0200,
Cássio Gabriel wrote:
>
> HDA HDMI and Intel HDMI LPE maintain separate copies of the ordered
> CEA-861 channel allocation descriptors, ELD speaker expansion, and
> allocation selection logic. The Intel implementation originated from
> the HDA code, but the copies now differ in supported allocation ranges
> and fallback behavior.
>
> Move the common data and transformations alongside the PCM DRM ELD
> helpers, then migrate both users while preserving their established
> behavior. HDA retains the complete CA range and channel-count fallback.
> Intel HDMI LPE retains its CA 0x1f limit, ELD speaker bits 0 through 6,
> and lack of fallback for incompatible ELD data.
>
> The descriptors and their derived channel counts and speaker masks
> become compile-time constants. This removes duplicated mutable
> initialization and provides one authoritative allocation table without
> changing the existing allocation-selection policy.
>
> No hardware was available to test this patch series.
>
> Signed-off-by: Cássio Gabriel <cassiogabrielcontato@xxxxxxxxx>
> ---
> Cássio Gabriel (4):
> ALSA: pcm: Add common CEA channel allocation helpers
> ALSA: hda: Make CEA channel allocation interfaces const
> ALSA: hda: Use common CEA channel allocations
> ALSA: x86: Use common CEA channel allocations

This looks like a nice cleanup. There is similar code in
sound/soc/codecs/hdmi-codec.c, too. Can we integrate it further in
future?


thanks,

Takashi