-
Notifications
You must be signed in to change notification settings - Fork 133
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
DA7219 machine driver update #4542
Conversation
brentlu
commented
Aug 24, 2023
•
edited
Loading
edited
- In preparation for ADL board support, I refactor the machine driver to use maxim-common module and remove redundant code. No functional change here and driver is tested on JSL board with MAX98360A amplifier.
- Add adl_mx98360_da7219 board config to support DA7219 on ADL boards; tested on ADL-N chromebook
Could we merge this PR? Thanks. |
Can you revisit the checkpatch warnings @brentlu?
|
1c225ea
to
02588d3
Compare
|
|
rebase to see if it could pass the build test... |
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 think this can be improved a bit @brentlu
It's not all bad but you are doing things differently to the other recent PRs so the code is a bit inconsistent in the directions.
sound/soc/intel/boards/sof_da7219.c
Outdated
* frequency of MCLK to 12.288 or 24.576MHz on topology side. | ||
*/ | ||
if (board_quirk & SOF_DA7219_PLL_BYPASS) | ||
ctx->pll_bypass = 1; |
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.
why is this needed? What not just test the MCLK and automatically bypass the PLL if it's 12.228 or a multiple?
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.
oh I can do it in codec init. let me upload a new version.
14f5f49
to
979be74
Compare
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.
only nit-picks from me...
sound/soc/intel/boards/Kconfig
Outdated
depends on SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC | ||
select SND_SOC_INTEL_HDA_DSP_COMMON | ||
depends on ((SND_HDA_CODEC_HDMI && SND_SOC_SOF_HDA_AUDIO_CODEC) &&\ | ||
(MFD_INTEL_LPSS || COMPILE_TEST)) |
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 would keep the initial code
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.
fixed
sound/soc/intel/boards/Kconfig
Outdated
select SND_SOC_MAX98373_I2C | ||
select SND_SOC_DMIC | ||
select SND_SOC_INTEL_HDA_DSP_COMMON |
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.
this is already in the initial code,
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.
restored
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.
lost on the last patch, sorry
sound/soc/intel/boards/sof_da7219.c
Outdated
}, | ||
{ | ||
.name = "adl_mx98360_da7219", | ||
.driver_data = (kernel_ulong_t)(SOF_MAX98360A_SPEAKER_AMP_PRESENT), | ||
.driver_data = (kernel_ulong_t)(0), |
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.
so do we need this quirk at all then?
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.
No quirk is needed for this board config now.
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.
what happens if we just don't add .driver_data and add a comment to that effect?
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.
unsigned long board_quirk = 0;
...
if (pdev->id_entry && pdev->id_entry->driver_data)
board_quirk = (unsigned long)pdev->id_entry->driver_data;
Since driver_data is zero (NULL), board_quirk will be the init value 0. It's working good on my ADL board.
The last patch just remove two quirks flags of amplifier type from board configs. No functional change there. |
a25c47b
to
4845f07
Compare
rebase needed @brentlu |
4845f07
to
db3eca8
Compare
conflict in acpi enumeration table, resolved |
@bardliao I'll let you merge this. |
Rename the driver file and kernel option to be consistent with other SOF machine drivers. Signed-off-by: Brent Lu <[email protected]>
Use maxim-common module to handle speaker amp DAI link registration. No functional change in this commit. Signed-off-by: Brent Lu <[email protected]>
This configuration supports ADL boards which implement DA7219 on SSP0 and MAX98360A on SSP1. DA7219 uses PLL bypass mode to avoid WCLK locking problem. To use this mode, MCLK frequency must be 12.288 or 24.576MHz. Signed-off-by: Brent Lu <[email protected]>
Use ssp-common module to detect codec and amplifier type in driver probe function and remove all quirks about amplifier type. Signed-off-by: Brent Lu <[email protected]>