-
Notifications
You must be signed in to change notification settings - Fork 140
Support Cirrus Logic CS42L42 headphone codec #2884
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
Conversation
|
The topology is here: thesofproject/sof#4121 |
plbossart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @brentlu it's quite good but see below a couple of suggested improvements to remove copy-paste and improve code.
I think you are missing the sound/soc/intel/common/soc-acpi..glk-match.c, this would be needed to load the machine driver.
Move max98357a code to this common module so it could be shared between multiple SOF machine drivers. Signed-off-by: Brent Lu <brent.lu@intel.com>
4d62b0e to
ba0d2dd
Compare
lyakh
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some minor cosmetic improvement suggestions
plbossart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks @brentlu, nice work.
|
I had to manually approve @brentlu so let's wait until we see the GitHub Actions results + another approved to merge |
plbossart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have to take my approval back after looking at the topology.
It's simpler if we have first the SSP links added, then dmic and HDMI last. The topology changes [1] can be simplified a lot by using the same order as for DA7219.
[1] thesofproject/sof@ef0ebaf#diff-ef984278da4b010127ccd588daa6d53c55bff7a852c2ef42f7b39a82d4bd3951R195
|
Adjust the DAI Link sequence in sof_card_dai_links_create() function to follow the order: SPK, HEADPHONE, DMIC, HDMI |
|
restarting SOF CI tests since we are missing the configuration for the new machine driver |
|
SOFCI TEST |
plbossart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@brentlu I added the missing config and CI reports errors with make W=1 and also checkpatch.pl --strict has quite a few warnings. Nothing critical but let's make this PR shiny for upstream. Thanks!
bardliao
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks quite good to me, just some minor comments.
|
warnings from checkpatch are fixed |
|
False alarm? Commit 429ffb620dcd ("ASoC: Intel: add sof-cs42l42 machine driver")WARNING: added, moved or deleted file(s), does MAINTAINERS need updating? total: 0 errors, 1 warnings, 0 checks, 570 lines checked NOTE: For some of the reported defects, checkpatch may be able to Commit 429ffb620dcd ("ASoC: Intel: add sof-cs42l42 machine driver") has style problems, please review. |
|
@plbossart If there is no concern, I'd like to send the patches to alsa-dev due to the tight schedule. Is it ok? |
yes, that's normal and not a problem. |
let me check with Mark Brown, there's a missing dependency upstream, some previous patches were not applied, and if you send the patches they will not apply directly. thanks! |
|
still a make W=1 issue @brentlu . You can fix this in your setup by running 'make sound/soc/codecs/ W=1' (the last / matters). Thanks! |
ok, so I need to resend the previous series which was partly missed for some reason, and I'll include your PR on top once all the warnings are removed. Does this work for you @brentlu? Thanks! |
|
The warning is from the codec header file which we don't need it. I've removed it from machine driver and send a mail to Cirrus team to fix it. |
|
Thanks. I think it's the best option. |
plbossart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, one more fix needed, the code was inspired by an earlier version of sof-rt5682 but the .nonatomic property is not needed.
The machine driver is a generic machine driver for SOF with cs42l42 I2C codec. It currently supports Maxim MAX98357A speker amp on GLK but is extensible for other apms and platforms. Signed-off-by: Brent Lu <brent.lu@intel.com>
Refactor the machine driver by using the common code in maxim-common module to support max98357a. Signed-off-by: Brent Lu <brent.lu@intel.com>
plbossart
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's merge, thanks @brentlu
|
I'll use my superpowers to merge and avoid more delays |
It's a series to: