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

byt: fix sporadic channel swap #3777

Merged
merged 1 commit into from
Jan 25, 2021
Merged

Conversation

lyakh
Copy link
Collaborator

@lyakh lyakh commented Jan 22, 2021

Commit 05e1c26 ("byt-ssp: fixes for DSP modes") removed a work-around for known hardware bugs, causing channel swapping in I2S mode. Restore the work-around but make sure it's only enabled in I2S and LEFT_J modes.

Fixes: #3699, #3520

Commit 05e1c26 ("byt-ssp: fixes for DSP modes") removed a
work-around for known hardware bugs, causing channel swapping
in I2S mode. Restore the work-around but make sure it's only
enabled in I2S and LEFT_J modes.

Fixes: thesofproject#3699, thesofproject#3520

Signed-off-by: Guennadi Liakhovetski <[email protected]>
Copy link

@juimonen juimonen left a comment

Choose a reason for hiding this comment

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

cool! lgtm

@lgirdwood
Copy link
Member

SOFCI TEST

@plbossart
Copy link
Member

Interesting @lyakh, those bits seemed 'harmless' but are required. Wow.

May I ask how this was tested? Have @singalsu and @jwrdegoede looked into this?

@jwrdegoede
Copy link
Contributor

Nice, this will hopefully also fix the playback channel swap problem (#3699) which I reported.

Is this source file also used on CHT? Because I've seen this problem on CHT too.

If someone can provide me with a test build with this patch included for BYT + CHT, then I can confirm if this indeed resolves #3699.

@lyakh
Copy link
Collaborator Author

lyakh commented Jan 22, 2021

Interesting @lyakh, those bits seemed 'harmless' but are required. Wow.

May I ask how this was tested? Have @singalsu and @jwrdegoede looked into this?

@plbossart tested with speaker-test, @singalsu has seen it, but not sure how much effort he put into studying this solution :-)

@lyakh
Copy link
Collaborator Author

lyakh commented Jan 22, 2021

Nice, this will hopefully also fix the playback channel swap problem (#3699) which I reported.

Is this source file also used on CHT? Because I've seen this problem on CHT too.

If someone can provide me with a test build with this patch included for BYT + CHT, then I can confirm if this indeed resolves #3699.

@jwrdegoede should fix it, yes. Yes, that driver is also used on CHT. I don't know what signing you need for your firmware, if the SOF key signing is ok for you, I guess I could send you an image

@jwrdegoede
Copy link
Contributor

jwrdegoede commented Jan 22, 2021

I use standard BYT/CHT retail hw for testing. The official sof images from sof-bin work for me, but I don't think I can run unsigned fw. You can reach my by email at [email protected]

@plbossart
Copy link
Member

I use standard BYT/CHT retail hw for testing. The official sof images from sof-bin work for me, but I don't think I can run unsigned fw.

there's no firmware signature on BYT/CHT and authentication, it was only added in Skylake. @lyakh can you attach your sof-byt.ri and sof-cht.ri?

@lyakh
Copy link
Collaborator Author

lyakh commented Jan 22, 2021

@jwrdegoede
Copy link
Contributor

@plbossart @jwrdegoede

3777.tar.gz

Thanks, I've tested this on a "HP x2 Detachable 10-p0XX" which is CHT based and uses a rt5640 codec. I used this device because in previous testing this one seemed to be the most likely to have the channel-swap problem / the device on which this problem reproduces the easiest for me. I have confirmed that the problem still happened on this device with the latest kernel and the 1.6 SOF release.

I'm happy to report that with the SOF firmware from this attachment the problem is gone (no output channel swapping in 10 tries, with closing the device in between each try).

So I can confirm that this pull-req fixes #3699.

@lyakh
Copy link
Collaborator Author

lyakh commented Jan 23, 2021

I'm happy to report that with the SOF firmware from this attachment the problem is gone (no output channel swapping in 10 tries, with closing the device in between each try).

So I can confirm that this pull-req fixes #3699.

@jwrdegoede thanks for testing!

Copy link
Contributor

@keyonjie keyonjie left a comment

Choose a reason for hiding this comment

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

Thanks for the nice finding and fixes. Looks good to me!

@keyonjie keyonjie merged commit f3b87b4 into thesofproject:master Jan 25, 2021
@lyakh lyakh deleted the byt-chan_swap branch January 25, 2021 07:28
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.

[BUG][BYT][CHT] Output channel left/right swap on various BYT/CHT devices with various codecs
6 participants