1
0
Fork 0

MLK-19312: ASoC: hdmi-codec: fix error log for hdmi audio

There is error log:

[   31.988272] hdmi-audio-codec hdmi-audio-codec.1: Not able to map channels to speakers (-22)
[   31.996659] hdmi-audio-codec hdmi-audio-codec.1: ASoC: can't set i2s-hifi hw params: -22

which is caused by the channel map read from device don't match
with current channel number.

Orignal method is just return error, but this channel number is
supported by device, so we think should not return error directly,
the playback can ongoing with UNKNOWN channel map.

This issue happen on some TV set (SUMSUNG UA40KUF30EJXXZ).

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
pull/10/head
Shengjiu Wang 2018-09-11 16:12:27 +08:00 committed by Jason Liu
parent 232a8a1178
commit feb958c742
1 changed files with 3 additions and 5 deletions

View File

@ -513,13 +513,11 @@ static int hdmi_codec_hw_params(struct snd_pcm_substream *substream,
/* Select a channel allocation that matches with ELD and pcm channels */
idx = hdmi_codec_get_ch_alloc_table_idx(hcp, hp.cea.channels);
if (idx < 0) {
dev_err(dai->dev, "Not able to map channels to speakers (%d)\n",
idx);
hcp->chmap_idx = HDMI_CODEC_CHMAP_IDX_UNKNOWN;
return idx;
} else {
hp.cea.channel_allocation = hdmi_codec_channel_alloc[idx].ca_id;
hcp->chmap_idx = hdmi_codec_channel_alloc[idx].ca_id;
}
hp.cea.channel_allocation = hdmi_codec_channel_alloc[idx].ca_id;
hcp->chmap_idx = hdmi_codec_channel_alloc[idx].ca_id;
hp.sample_width = params_width(params);
hp.sample_rate = params_rate(params);