Skip to content

bcm2835-i2s regression from asymmetric sample formats change #1799

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

Closed
HiassofT opened this issue Jan 16, 2017 · 3 comments
Closed

bcm2835-i2s regression from asymmetric sample formats change #1799

HiassofT opened this issue Jan 16, 2017 · 3 comments

Comments

@HiassofT
Copy link
Contributor

PR #1783 introduced a regression: when both a playback and record stream are opened at the same time several registers for the second stream aren't set up and the second stream fails.

eg use aplay | arecord to reproduce.

At the very beginning bcm2835_i2s_hw_params checks if any stream has been started and if yes hw_params bails out immediately:

	/*
	 * If a stream is already enabled,
	 * the registers are already set properly.
	 */
	regmap_read(dev->i2s_regmap, BCM2835_I2S_CS_A_REG, &csreg);

	if (csreg & (BCM2835_I2S_TXON | BCM2835_I2S_RXON))
		return 0;

This leads to eg BCM2835_I2S_TXC_A_REG/BCM2835_I2S_RXC_A_REG, BCM2835_I2S_MODE_A_REG not being initialized.

A proper fix would need quite some rework (only set up clocks once in hw_params, do separate clear_fifos for RX/TX etc) and also a lot of testing because I2S reconfiguration while another stream is running has never been tested before.

@gtrainavicius could you have a look at this?

@popcornmix @pelwell I suggest it's better to revert #1783 for now

pelwell pushed a commit that referenced this issue Jan 16, 2017
pelwell pushed a commit that referenced this issue Jan 16, 2017
@pelwell
Copy link
Contributor

pelwell commented Jan 16, 2017

Reverted.

@HiassofT
Copy link
Contributor Author

thanks!

@gtrainavicius
Copy link
Contributor

@pelwell @HiassofT Thank you, I will take a look when I have time and submit a new pull request.

popcornmix pushed a commit that referenced this issue Jan 21, 2017
popcornmix pushed a commit that referenced this issue Jan 30, 2017
popcornmix pushed a commit that referenced this issue Feb 1, 2017
popcornmix pushed a commit that referenced this issue Feb 4, 2017
Noltari pushed a commit to Noltari/linux that referenced this issue Feb 6, 2017
popcornmix pushed a commit that referenced this issue Feb 10, 2017
popcornmix pushed a commit that referenced this issue Feb 16, 2017
popcornmix pushed a commit that referenced this issue Feb 20, 2017
ED6E0F17 pushed a commit to ED6E0F17/linux that referenced this issue Feb 24, 2017
HiassofT pushed a commit to HiassofT/rpi-linux that referenced this issue Feb 24, 2017
woshihuangzhijie pushed a commit to woshihuangzhijie/linuxcode that referenced this issue Sep 20, 2017
…(#1783)"

BugLink: https://bugs.launchpad.net/bugs/1691407

This reverts commit 4897c5c2f7adb4f77d638121e9959174dff87b9c.

Signed-off-by: Phil Elwell <[email protected]>

See: raspberrypi/linux#1799

(cherry picked from commit cfd1adcb0ab42222d325ff32e3a5ce2ee1b8fa9e)
Signed-off-by: Paolo Pisati <[email protected]>
Acked-by: Colin King <[email protected]>
Acked-by: Stefan Bader <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
amichelotti pushed a commit to amichelotti/ubuntu-vme-xenial that referenced this issue Oct 19, 2017
…(#1783)"

BugLink: https://bugs.launchpad.net/bugs/1691407

This reverts commit 4897c5c2f7adb4f77d638121e9959174dff87b9c.

Signed-off-by: Phil Elwell <[email protected]>

See: raspberrypi/linux#1799

(cherry picked from commit cfd1adcb0ab42222d325ff32e3a5ce2ee1b8fa9e)
Signed-off-by: Paolo Pisati <[email protected]>
Acked-by: Colin King <[email protected]>
Acked-by: Stefan Bader <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
lianhaidong pushed a commit to lianhaidong/ubuntu-xenial that referenced this issue Nov 6, 2017
…(#1783)"

BugLink: https://bugs.launchpad.net/bugs/1691407

This reverts commit 4897c5c2f7adb4f77d638121e9959174dff87b9c.

Signed-off-by: Phil Elwell <[email protected]>

See: raspberrypi/linux#1799

(cherry picked from commit cfd1adcb0ab42222d325ff32e3a5ce2ee1b8fa9e)
Signed-off-by: Paolo Pisati <[email protected]>
Acked-by: Colin King <[email protected]>
Acked-by: Stefan Bader <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 14, 2017
…(#1783)"

BugLink: https://bugs.launchpad.net/bugs/1691407

This reverts commit 4897c5c2f7adb4f77d638121e9959174dff87b9c.

Signed-off-by: Phil Elwell <[email protected]>

See: raspberrypi/linux#1799

(cherry picked from commit cfd1adcb0ab42222d325ff32e3a5ce2ee1b8fa9e)
Signed-off-by: Paolo Pisati <[email protected]>
Acked-by: Colin King <[email protected]>
Acked-by: Stefan Bader <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
liuqun pushed a commit to liuqun/linux-raspi2 that referenced this issue Dec 20, 2017
…(#1783)"

BugLink: https://bugs.launchpad.net/bugs/1691407

This reverts commit 4897c5c2f7adb4f77d638121e9959174dff87b9c.

Signed-off-by: Phil Elwell <[email protected]>

See: raspberrypi/linux#1799

(cherry picked from commit cfd1adcb0ab42222d325ff32e3a5ce2ee1b8fa9e)
Signed-off-by: Paolo Pisati <[email protected]>
Acked-by: Colin King <[email protected]>
Acked-by: Stefan Bader <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
polceanum pushed a commit to polceanum/ubuntu-xenial that referenced this issue Feb 6, 2018
…(#1783)"

BugLink: https://bugs.launchpad.net/bugs/1691407

This reverts commit 4897c5c2f7adb4f77d638121e9959174dff87b9c.

Signed-off-by: Phil Elwell <[email protected]>

See: raspberrypi/linux#1799

(cherry picked from commit cfd1adcb0ab42222d325ff32e3a5ce2ee1b8fa9e)
Signed-off-by: Paolo Pisati <[email protected]>
Acked-by: Colin King <[email protected]>
Acked-by: Stefan Bader <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
APokorny pushed a commit to ubports/ubuntu_kernel_xenial that referenced this issue Oct 11, 2018
…(#1783)"

BugLink: https://bugs.launchpad.net/bugs/1691407

This reverts commit 4897c5c2f7adb4f77d638121e9959174dff87b9c.

Signed-off-by: Phil Elwell <[email protected]>

See: raspberrypi/linux#1799

(cherry picked from commit cfd1adcb0ab42222d325ff32e3a5ce2ee1b8fa9e)
Signed-off-by: Paolo Pisati <[email protected]>
Acked-by: Colin King <[email protected]>
Acked-by: Stefan Bader <[email protected]>
Signed-off-by: Thadeu Lima de Souza Cascardo <[email protected]>
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

No branches or pull requests

3 participants