mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-18 02:04:05 +08:00
ASoC: Intel: KMB: Fix random noise at the HDMI output
Random noise could be heard when playing audio to the HDMI output. This is due to the IEC conversion is invoked in the external loop. As a result, this additional loop takes up a lot of the processing cycle. hdmi_reformat_iec958() process the conversion using an internal loop, it is safe to move it out from the external loop to avoid unnecessary processing cycle been spent. Furthermore, ALSA IEC958 plugin works in 32bit format only. Signed-off-by: Sia Jee Heng <jee.heng.sia@intel.com> Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20210421005546.7534-1-jee.heng.sia@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
1300c7037f
commit
62bad12bce
@ -105,14 +105,15 @@ static unsigned int kmb_pcm_tx_fn(struct kmb_i2s_info *kmb_i2s,
|
||||
void *buf = runtime->dma_area;
|
||||
int i;
|
||||
|
||||
if (kmb_i2s->iec958_fmt)
|
||||
hdmi_reformat_iec958(runtime, kmb_i2s, tx_ptr);
|
||||
|
||||
/* KMB i2s uses two separate L/R FIFO */
|
||||
for (i = 0; i < kmb_i2s->fifo_th; i++) {
|
||||
if (kmb_i2s->config.data_width == 16) {
|
||||
writel(((u16(*)[2])buf)[tx_ptr][0], i2s_base + LRBR_LTHR(0));
|
||||
writel(((u16(*)[2])buf)[tx_ptr][1], i2s_base + RRBR_RTHR(0));
|
||||
} else {
|
||||
if (kmb_i2s->iec958_fmt)
|
||||
hdmi_reformat_iec958(runtime, kmb_i2s, tx_ptr);
|
||||
writel(((u32(*)[2])buf)[tx_ptr][0], i2s_base + LRBR_LTHR(0));
|
||||
writel(((u32(*)[2])buf)[tx_ptr][1], i2s_base + RRBR_RTHR(0));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user