thesofproject / linux

Linux kernel source tree
Other
91 stars 133 forks source link

Add sof_dai_get_tdm_slots() API #4983

Closed brentlu closed 6 months ago

brentlu commented 6 months ago

Machine driver sof_da7219 is using local functions to support max98373 because the slot number is different from the number in maxim-common module. To solve this, we

  1. Add an new API sof_dai_get_tdm_slots() to retrieve tdm slot number from topology in runtime.
  2. Rewrite max_98373_hw_params() function in maxim-common module to take advantage of the new tdm slot number query API.
  3. Remove the local function in sof_da7219 and use the common code in maxim-common to support max98373