Skip to content

dw-dma: revert recent changes for Baytrail - #1451

Merged
lgirdwood merged 1 commit into
thesofproject:masterfrom
lyakh:dwdma-irq
May 22, 2019
Merged

lgirdwood merged 1 commit into
thesofproject:masterfrom
lyakh:dwdma-irq

Conversation

@lyakh

@lyakh lyakh commented May 17, 2019

Copy link
Copy Markdown
Collaborator

Fixes thesofproject/linux#873

Two recent commits:

7275e42 ('dw-dma: handle interrupts per core')
433de9f ('dw-dma: clear block/transfer irq after stop')

broke DW-DMA on Baytrail. Though they seem logical, they don't
produce the desired result on that platform. This patch restores the
original behaviour on BYT, CHT, BDW and HSW. It also eliminates the
redundant branch in the loop by replacing it with a simple mask to
restore the original IRQ processing order:

  1. clear the source IRQ
  2. clear the platform IRQ
  3. call the callbacks

Two recent commits:

7275e42 ('dw-dma: handle interrupts per core')
433de9f ('dw-dma: clear block/transfer irq after stop')

broke DW-DMA on Baytrail. Though they seem logical, they don't
produce the desired result on that platform. This patch restores the
original behaviour on BYT, CHT, BDW and HSW. It also eliminates the
redundant branch in the loop by replacing it with a simple mask to
restore the original IRQ processing order:

1. clear the source IRQ
2. clear the platform IRQ
3. call the callbacks

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
@lyakh
lyakh requested a review from tlauda May 17, 2019 11:29
@wenqingfu
wenqingfu requested review from lgirdwood and xiulipan May 17, 2019 12:58
@plbossart

Copy link
Copy Markdown
Member

I just tested on a CHT device and even with this PR I still get a distorted sound with beating noise on a sine waves and freq distortion on front left/right tests. This was the same as on a Baytrail device (which seems to RIP).
We'd still need to figure out when the last BKC was on Baytrail/Cherrytrail to bisect further

@plbossart

Copy link
Copy Markdown
Member

kernel for my tests: ceec549
firmware: 7d8cfb7 (this PR)

@tlauda

tlauda commented May 19, 2019

Copy link
Copy Markdown
Contributor

@lyakh Do you also see the distortions?

@wenqingfu

Copy link
Copy Markdown

@stevyan @Jiangxinx to test if this fixes thesofproject/linux#873 and if it's also the root cause of thesofproject/linux#933. @fredoh9 do you have a BYT with codec can give it a try, too?

@Jiangxinx

Copy link
Copy Markdown
Contributor

I have tested this PR on BYT rt5651 and BYT nocodec platform. Can not reproduce thesofproject/linux#873 .
By the way, I also can't reproduce thesofproject/linux#933 with or without this PR on BYT rt5651.

Kernel recipe
linux (topic/sof-dev) : 901cd2a

@plbossart

plbossart commented May 22, 2019 •

Copy link
Copy Markdown
Member

I have tested this PR on BYT rt5651 and BYT nocodec platform. Can not reproduce thesofproject/linux#873 .
By the way, I also can't reproduce thesofproject/linux#933 with or without this PR on BYT rt5651.

Kernel recipe
linux (topic/sof-dev) : 901cd2a

Can you provide a recording of a sine wave showing that the data is correct? It's not about casual listening, you need to use specific test files such as a sine wave or a chirp.

@jajanusz jajanusz left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need test as @plbossart mentioned.

@Jiangxinx

Jiangxinx commented May 22, 2019 •

Copy link
Copy Markdown
Contributor

@plbossart I have tested on BYT nocodec platform for thesofproject/linux#933 . I still can not hear beating noise. However, the left and right chennels seem to have changed without this PR1451, and it is correct with this PR.

step
aplay -Dhw:0,0 -fS16_LE -c2 -r 48000 sine_48k_16bit_10s_stereo_l5_r2.wav & arecord -Dhw:0,0 -fs16_le -c2 -r48000 test_with_1451.wav -vv -i

sine wave
1.original sinewave:
Screenshot from 2019-05-22 15-21-43

2.record without PR1451:
Screenshot from 2019-05-22 15-22-49

3.record with PR1451:
Screenshot from 2019-05-22 15-23-34

Kernel recipe
linux (topic/sof-dev) : e3ec7cf

sine source
sine_source.zip

@lyakh

lyakh commented May 22, 2019

Copy link
Copy Markdown
Collaborator Author

ping, what's the status of this PR? It fixes a specific problem, no, it does nothing to improve the audio distortion problem on BYT.

@lgirdwood
lgirdwood dismissed jajanusz’s stale review May 22, 2019 15:42

Tests completed now.

@lgirdwood
lgirdwood merged commit 1da3907 into thesofproject:master May 22, 2019
@lyakh
lyakh deleted the dwdma-irq branch May 29, 2019 12:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Regression][BYT][rt5651]: 'ipc timed out for 0x60050000' after aplay music at the 2nd time

8 participants