hal: Use correct mixer element size when setting channel map
Function platform_set_channel_map() always use AUDIO_MAX_DSP_CHANNELS constant as size of array to be sent to corresponding mixer control. This is not correct because the number of elements in the mixer control can be less. This is case of sdm845/sdm710 kernels that does not support more than 8 channels in their mixer controls. This results in error reported by mixer_ctl_set_array() like this: D msm8974_platform: platform_set_channel_map mixer_ctl_name:Playback Channel Map13 D msm8974_platform: platform_set_channel_map: set mapping(1 2 0 0 0 0 0 0) for channel:2 E msm8974_platform: platform_set_channel_map: Could not set ctl, error:-22 ch_count:2 Use 'n' that represents size of mixer control as mixer_ctl_get_array() count parameter to fix this issue. Change-Id: I45e77aeb8c7fa532a520b4dfe8f3a75c05c37602
Loading
Please register or sign in to comment