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

ASoC: dwc: Fix full-duplex mode #5757

Merged
merged 2 commits into from
Nov 28, 2023
Merged

Conversation

pelwell
Copy link
Contributor

@pelwell pelwell commented Nov 28, 2023

Configuration of the DMA register was carelessly zeroing bits that may used by a stream in the other direction. Preserve them instead.

See: #5741

@@ -210,10 +212,6 @@ static void dw_i2s_config(struct dw_i2s_dev *dev, int stream)
dmacr |= (DMACR_DMAEN_RXCH0 << ch_reg);
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks to me with the old code, unused channels would be cleared (by the dmacr=0 initialisation and then not setting the bit). Does this still happen with new code? (e.g. if this is called once with config->chan_nr=4 and then with config->chan_nr=2.

(Note: I'm not familiar with how this code is called, so ignore if you are happy with new behaviour).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's annoyingly correct. I've added clearing of the relevant group of channel enable flags before setting the appropriate number.

Configuration of the DMA register was carelessly zeroing bits that may
used by a stream in the other direction. Preserve them instead.

See: raspberrypi#5741

Signed-off-by: Phil Elwell <[email protected]>
@pelwell pelwell merged commit cbc65d9 into raspberrypi:rpi-6.1.y Nov 28, 2023
12 checks passed
@pelwell pelwell deleted the dwi2sdma branch November 28, 2023 16:00
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Nov 29, 2023
kernel: arch: arm: configs: add HID_NINTENDO to rpi defconfigs
See: raspberrypi/linux#5754

kernel: ASoC: dwc: Fix full-duplex mode
See: raspberrypi/linux#5757
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Nov 29, 2023
kernel: arch: arm: configs: add HID_NINTENDO to rpi defconfigs
See: raspberrypi/linux#5754

kernel: ASoC: dwc: Fix full-duplex mode
See: raspberrypi/linux#5757
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.

2 participants