mbox series

[v2,00/17] ASoC: sun8i-codec: support for AIF2 and AIF3

Message ID 20201014061941.4306-1-samuel@sholland.org (mailing list archive)
Headers show
Series ASoC: sun8i-codec: support for AIF2 and AIF3 | expand

Message

Samuel Holland Oct. 14, 2020, 6:19 a.m. UTC
This series adds support the other two AIFs present in the sun8i codec,
which can be used for codec2codec DAI links.

This series first fills out the DAI driver, removing assumptions that
were made for AIF1 (16 bits, 2 channels, certain clock inversions). Some
new logic is required to handle 3 DAIs and the ADC/DAC sharing the same
clock. Finally, it adds the new DAIs, and hooks them up with DAPM
widgets and routes per the hardware topology.

To minimize the number of patches in this series, related device tree
patches (increasing #sound-dai-cells, adding new DAI links) will be sent
separately.

Changes from v1:
  - Patches 1-8 from v1 (DAPM changes) were merged
  - Prefixed AIF constants with "SUN8I_CODEC_" [1, 7, 10, 16, 17]
  - Renamed variables in sun8i_codec_set_fmt for clarity [3]
  - Update sysclk->sysclk_rate if later calls to hw_params change the
    sample rate (thanks Chen-Yu for reminding me of this) [11]
  - Select COMMON_CLK for clk_set_rate_exclusive [12]
  - Add comments and hopefully clarify the clock protection logic [12]
  - Make the error message more concise and put it on one line [12]
  - Drop the "reg" variable holding SUN8I_AIF_CLK_CTRL(dai->id) [15]
  - Rename "div_reg" to "clk_reg" and adjust comments for clarity [17]
  - Improve the AIF2/AIF3 rate mismatch error message [17]
  - Minor grammar/wording fixes in commit messages [2, 4, 7, 8, 16, 17]
  - Added Maxime's Acked-by: [1-2, 4-9, 11, 13-14, 16]

Samuel Holland (17):
  ASoC: sun8i-codec: Prepare to extend the DAI driver
  ASoC: sun8i-codec: Program DAI format before clock inversion
  ASoC: sun8i-codec: Enable all supported clock inversions
  ASoC: sun8i-codec: Use the provided word size
  ASoC: sun8i-codec: Round up the LRCK divisor
  ASoC: sun8i-codec: Correct the BCLK divisor calculation
  ASoC: sun8i-codec: Support the TDM slot binding
  ASoC: sun8i-codec: Enforce symmetric DAI parameters
  ASoC: sun8i-codec: Enable all supported sample rates
  ASoC: sun8i-codec: Automatically set the system sample rate
  ASoC: sun8i-codec: Constrain to compatible sample rates
  ASoC: sun8i-codec: Protect the clock rate while streams are open
  ASoC: sun8i-codec: Require an exact BCLK divisor match
  ASoC: sun8i-codec: Enable all supported PCM formats
  ASoC: sun8i-codec: Generalize AIF clock control
  ASoC: sun8i-codec: Add the AIF2 DAI, widgets, and routes
  ASoC: sun8i-codec: Add the AIF3 DAI, widgets, and routes

 sound/soc/sunxi/Kconfig       |   1 +
 sound/soc/sunxi/sun8i-codec.c | 834 ++++++++++++++++++++++++++++------
 2 files changed, 699 insertions(+), 136 deletions(-)

Comments

Mark Brown Oct. 26, 2020, 11:46 p.m. UTC | #1
On Wed, 14 Oct 2020 01:19:24 -0500, Samuel Holland wrote:
> This series adds support the other two AIFs present in the sun8i codec,
> which can be used for codec2codec DAI links.
> 
> This series first fills out the DAI driver, removing assumptions that
> were made for AIF1 (16 bits, 2 channels, certain clock inversions). Some
> new logic is required to handle 3 DAIs and the ADC/DAC sharing the same
> clock. Finally, it adds the new DAIs, and hooks them up with DAPM
> widgets and routes per the hardware topology.
> 
> [...]

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next

Thanks!

[01/17] ASoC: sun8i-codec: Prepare to extend the DAI driver
        commit: 7826b8d15ec2cea1c1b8680ada1eb965d0660aa6
[02/17] ASoC: sun8i-codec: Program DAI format before clock inversion
        commit: fd57ed2de5b1a5e153abf2f8c02fc3c1bf40de3b
[03/17] ASoC: sun8i-codec: Enable all supported clock inversions
        commit: c56f5f1c0b23ac0cdcf8c73bf6f7363ef0cdfbc0
[04/17] ASoC: sun8i-codec: Use the provided word size
        commit: 1abb43aeadfb513c0a16013cd445fb7dd3b285bb
[05/17] ASoC: sun8i-codec: Round up the LRCK divisor
        commit: e511aed79632e8a2dd03068f8bd11b64cb0d7170
[06/17] ASoC: sun8i-codec: Correct the BCLK divisor calculation
        commit: 68a4f2caaa17ce62890c51ef957dd008c2e42aae
[07/17] ASoC: sun8i-codec: Support the TDM slot binding
        commit: afb1a6006299a8b6b5ad04363fd74aa66a6ac79b
[08/17] ASoC: sun8i-codec: Enforce symmetric DAI parameters
        commit: e557148ac220b43bc6cbc06333f56b1c61e90825
[09/17] ASoC: sun8i-codec: Enable all supported sample rates
        commit: c2b751d769669467da1247c9c6c536a494c9c96e
[10/17] ASoC: sun8i-codec: Automatically set the system sample rate
        commit: 6c5326bebd4041a21c77b2b96461a97b7f4e39ee
[11/17] ASoC: sun8i-codec: Constrain to compatible sample rates
        commit: 15b45912341e884a16322792525db7a2b2b9a1f9
[12/17] ASoC: sun8i-codec: Protect the clock rate while streams are open
        commit: 3952ec2ac55a5afcda84270fa203f17a6309af6b
[13/17] ASoC: sun8i-codec: Require an exact BCLK divisor match
        commit: 2464dccab7fef040bd6e85cd78ac33e2731925da
[14/17] ASoC: sun8i-codec: Enable all supported PCM formats
        commit: 342cacb92d627a7cc8df1b5fe3e404530164ea17
[15/17] ASoC: sun8i-codec: Generalize AIF clock control
        commit: 7a6b937ec4e256b028be9b4e244d40287282c825
[16/17] ASoC: sun8i-codec: Add the AIF2 DAI, widgets, and routes
        commit: 50ec8422acd2cdadf5599cc046a5448770542aa7
[17/17] ASoC: sun8i-codec: Add the AIF3 DAI, widgets, and routes
        commit: 5a7f34ab0232bc50d39ac0627a470425227fed7d

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark