audio-graph-card2 has customizing support.
This means user can re-use audio-graph-card2 DT parsing, and possible
to expand to own special handling.
This patch adds Audio Graph Card2 Customize Sample Driver.
It can re-use audio-graph-card2 parsing by calling
audio_graph2_parse_of(...), and user can expand each functions by
using hooks.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87v922lu3c.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This patch adds Codec2Codec support to audio-graph-card2.
It can use Codec2Codec but very simple case only for now.
It doesn't have "SWITCH" control yet, thus it start automatically
when it was probed, and can't stop, so far.
Thus it needs to be updated around widgets/routing handling,
and you need to understand that it is under experimental.
Codec has SND_SOC_DAPM_INPUT() (= IN) / SND_SOC_DAPM_OUTPUT(= OUT)
widgets in below case.
It is assuming 2channel, S32_LE format for now.
It needs to be updated, too.
It needs "codec2codec" node (= B), needs to have routing (= A),
need to indicate CPU side at links (= X).
ports@0 is for CPU side (= X), port@1 is Codec side (= Y).
It needs to have "rate" (= C)
+--+
| |<-- Codec0 <-- IN
| |--> Codec1 --> OUT
+--+
sound {
compatible = "audio-graph-card2";
(A) routing = "OUT" ,"DAI1 Playback",
"DAI0 Capture", "IN";
(X) links = <&c2c>;
(B) codec2codec {
ports {
(C) rate = <48000>;
(X) c2c: port@0 { c2cf_ep: endpoint { remote-endpoint = <&codec0_ep>; }; };
(Y) port@1 { c2cb_ep: endpoint { remote-endpoint = <&codec1_ep>; }; };
};
};
Codec {
ports {
port@0 {
bitclock-master;
frame-master;
codec0_ep: endpoint { remote-endpoint = <&c2cf_ep>; }; };
port@1 { codec1_ep: endpoint { remote-endpoint = <&c2cb_ep>; }; };
};
};
Link: https://lore.kernel.org/r/87k0xszlep.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/87y26ylu4a.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
audio-graph-card2 will support DPCM/Multi/Codec2Codec,
and these will use almost same DT settings which uses
ports0 and ports1.
This patch adds asoc_graph_is_ports0() which checks
port is under port0 or not.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/875yu2n8ra.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
We already have dummy-codec, dummy-platform.
But its issues are
1) we don't have dummy-cpu,
2) we can't select it via DeviceTree
3) It do nothing
Sometimes we want to have Dummy Sound Component for debugging,
for testing, for learning Framework behavior, etc, etc...
This patch adds Test-Component driver for it.
User can select CPU Component by using "test-cpu" compatible,
and can select Codec Component by using "test-codec" compatible.
It doesn't support Platform so far, but is easy to add.
We can verbose print to know its progress if user selected
xxx-verbose compatible driver.
for example,
test-cpu : silent Component, silent DAI
test-cpu-verbose-component : verbose Component, silent DAI
test-cpu-verbose-dai : silent Component, verbose DAI
test-cpu-verbose : verbose Component, verbose DAI
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Link: https://lore.kernel.org/r/877dein8rx.wl-kuninori.morimoto.gx@renesas.com
Signed-off-by: Mark Brown <broonie@kernel.org>
A little pop can be heard obviously from HP while playing a silent.
This patch fixes it by using two functions:
1. Enable HP 1bit output mode.
2. Change the charge pump switch size during playback on and off.
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Link: https://lore.kernel.org/r/20211014094054.811-1-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
There are several things the patch adding the support for 'I2S Reference'
got wrong:
- "None" selection is in fact equals to last selected reference
- The custom put overrides RX/TX len, TDM slot sizes, etc
- the enum is useless in most part for the reference tracking
- there is no need for EXT control as there is a single bit in
RT1011_TDM1_SET_1 register (bit 7) which selects the reference
- it was using ucontrol->value.integer.value[0] in the put/get callbacks
which causesed access to 'I2S Reference' enum with alsamixer to fail
Complements: c3de683c4d ("ASoC: rt1011: Fix 'I2S Reference' enum control caused error")
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20211013123300.11095-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
ChiYuan Huang <cy_huang@richtek.com>:
From: ChiYuan Huang <cy_huang@richtek.com>
This patch series Add the Richtek RT9120 support.
In v4:
- Add 'classd_tlv' for 'SPK Gain Volume' control item.
- Unify the tlv declaration to the postfix '_tlv'.
- Fix 'digital_tlv' mute as 1 to declare the minimum is muted.
In v3:
- Add dvdd regulator binding to check the dvdd voltage domain.
- Refine sdo_select_text.
- Use switch case in 'internal_power_event' function.
- Remove the volume and mute initially write in component probe.
- Remove the mute API. It's no need by HW design.
In v2:
- Add missing #sound-dai-cells property.
ChiYuan Huang (2):
ASoC: dt-bindings: rt9120: Add initial bindings
ASoC: rt9120: Add rt9210 audio amplifier support
.../devicetree/bindings/sound/richtek,rt9120.yaml | 59 +++
sound/soc/codecs/Kconfig | 10 +
sound/soc/codecs/Makefile | 2 +
sound/soc/codecs/rt9120.c | 495 +++++++++++++++++++++
4 files changed, 566 insertions(+)
create mode 100644 Documentation/devicetree/bindings/sound/richtek,rt9120.yaml
create mode 100644 sound/soc/codecs/rt9120.c
--
2.7.4
The only usage of acp5x_i2s_dai_ops is to assign its address to the ops
field in the snd_soc_dai_driver struct, which is a pointer to const.
Make it const to allow the compiler to put it in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20211012211506.21159-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
These are only assigned to the ops field in the snd_soc_dai_link struct
which is a pointer to const struct snd_soc_ops. Make them const to allow
the compiler to put them in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20211012205521.14098-1-rikard.falkeborn@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This drops the rt9210 support due to a race with a new version being
sent out for some incremental changes.
Signed-off-by: Mark Brown <broonie@kernel.org>
Access to 'I2S Reference' enum causes alsamixer to fail to load:
$ alsamixer
cannot load mixer controls: Invalid argument
cml_rt1011_rt5682 cml_rt1011_rt5682: control 2:0:0:TL I2S Reference:0: access overflow
The reason is that the original patch adding the code was using
ucontrol->value.integer.value[0]
instead the correct
ucontrol->value.enumerated.item[0]
for an ENUM control.
Fixes: 87f40af26c ("ASoC: rt1011: add i2s reference control for rt1011")
Reported-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20211011144518.2518-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The small set of cleanups against bytcr_rt5651 board file.
In v2:
- added commit message to patch 2 (Joe, Pierre)
- added cover letter (Pierre)
- added Hans to Cc list (Hans)
Andy Shevchenko (4):
ASoC: Intel: bytcr_rt5651: Get platform data via dev_get_platdata()
ASoC: Intel: bytcr_rt5651: Use temporary variable for struct device
ASoC: Intel: bytcr_rt5651: use devm_clk_get_optional() for mclk
ASoC: Intel: bytcr_rt5651: Utilize dev_err_probe() to avoid log
saturation
sound/soc/intel/boards/bytcr_rt5651.c | 118 +++++++++++---------------
1 file changed, 50 insertions(+), 68 deletions(-)
--
2.33.0
dev_err_probe() avoids printing into log when the deferred probe is invoked.
This is possible when clock provider is pending to appear.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211007170250.27997-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The devm_clk_get_optional() helper returns NULL when devm_clk_get()
returns -ENOENT. This makes things slightly cleaner. The added benefit
is mostly cosmetic.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211007170250.27997-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
dev_err_probe() avoids printing into log when the deferred probe is invoked.
This is possible when clock provider is pending to appear.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211007165715.27463-5-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
The devm_clk_get_optional() helper returns NULL when devm_clk_get()
returns -ENOENT. This makes things slightly cleaner. The added benefit
is mostly cosmetic.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211007165715.27463-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Use temporary variable for struct device to make code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211007165715.27463-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Access to platform data via dev_get_platdata() getter to make code cleaner.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Tested-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20211007165715.27463-2-andriy.shevchenko@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
We are using fch clock controller as parent mclk source for rt5682
codec. Add config to enable clock framework support for 48MHz fixed
clock when machine driver config is selected.
Signed-off-by: Ajit Kumar Pandey <AjitKumar.Pandey@amd.com>
Link: https://lore.kernel.org/r/20211011055354.67719-1-AjitKumar.Pandey@amd.com
Signed-off-by: Mark Brown <broonie@kernel.org>
In the case where the call to i2s_tdm_prepare_enable_mclk fails the
function returns before the error handling goto is executed. Fix this
by removing the return do perform the intended error handling exit.
Fixes: 081068fd64 ("ASoC: rockchip: add support for i2s-tdm controller")
Addresses-Coverity: ("Structurally dead code")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Message-Id: <20211008095430.62680-2-colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The call to rockchip_i2s_ch_to_io is only useful for its return
value which is not being used. The function call also has no
side effects, the call is effectively useless and can be removed.
Addresses-Coverity: ("Useless call")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Message-Id: <20211008095430.62680-1-colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Because clock names are modified in mediatek CCF driver, sync the updated
clock names to audsys driver.
Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Message-Id: <20211008070424.14347-1-trevor.wu@mediatek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The small set of cleanups against bytcht_es8316 board file.
In v4:
- fixed Pierre's email (Pierre)
- added Hans to the Cc list
In v3:
- actually added a Pierre's tag (Mark)
In v2:
- added tag (Pierre)
- added commit message to the patch 2 (Joe)
Andy Shevchenko (4):
ASoC: Intel: bytcht_es8316: Get platform data via dev_get_platdata()
ASoC: Intel: bytcht_es8316: Use temporary variable for struct device
ASoC: Intel: bytcht_es8316: Switch to use gpiod_get_optional()
ASoC: Intel: bytcht_es8316: Utilize dev_err_probe() to avoid log
saturation
sound/soc/intel/boards/bytcht_es8316.c | 37 +++++++++-----------------
1 file changed, 12 insertions(+), 25 deletions(-)
--
2.33.0
The fixed maximum size of IPC message does not allow for large
transfers, e.g. for filter data. Currently such messages will
be divided into smaller pieces and sent to firmware in multiple
chunks. For future IPC, this strategy is not suitable.
The maximum IPC message size is limited by host box size which
can be known when firmware is ready, so the fw_ready callback
can allocate IPC messages with platform-specific sizes instead
of the current fixed-size.
To be compatible with released firmware, current platforms will
still use SOF_IPC_MSG_MAX_SIZE. For future platforms, there will
be a new fw_ready function and the platform-specific allocation
will take place there.
Signed-off-by: Rander Wang <rander.wang@intel.com>
Reviewed-by: Bard Liao <bard.liao@intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Message-Id: <20211008093836.28210-1-peter.ujfalusi@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
dev_err_probe() avoids printing into log when the deferred probe is invoked.
This is possible when clock provider is pending to appear.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Message-Id: <20211007164523.27094-5-andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
First of all, replace indexed API by plain one since we have index 0.
Second, switch to optional variant and drop duplicated code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Message-Id: <20211007164523.27094-4-andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Use temporary variable for struct device to make code neater.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Message-Id: <20211007164523.27094-3-andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Access to platform data via dev_get_platdata() getter to make code cleaner.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Message-Id: <20211007164523.27094-2-andriy.shevchenko@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
The max98927 codec on some devices (i.e. Xiaomi Mi A2 Lite phone) requires
hardware-resetting the codec by driving a reset-gpio. This series adds
support for it through an optional reset-gpios property.
v4:
* Correctly assert/deassert the GPIO states
* Wait for the i2c port to be ready after reset
* Reset device when removed
v3:
* Fix indentation on the dev_err_probe line
v2:
* Use dev_err_probe instead of dev_err
Alejandro Tafalla (2):
ASoC: max98927: Handle reset gpio when probing i2c
dt-bindings: sound: max98927: Add reset-gpios optional property
.../devicetree/bindings/sound/max9892x.txt | 3 +++
sound/soc/codecs/max98927.c | 25 +++++++++++++++++++
sound/soc/codecs/max98927.h | 1 +
3 files changed, 29 insertions(+)
--
2.33.0
Hi,
The aim of this series is to clean up, make it easier to interpret and less
'chatty' prints aimed for debugging errors.
For example currently the DSP/IPC dump is printed every time we have an IPC
timeout and it is posible to lost the first and more indicative dump to find the
rootcause.
Regards,
Peter
---
Peter Ujfalusi (18):
ASoC: SOF: debug: Swap the dsp_dump and ipc_dump sequence for
fw_exception
ASoC: SOF: ipc and dsp dump: Add markers for better visibility
ASoC: SOF: Print the dbg_dump and ipc_dump once to reduce kernel log
noise
ASoC: SOF: loader: Print the DSP dump if boot fails
ASoC: SOF: intel: atom: No need to do a DSP dump in atom_run()
ASoC: SOF: debug/ops: Move the IPC and DSP dump functions out from the
header
ASoC: SOF: debug: Add SOF_DBG_DUMP_OPTIONAL flag for DSP dumping
ASoC: SOF: intel: hda-loader: Use snd_sof_dsp_dbg_dump() for DSP dump
ASoC: SOF: Drop SOF_DBG_DUMP_FORCE_ERR_LEVEL and sof_dev_dbg_or_err
ASoC: SOF: debug: Print out the fw_state along with the DSP dump
ASoC: SOF: ipc: Re-enable dumps after successful IPC tx
ASoC: SOF: ops: Force DSP panic dumps to be printed
ASoC: SOF: Introduce macro to set the firmware state
ASoC: SOF: intel: hda: Drop 'error' prefix from error dump functions
ASoC: SOF: core: Clean up snd_sof_get_status() prints
ASoC: SOF: loader: Drop SOF_DBG_DUMP_REGS flag when firmware start
fails
ASoC: SOF: Intel: hda-loader: Drop SOF_DBG_DUMP_REGS flag from
dbg_dump calls
ASoC: SOF: Intel: hda: Dump registers and stack when SOF_DBG_DUMP_REGS
is set
Pierre-Louis Bossart (1):
ASoC: SOF: core: debug: force all processing on primary core
sound/soc/sof/core.c | 24 ++++++-------
sound/soc/sof/debug.c | 61 ++++++++++++++++++++++++++++++--
sound/soc/sof/intel/atom.c | 5 +--
sound/soc/sof/intel/hda-loader.c | 11 +++---
sound/soc/sof/intel/hda.c | 16 +++------
sound/soc/sof/ipc.c | 10 ++++--
sound/soc/sof/loader.c | 11 ++++--
sound/soc/sof/ops.c | 3 ++
sound/soc/sof/ops.h | 12 +------
sound/soc/sof/pm.c | 6 ++--
sound/soc/sof/sof-priv.h | 31 ++++++++++------
sound/soc/sof/topology.c | 6 ++++
12 files changed, 131 insertions(+), 65 deletions(-)
--
2.33.0
Hello,
this is version 5 of the I2S/TDM driver patchset. A big thanks
to everyone who has provided their valuable feedback so far.
Changes in v5:
driver:
- change comment style of the first comment to C++ style
- make refcount non-atomic, as it's only ever used inside
a spinlock
- use newer SND_SOC_DAIFMT_CB* defines
- change ternary statements to if/else conditions
- make _clk_compensation_put return 1 if clock changed
- implement set_bclk_ratio callback
- always set half frame sync mode in TDM mode
- automatically enable mclk-calibrate mode when the clocks for
it are specified in the device tree
bindings:
- add Reviewed-by: Rob Herring
- drop rockchip,frame-width property (done by set_bclk_ratio)
- drop rockchip,fsync-half-frame property
- drop rockchip,mclk-calibrate property
dts:
- drop empty codec block from Quartz64 device tree
Changes in v4:
driver:
- factor TDE/RDE enable/disable into their own inlined functions
- add an RDE disable in a location where it looks like it was
forgotten (rxctrl else), judging by corresponding TDE code
- remove parentheses around CLK_PPM_MIN/MAX values
- wording + titlecasing in the clock compensation control
- use if statement in precious_reg instead
- refactor rockchip_i2s_io_multiplex to have the switch statements
in a function call to make the function less unwieldy
- get rid of IS_ERR checks around clk enable/disable calls where
already checked before by the probe
- reworded some error message strings
- fix potential deadlock in txrxctrl found by Sugar Zhang
using spin_lock_irqsave
- fix potential deadlock in trcm_mode found by Sugar Zhang
using spin_lock_irqsave
- use devm_platform_get_and_ioremap_resource in probe
- only set DMA things if controller has capture/playback ability.
Did not move this into init_dai because I'd then need to pass in
the res and probe it earlier in the function, and it's also used
elsewhere in the probe function
- use _get_optional_exclusive for reset controls, as some controllers
only have capture or playback capability
bindings:
- remove status = "okay" since that's the default
- change the path configs to be an enum
- rename "foo" to "bus"
- make resets optional as controller may lack either playback or
capture capability, and therefore also doesn't have a reset.
At least one reset is still required, because a controller with
no playback and no capture is not very useful
Changes in v3:
driver:
- alphabetically sort includes
- check pm_runtime_get_sync return value, act on it
- remove unnecessary initialisers in set_fmt
- use udelay(15) in retry code: 10 retries * 15 = 150, so at worst
we wait the full i2s register access delay
- fix some weird returns to return directly
- use __maybe_unused instead of #ifdef CONFIG_PM_SLEEP, also put
__maybe_unused on the runtime callbacks
- use (foo) instead of foo in header macros for precedence reasons
- when using mclk-calibrate, also turn off/on those clocks during
suspend and resume operations
- remove mclk_tx and mclk_rx reenablement code in remove
- move hclk enablement further down the probe, and disable it
on probe failure
- make reset controls mandatory, since the bindings state this too
- use _exclusive for getting the reset controls
- change reset assert/deassert delays to both be 10 usec
(thank you Sugar Zhang!)
- properly prepare and enable all mclks in probe, especially before
calling clk_get_rate on them
- if registering PCM fails, also use the cleanup error path instead of
returning directly
- bring back playback and capture only but in the way Sugar Zhang
suggested it: set those modes depending on dma-names
- rework clock enablement in general. Probe now always enables these,
instead of relying on the pm resume thing
- add myself to MAINTAINERS for this driver
dt bindings:
- fix a description still mentioning clk-trcm in the schema
- document rockchip,io-multiplex, a property that describes the
hardware as having multiplexed I2S GPIOs so direction needs to
be changed dynamically
- document rockchip,mclk-calibrate, which allows specifying
different clocks for the two sample rate bases and switch between
them as needed
- dma-names now doesn't have a set order and items can be absent to
indicate that the controller doesn't support this mode
- add myself to MAINTAINERS for these bindings
Changes in v2:
- remove ad-hoc writeq and needless (and broken) optimisation in
reset assert/deassert. This wouldn't have worked on Big Endian,
and would've been pointless on any other platform, as the
overhead for saving one write was comparatively big
- fix various checkpatch issues
- get rid of leftover clk-trcm in schema
- set status = "okay" in example in schema instead of "disabled"
- change dma-names so rx is first, adjust device trees as necessary
- properly reference uint32-array for rx-route and tx-route
instead of uint32
- replace trcm-sync with two boolean properties, adjust DT changes
accordingly and also get rid of the header file
- get rid of rockchip,no-dmaengine. This was only needed for
some downstream driver and shouldn't be in the DT
- get rid of rockchip,capture-only/playback-only. Rationale being
that I have no way to test whether they're needed, and
unconditionally setting channels_min to 0 breaks everything
- change hclk description in "clocks"
Nicolas Frattaroli (4):
ASoC: rockchip: add support for i2s-tdm controller
ASoC: dt-bindings: rockchip: add i2s-tdm bindings
arm64: dts: rockchip: add i2s1 on rk356x
arm64: dts: rockchip: add analog audio on Quartz64
.../bindings/sound/rockchip,i2s-tdm.yaml | 198 ++
MAINTAINERS | 7 +
.../boot/dts/rockchip/rk3566-quartz64-a.dts | 31 +-
arch/arm64/boot/dts/rockchip/rk356x.dtsi | 26 +
sound/soc/rockchip/Kconfig | 11 +
sound/soc/rockchip/Makefile | 2 +
sound/soc/rockchip/rockchip_i2s_tdm.c | 1848 +++++++++++++++++
sound/soc/rockchip/rockchip_i2s_tdm.h | 398 ++++
8 files changed, 2520 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/sound/rockchip,i2s-tdm.yaml
create mode 100644 sound/soc/rockchip/rockchip_i2s_tdm.c
create mode 100644 sound/soc/rockchip/rockchip_i2s_tdm.h
--
2.33.0
Recent changes in soc-pcm completely broke basic support for mixers on
Intel systems: the filters on BE states prevent the connection of a
second mixer input while the back-end is already active.
Rather than reverting the changes, which would be problematic for
Tegra systems, this patch suggests an additional filter which will
only apply to Tegra systems. This is a temporary solution which will
have to be revisited - additional issues have been reported with DPCM.
Fixes: 0c25db3f76 ('ASoC: soc-pcm: Don't reconnect an already active BE')
Suggested-by: Sameer Pujar <spujar@nvidia.com>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20211004212141.193136-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
When the system plays a sound immediately after resuming from S3,
it could hear a little pop from headphones.
It is due to the HP was unmuted before the completion of
jack re-detection finished in parallel.
This patch adds a lock to make sure the HP unmute after jack detect handler,
and adds a few depop changes.
Signed-off-by: Derek Fang <derek.fang@realtek.com>
Link: https://lore.kernel.org/r/20211007085519.12543-1-derek.fang@realtek.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This commit adds support for the rockchip i2s-tdm controller,
which enables audio output on the following rockchip SoCs:
- px30
- rk1808
- rk3308
- rk3566
- rk3568
- rv1126
This is a cleaned up version of the downstream vendor kernel's
driver. It can be enabled through the SND_SOC_ROCKCHIP_I2S_TDM
configuration option.
Signed-off-by: Nicolas Frattaroli <frattaroli.nicolas@gmail.com>
Link: https://lore.kernel.org/r/20211001171531.178775-2-frattaroli.nicolas@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This patch prepares the introduction of the compress API with SOF.
After each fragment is accepted by the DSP we need to inform
the userspace applications that they can send the next fragment.
This is done via snd_compr_fragment_elapsed.
Similar with the PCM case, in order to avoid sending an IPC before
the previous IPC is handled we need to schedule a delayed work to
call snd_compr_fragment_elapsed().
See snd_sof_pcm_period_elapsed.
To sum up this patch offers the following API to SOF code:
* snd_sof_compr_init_elapsed_work
* snd_sof_compr_fragment_elapsed
Note that implementation for compressed function is in a new file
selected via CONFIG_SND_SOC_SOF_COMPRESS invisible config option.
This option is automatically selected for platforms that support
the compress interface. For now only i.MX8 platforms support this.
For symmetry we introduce snd_sof_pcm_init_elapsed_work to setup
the work struct for PCM case.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Paul Olaru <paul.olaru@oss.nxp.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20211004152147.1268978-5-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This makes IMX use the newly introduced generic IPC ops
instead of imx specific ones, and removes the old IMX
ipc ops, as they are no longer needed.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20211004152147.1268978-4-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
This operations should be generic as there is nothing Intel
specific. This works well for NXP i.MX8 stream IPC ops.
We start by moving sof/intel/intel-ipc.c into sof/stream-ipc.c and
rename the functions to be generic.
Notice that we use newly introduced snd_sof_dsp_mailbox_read
instead of sof_mailbox_read, to make sure that we are not
bound to existing MMIO memory access, and we allow platform
to implement their own memory access routines.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Daniel Baluta <daniel.baluta@gmail.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20211004152147.1268978-3-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
We need to introduce snd_sof_mailbox_{read/write} in order to provide
a generic way for mailbox access. These routines are optional, each
platform can implement their own specific routines.
So far, all platforms use mmapped I/O thus they can use custom made
routines sof_mailbox_read / sof_mailbox_write that use MMIO.
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Bud Liviu-Alexandru <budliviu@gmail.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20211004152147.1268978-2-daniel.baluta@oss.nxp.com
Signed-off-by: Mark Brown <broonie@kernel.org>
First thing the pipelines function which have "struct device *dev" as
parameter do is:
struct snd_sof_dev *sdev = dev_get_drvdata(dev);
and in all cases the passed dev is actually coming from sdev->dev.
Skip this steps and pass directly the sdev to all pipelines related
functions as few of them already does this.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://lore.kernel.org/r/20211006111651.10027-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
When removing the topology components, do not power down
the primary core. Doing so will result in an IPC timeout
when the SOF PCI device runtime suspends.
Fixes: 0dcdf84289 ("ASoC: SOF: add a "core" parameter to widget loading functions")
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://lore.kernel.org/r/20211006104041.27183-1-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>