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

Add driver for Wolfson / Cirrus Logic audio card #1810

Merged
merged 5 commits into from Feb 7, 2017

Conversation

HiassofT
Copy link
Contributor

I rewrote the original Wolfson / Cirrus driver almost from scratch, fixing a lot of bugs and adding several new features like setting / reading the AES channel status bits and most importantly removing the need to hack up upstream codec drivers.

The card needs regulator support enabled in the kernel, because the WM5102 chip's DCVDD input is supplied by an on-chip LDO. I've added the necessary configuration and DT changes as separate commits.

The original PR by Cirrus against kernel 3.12 hadn't set CONFIG_REGULATOR_DUMMY which caused several other soundcard drivers to break. Since kernel 3.13 this is implicitly set when enabling CONFIG_REGULATOR and the regulator framework will automatically add in dummy regulators if no regulators are specified in DT - in other words, devices with mandatory regulator properties in DT won't break if these properties aren't set.

Although the "Consolidate audio card overlays" commit isn't strictly needed I think it's a good idea to clean up the existing overlays and properly set the missing properties.

Several details of how to best expose the onboard 3.3V and 5V rails in DT have been discussed before in #1756, the regulator commits in this PR are identical to the ones in #1756.

Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
Reference 3.3V / 5V system rails instead of instantiating local
regulators.

Add missing power supply properties for codecs where these are
required according to the DT bindings docs.

Signed-off-by: Matthias Reichl <hias@horus.com>
Note: due to problems with deferred probing of regulators
the following softdep should be added to a modprobe.d file

softdep arizona-spi pre: arizona-ldo1

Signed-off-by: Matthias Reichl <hias@horus.com>
Signed-off-by: Matthias Reichl <hias@horus.com>
@popcornmix
Copy link
Collaborator

Well it's a lot cleaner that the first wolfson patch I saw.
I only have a slight reservation about enabling regulator support but I assume the issues we had in the past are resolved by the DT updates.

@pelwell any comments?

@pelwell
Copy link
Contributor

pelwell commented Feb 6, 2017

Provided scamming regulator support causes no problems (and I guess we won't know until we try) I'm happy with this commit. It will open the way for a few other codecs.

@popcornmix
Copy link
Collaborator

Lets get this in and see what is reported in Milhouse builds.

@popcornmix popcornmix merged commit a5204ea into raspberrypi:rpi-4.9.y Feb 7, 2017
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Feb 10, 2017
kernel: Add driver for Wolfson / Cirrus Logic audio card
See: raspberrypi/linux#1810

kernel: irq-bcm2836: Avoid Invalid trigger warning
kernel: sound: Demote deferral errors to INFO level
kernel: sound: Suppress error message about deferrals
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request Feb 10, 2017
kernel: Add driver for Wolfson / Cirrus Logic audio card
See: raspberrypi/linux#1810

kernel: irq-bcm2836: Avoid Invalid trigger warning
kernel: sound: Demote deferral errors to INFO level
kernel: sound: Suppress error message about deferrals
@cfstras
Copy link

cfstras commented Mar 6, 2017

Thanks for doing this!
As I couldn't find the information anywhere: when is this 4.9 kernel scheduled to appear in the Raspbian package repositories?

@pelwell
Copy link
Contributor

pelwell commented Mar 6, 2017

Once we're happy it doesn't break things. There's been an issue with I2C and SPI clocks that should be resolved with the next kernel build, then we'll take stock.

@cfstras
Copy link

cfstras commented Mar 6, 2017

Okay, great. Is there a central place for release notes, or an easy way to read the changelogs for new packages?
👍 for all of your work!

@pelwell
Copy link
Contributor

pelwell commented Mar 6, 2017

They aren't collated, but the commit messages in the linux and firmware repos are there to be read. Don't expect many differences in Raspbian - we don't like changing too much at once.

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.

None yet

4 participants