[00/15] Report jack and button detection + Capture Support
mbox series

Message ID 20210302170454.39679-1-tanureal@opensource.cirrus.com
Headers show
Series
  • Report jack and button detection + Capture Support
Related show

Message

Lucas Tanure March 2, 2021, 5:04 p.m. UTC
Hi All,

Here is a patch series for reporting to user space jack and button events and
add the support for Capture. With some cleanups and fixes along the way.

Regards,

Lucas Tanure

Lucas Tanure (12):
  ASoC: cs42l42: Don't enable/disable regulator at Bias Level
  ASoC: cs42l42: Always wait at least 3ms after reset
  ASoC: cs42l42: Remove power if the driver is being removed
  ASoC: cs42l42: Disable regulators if probe fails
  ASoC: cs42l42: Fix Bitclock polarity inversion
  ASoC: cs42l42: Provide finer control on playback path
  ASoC: cs42l42: Set clock source for both ways of stream
  ASoC: cs42l42: Fix channel width support
  ASoC: cs42l42: Add Capture Support
  ASoC: cs42l42: Report jack and button detection
  ASoC: cs42l42: Use bclk from hw_params if set_sysclk was not called
  ASoC: cs42l42: Fix mixer volume control

Richard Fitzgerald (3):
  ASoC: cs42l42: Wait at least 150us after writing SCLK_PRESENT
  ASoC: cs42l42: Only start PLL if it is needed
  ASoC: cs42l42: Wait for PLL to lock before switching to it

 sound/soc/codecs/cs42l42.c | 497 +++++++++++++++++++++----------------
 sound/soc/codecs/cs42l42.h |  42 +++-
 2 files changed, 317 insertions(+), 222 deletions(-)

--
2.30.1

Comments

Mark Brown March 2, 2021, 5:20 p.m. UTC | #1
On Tue, Mar 02, 2021 at 05:04:47PM +0000, Lucas Tanure wrote:
> Remove the hard coded 32 bits width and replace with the correct width
> calculated by params_width.

Again, fixes should go at the start of the series before any cleanups or
anything so they can be merged independently.
Mark Brown March 2, 2021, 5:29 p.m. UTC | #2
On Tue, Mar 02, 2021 at 05:04:49PM +0000, Lucas Tanure wrote:

> Report the Jack events to the user space through ALSA.
> Also moves request_threaded_irq() to component_probe so it don't get
> interrupts before the initialization the struct snd_soc_jack.

This looks like it should be split into two changes too, one for the
code motion and one for the jack API.  However I'm not convinced it's a
good idea to move the interrupt requesting to the component
registration, in general we should be doing resource acquisition in the
main probe function so things like deferred probe work well - it gets
messy if we try to handle stuff like that in component registration.

I'd have expected the interrupt handling to just be able to check if
there's a jack set, and note that snd_soc_jack_report() supports being
called with a NULL jack anyway.
Mark Brown March 2, 2021, 5:30 p.m. UTC | #3
On Tue, Mar 02, 2021 at 05:04:51PM +0000, Lucas Tanure wrote:

> Signed-off-by: Richard Fitzgerald <rf@opensource.cirrus.com>
> ---

You've not provided a Signed-off-by for this so I can't do anything with
it, please see Documentation/process/submitting-patches.rst for details
on what this is and why it's important.
Mark Brown March 2, 2021, 5:30 p.m. UTC | #4
On Tue, Mar 02, 2021 at 05:04:54PM +0000, Lucas Tanure wrote:
> The minimum value is 0x3f (-63dB), which also is mute

Fixes at the start of the series please.