Skip to content

byt: fix sporadic channel swap - #3777

Merged
keyonjie merged 1 commit into
thesofproject:masterfrom
lyakh:byt-chan_swap
Jan 25, 2021
Merged

keyonjie merged 1 commit into
thesofproject:masterfrom
lyakh:byt-chan_swap

Conversation

@lyakh

@lyakh lyakh commented Jan 22, 2021

Copy link
Copy Markdown
Collaborator

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 <guennadi.liakhovetski@linux.intel.com>

@juimonen juimonen left a comment

Copy link
Copy Markdown

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
Copy Markdown
Member

SOFCI TEST

@plbossart

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

lyakh commented Jan 22, 2021

Copy link
Copy Markdown
Collaborator Author

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

lyakh commented Jan 22, 2021

Copy link
Copy Markdown
Collaborator Author

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

jwrdegoede commented Jan 22, 2021 •

Copy link
Copy Markdown
Contributor

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 hdegoede@redhat.com

@plbossart

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

lyakh commented Jan 22, 2021 •

Copy link
Copy Markdown
Collaborator Author

@jwrdegoede

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

lyakh commented Jan 23, 2021

Copy link
Copy Markdown
Collaborator Author

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!

@keyonjie keyonjie 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.

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