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

linux: raspberrypi: add reorder channel allocation patch #8851

Merged
merged 1 commit into from
May 24, 2024

Conversation

chewitt
Copy link
Member

@chewitt chewitt commented May 3, 2024

This resolves an issue flagged in the forums where alsa incorrectly matches speaker layout because the list of supported layouts is not ordered correctly. The patch has been included with Amlogic images since 2019 so I'm reasonably confident it doesn't cause problems, but RPi has a much larger user audience so I'd like to prove the theory by including it in LE12 and LE13 nightlies. If no issues are seen I will send the patch upstream on @Kwiboo behalf. I have been nagging him to send it himself for several years already, but, well, it never seems to reach the top of his to-do list :)

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
@HiassofT
Copy link
Member

I'd prefer if someone else with knowledge about multichannel audio could review this.
I have no idea if this has the chance to break existing setups and also no way to test

@HiassofT HiassofT removed their assignment May 11, 2024
@jernejsk
Copy link
Member

@Kwiboo wasn't this patch submitted to mainline already? If not, I guess it should be. We have it for all platforms now.

@Kwiboo
Copy link
Member

Kwiboo commented May 11, 2024

The patch has been on mailing list since 2019, and it still applies clean on linux-next:

https://lore.kernel.org/all/HE1PR06MB4011885AED9F32B09183B617ACD40@HE1PR06MB4011.eurprd06.prod.outlook.com/

Looks like there is some diff compared to that versions:

  • the if (hcp->chmap_idx != HDMI_CODEC_CHMAP_IDX_UNKNOWN) change has been added
  • entries for .ca_id = 0x0b, .n_ch = 8 - .ca_id = 0x01, .n_ch = 8 has been added

So maybe it is time to send a v2 😄

@chewitt
Copy link
Member Author

chewitt commented May 11, 2024

@Kwiboo I have fuzzy recall that I consolidated two commits to one at some point, which explains the difference.

@marklam
Copy link

marklam commented May 13, 2024

If it helps, I've tested @chewitt's build with this change on a raspberry pi 2 with a 7.1 (3/4.1) setup (Sony STR-DH520), using the files in https://github.com/sfiera/flac-test-files

All the different-layout test files play back correctly with that build, including the 6.1 file having the rear centre channel mapped to rear-left and rear-right.

Previously the 7.1 files were sent to the receiver as 6.1. (So the rear left/right was reduced to a rear centre. and then duplicated by the receiver.)

@chewitt
Copy link
Member Author

chewitt commented May 13, 2024

Amlogic had a long-running issue with controls not mapping correctly resulting in odd speaker layouts, but that was fixed with chewitt/linux@324cbc8 (two years ago) and I haven't seen any reports of odd speaker positions on Amlogic images since then. Allwinner carries the same patch too. So I think we're safe to merge and throw the net wider. Worst case we find something and either revert the patch, or need to reorder something in the patch.

@heitbaum heitbaum merged commit 68bd02c into LibreELEC:master May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants