| 8dd595bc | 11-Jul-2026 |
Hector Martin <marcan@marcan.st> |
ASoC: apple: mca: Add delay after configuring clock
Right after the early FE setup, ADMAC gets told to start the DMA. This can end up in a weird "slip" state with the channels transposed. Waiting a
ASoC: apple: mca: Add delay after configuring clock
Right after the early FE setup, ADMAC gets told to start the DMA. This can end up in a weird "slip" state with the channels transposed. Waiting a bit fixes this; presumably this allows the clock to stabilize.
Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-7-2994d87c2f24@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 889c26cf | 11-Jul-2026 |
Hector Martin <marcan@marcan.st> |
ASoC: apple: mca: Do not mark clocks in use for non-providers
On the speakers PCM, this sequence:
1. Open playback 2. Open sense 3. Close playback 4. Close sense
would result in the sense FE being
ASoC: apple: mca: Do not mark clocks in use for non-providers
On the speakers PCM, this sequence:
1. Open playback 2. Open sense 3. Close playback 4. Close sense
would result in the sense FE being marked as clocks in use at (2), since there is a clock provider (playback FE). Then at (4) this would WARN since there is no driver any more when closing the in use clocks.
If (1) and (2) are reversed this does not happen, since the sense PCM is not marked as using the clocks when there is no provider yet. So, check explicitly whether the substream FE is a clock provider in be_prepare, and skip everything if it isn't.
Signed-off-by: Hector Martin <marcan@marcan.st> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-6-2994d87c2f24@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 108a14b2 | 11-Jul-2026 |
Martin Povišer <povik+lin@cutebit.org> |
ASoC: apple: mca: Support capture on multiples BEs
When multiple BEs are linked to a FE, the former behavior was to source the data line from the DIN pin of the first BE only. Change this to ORing t
ASoC: apple: mca: Support capture on multiples BEs
When multiple BEs are linked to a FE, the former behavior was to source the data line from the DIN pin of the first BE only. Change this to ORing the DIN inputs of all linked BEs.
As long as the unused slots on each BE's line are zeroed out and the slots on the BEs don't overlap, this will work out well.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-5-2994d87c2f24@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 00309bfb | 11-Jul-2026 |
Martin Povišer <povik+lin@cutebit.org> |
ASoC: apple: mca: Support FEs being clock consumers
Support FEs being I2S clock consumers. This does not mean we support accepting clocks from outside the SoC (although it paves the way for that sup
ASoC: apple: mca: Support FEs being clock consumers
Support FEs being I2S clock consumers. This does not mean we support accepting clocks from outside the SoC (although it paves the way for that support in the future), but it means multiple FEs can attach to one BE, one being clock producer and the rest clock consumers.
This is useful for grabbing I/V sense data on some machines, since in such a scenario the format of the sense data on the I2S bus differs from that of the audio data (the two formats differing in slot width). With two FEs attached to the bus, we can split the responsibilities and command different slot widths to the two.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-4-2994d87c2f24@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 2aab6230 | 11-Jul-2026 |
Martin Povišer <povik+lin@cutebit.org> |
ASoC: apple: mca: Factor out mca_be_get_fe
This is a function that we also want to use from within mca_be_shutdown, so factor it out.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Signed-of
ASoC: apple: mca: Factor out mca_be_get_fe
This is a function that we also want to use from within mca_be_shutdown, so factor it out.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-3-2994d87c2f24@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| 108d4b65 | 11-Jul-2026 |
Martin Povišer <povik+lin@cutebit.org> |
ASoC: apple: mca: Separate data & clock port setup
Up until now FEs were always the clock providers -- feeding the clocks on any ports (BEs) they are attached to. This will soon change and FEs will
ASoC: apple: mca: Separate data & clock port setup
Up until now FEs were always the clock providers -- feeding the clocks on any ports (BEs) they are attached to. This will soon change and FEs will be allowed to be clock consumers. Once that happens, the routing of clocks and data will to some degree decouple.
In advance of the change, make preparations:
* Narrow down semantics of what was formerly the 'port_driver' field to refer to clocks only.
* On 'startup' of BEs, separate the clock and data aspects of the port setup.
Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Signed-off-by: James Calligeros <jcalligeros99@gmail.com> Link: https://patch.msgid.link/20260711-apple-audio-redux-v4-2-2994d87c2f24@gmail.com Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| fb1847cc | 24-Feb-2023 |
Martin Povišer <povik+lin@cutebit.org> |
ASoC: apple: mca: Improve handling of unavailable DMA channels
When we fail to obtain a DMA channel, don't return a blanket -EINVAL, instead return the original error code if there's one. This makes
ASoC: apple: mca: Improve handling of unavailable DMA channels
When we fail to obtain a DMA channel, don't return a blanket -EINVAL, instead return the original error code if there's one. This makes deferring work as it should. Also don't print an error message for -EPROBE_DEFER.
Fixes: 4ec8179c212f ("ASoC: apple: mca: Postpone requesting of DMA channels") Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20230224153302.45365-3-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| d8b3e396 | 24-Feb-2023 |
Martin Povišer <povik+lin@cutebit.org> |
ASoC: apple: mca: Fix SERDES reset sequence
Fix the reset sequence of reads and writes that we invoke from within the early trigger. It looks like there never was a SERDES_CONF_SOME_RST bit that sho
ASoC: apple: mca: Fix SERDES reset sequence
Fix the reset sequence of reads and writes that we invoke from within the early trigger. It looks like there never was a SERDES_CONF_SOME_RST bit that should be involved in the reset sequence, and its presence in the driver code is a mistake from earlier.
Instead, the reset sequence should go as follows: We should switch the the SERDES unit's SYNC_SEL mux to the value of 7 (so outside the range of 1...6 representing cluster's SYNCGEN units), then raise the RST bit in SERDES_STATUS and wait for it to clear.
Properly resetting the SERDES unit fixes frame desynchronization hazard in case of long frames (longer than 4 used slots). The desynchronization manifests itself by rotating the PCM channels.
Fixes: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver") Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20230224153302.45365-2-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|
| db6ae79a | 27-Sep-2022 |
Martin Povišer <povik+lin@cutebit.org> |
ASoC: apple: mca: Adjust timing of component unregister
On removal of the driver, the ASoC component should be unregistered first, before we start releasing any of the other resources.
Fixes: 3df5d
ASoC: apple: mca: Adjust timing of component unregister
On removal of the driver, the ASoC component should be unregistered first, before we start releasing any of the other resources.
Fixes: 3df5d0d97289 ("ASoC: apple: mca: Start new platform driver") Signed-off-by: Martin Povišer <povik+lin@cutebit.org> Link: https://lore.kernel.org/r/20220927113426.49724-3-povik+lin@cutebit.org Signed-off-by: Mark Brown <broonie@kernel.org>
show more ...
|