mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 00:04:15 +08:00
6dfe70be0b
Byte mask for channel-1 of stream-1 is not getting enabled and this
causes failures during ADX use cases. This happens because the byte
map value 0 matches the byte map array and put() callback returns
without enabling the corresponding bits in the byte mask.
ADX supports 4 output streams and each stream can have a maximum of
16 channels. Each byte in the input frame is uniquely mapped to a
byte in one of these 4 outputs. This mapping is done with the help of
byte map array via user space control setting. The byte map array
size in the driver is 16 and each array element is of size 4 bytes.
This corresponds to 64 byte map values.
Each byte in the byte map array can have any value between 0 to 255
to enable the corresponding bits in the byte mask. The value 256 is
used as a way to disable the byte map. However the byte map array
element cannot store this value. The put() callback disables the byte
mask for 256 value and byte map value is reset to 0 for this case.
This causes problems during subsequent runs since put() callback,
for value of 0, just returns without enabling the byte mask. In short,
the problem is coming because 0 and 256 control values are stored as
0 in the byte map array.
Right now fix the put() callback by actually looking at the byte mask
array state to identify if any change is needed and update the fields
accordingly. The get() callback needs an update as well to return the
correct control value that user has set before. Note that when user
set 256, the value is stored as 0 and byte mask is disabled. So byte
mask state is used to either return 256 or the value from byte map
array.
Given above, this looks bit complicated and all this happens because
the byte map array is tightly packed and cannot actually store the 256
value. Right now the priority is to fix the existing failure and a TODO
item is put to improve this logic.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
tegra20_ac97.c | ||
tegra20_ac97.h | ||
tegra20_das.c | ||
tegra20_i2s.c | ||
tegra20_i2s.h | ||
tegra20_spdif.c | ||
tegra20_spdif.h | ||
tegra30_ahub.c | ||
tegra30_ahub.h | ||
tegra30_i2s.c | ||
tegra30_i2s.h | ||
tegra186_asrc.c | ||
tegra186_asrc.h | ||
tegra186_dspk.c | ||
tegra186_dspk.h | ||
tegra210_admaif.c | ||
tegra210_admaif.h | ||
tegra210_adx.c | ||
tegra210_adx.h | ||
tegra210_ahub.c | ||
tegra210_ahub.h | ||
tegra210_amx.c | ||
tegra210_amx.h | ||
tegra210_dmic.c | ||
tegra210_dmic.h | ||
tegra210_i2s.c | ||
tegra210_i2s.h | ||
tegra210_mbdrc.c | ||
tegra210_mbdrc.h | ||
tegra210_mixer.c | ||
tegra210_mixer.h | ||
tegra210_mvc.c | ||
tegra210_mvc.h | ||
tegra210_ope.c | ||
tegra210_ope.h | ||
tegra210_peq.c | ||
tegra210_peq.h | ||
tegra210_sfc.c | ||
tegra210_sfc.h | ||
tegra_asoc_machine.c | ||
tegra_asoc_machine.h | ||
tegra_audio_graph_card.c | ||
tegra_cif.h | ||
tegra_pcm.c | ||
tegra_pcm.h | ||
tegra_wm8903.c |