[PATCH 2/2] ASoC: hdmi-codec: add channel mapping control

Takashi Sakamoto o-takashi at sakamocchi.jp
Tue Dec 13 13:58:17 UTC 2016

On 2016年12月13日 22:23, Takashi Sakamoto wrote:
> Hi Arnaud,
>>> This table is invariant in lifetime of the storage object, as well.
>>> Let's put into .rodata section, too.
>> This table is updated in hdmi_codec_cea_init_channel_alloc so can not be
>> constant. In theory i could declare all field instead of computing some.
>> But for lisibility, i would prefer to just declare ca_index  and
>> speakers allocation field in this table (i will declared both as const)
> You should pay enough attention to a case that one system has several
> GPUs to which relevant GPU drivers register HDMI_CODEC_DRV_NAME platform
> device. The 'static' modifier has an effect to keep just one storage
> object, thus your code causes bugs in the case.

Oops, the bug is unrelated to the static modifier. The modifier is for 
reference scope. I'll correct as the file local symbol has just one 
storage object.

(I might be tired tonight...)


Takashi Sakamoto

More information about the dri-devel mailing list