ASoC: Intel: avs: Refactor machine-board registration
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 5 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | ASoC: Intel: avs: New board registration routinessound/ | +145 | 0 replies | |
| 2/5 | ASoC: Intel: avs: Cleanup duplicate memberssound/ sound/ | +10 | 4 replies | |
| 3/5 | ASoC: Intel: avs: Simplify dmi_match_quirk()sound/ | +3 | 0 replies | |
| 4/5 | ASoC: Intel: avs: Simplify avs_get_i2s_boards()sound/ | +10 | 0 replies | |
| 5/5 | ASoC: Intel: avs: Allow i2s test and non-test boards to coexistsound/ | +7 | 0 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Amadeusz Sławiński |
|---|---|
| 1/5 | R-b |
| 2/5 | R-b |
| 3/5 | R-b |
| 4/5 | R-b |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/5] ASoC: Intel: avs: Refactor machine-board registration
Set of patches all connected to the machine-board registration process and the board_selection.c file. Apart from LOC reduction, allows for multiple cards of the same 'type' e.g.: avs_rt5640, to be present simultanetously without any workarounds or tricks. The last patch improves debugability - helps us (the devs) deal with basic I2S-boards issues out there without forcing the user to constantly switch between debug-friendly and non-debug options.
--
Initially I wanted to have the first two patches (new implementation and the follow up cleanup) to be just one patch. However, the git diff, even with --patience does not look good, at least in my opinion. Decided to split the changes into two separate patches to make it easy to review and comment.
As the first two patches carry heaviest load, the summary:
- provide a unified avs_register_board() wrapper for platform_device_register_data(PLATFORM_DEVID_AUTO). The _AUTO is what makes every device name unique and prevents any naming conflicts to occur when matching components <-> cards in runtime
- provide avs_register_board_pdata(), a wrapper one-level above avs_register_board() that takes all custom parameters in its argument list so that the initialization of 'struct avs_mach_pdata' does not need to be repeated in every function like its done today
- make use of the two above to write simpler registration functions:
1. init any interface-type-specific values e.g.: SSP port for I2S board
2. call avs_register_board_pdata()
3. register the ASoC component with avs_register_xxx_component()
In regard to the last three patches - two are simplifications, no functional changes just LOC reduction and readability.
The last one is to improve debug-ability, especially when working in the open field - often we, the devs, find it useful when debugging production systems to run i2s_test (the debug board) without impacting the 'real' board e.g.: avs_rt5640. By default i2s_test is empty so a typical user and their scenarios are not impacted.
Cezary Rojewski (5):
ASoC: Intel: avs: New board registration routines
ASoC: Intel: avs: Cleanup duplicate members
ASoC: Intel: avs: Simplify dmi_match_quirk()
ASoC: Intel: avs: Simplify avs_get_i2s_boards()
ASoC: Intel: avs: Allow i2s test and non-test boards to coexist
sound/soc/intel/avs/avs.h | 1 - sound/soc/intel/avs/board_selection.c | 319 ++++++++++---------------- 2 files changed, 124 insertions(+), 196 deletions(-)
Signature · 1 line
2.25.1