Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dw-dma: revert recent changes for Baytrail #1451

Merged
merged 1 commit into from
May 22, 2019

Conversation

lyakh
Copy link
Collaborator

@lyakh lyakh commented May 17, 2019

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 <[email protected]>
@lyakh lyakh requested a review from tlauda May 17, 2019 11:29
@plbossart
Copy link
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
Member

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

@tlauda
Copy link
Contributor

tlauda commented May 19, 2019

@lyakh Do you also see the distortions?

@wenqingfu
Copy link

@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
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
Copy link
Member

plbossart commented May 22, 2019

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.

Copy link
Contributor

@jajanusz jajanusz left a comment

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
Copy link
Contributor

Jiangxinx commented May 22, 2019

@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
Copy link
Collaborator Author

lyakh commented May 22, 2019

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.

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