Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
c39b8ae
soundwire: sdw_slave: add new fields to track probe status
plbossart Oct 9, 2019
f7529c5
soundwire: add enumeration_complete structure
plbossart Sep 26, 2019
5de3583
soundwire: intel: update interfaces between ASoC and SoundWire
plbossart Oct 23, 2019
f1bffd7
soundwire: intel: update stream callbacks for hwparams/free stream op…
RanderWang Aug 19, 2019
731e8fb
soundwire: intel: fix PDI/stream mapping for Bulk
plbossart Sep 17, 2019
8ab4798
soundwire: slave: fix scanf format
plbossart Sep 17, 2019
8665626
soundwire: remove bitfield for unique_id, use u8
plbossart Oct 21, 2019
ee5ef54
soundwire: slave: add helper to extract slave ID
plbossart Oct 21, 2019
4e22841
soundwire: ignore uniqueID when irrelevant
plbossart Oct 21, 2019
98059c5
soundwire: intel/cadence: fix startup sequence
plbossart May 31, 2019
1d9b26c
soundwire: cadence_master: add hw_reset capability in debugfs
plbossart Jul 23, 2019
593423a
soundwire: intel: add helper for initialization
plbossart Jul 22, 2019
8edcdbe
soundwire: intel/cadence: add flag for interrupt enable
plbossart Sep 12, 2019
44a76b7
soundwire: cadence_master: make clock stop exit configurable on init
plbossart Jul 24, 2019
c910107
soundwire: renames to prepare support for master drivers/devices
plbossart Sep 10, 2019
ed9dc57
soundwire: rename dev_to_sdw_dev macro
plbossart Sep 11, 2019
951b6e4
soundwire: rename drv_to_sdw_slave_driver macro
plbossart Sep 11, 2019
df8865b
soundwire: bus_type: rename sdw_drv_ to sdw_slave_drv
plbossart Sep 11, 2019
625aa17
soundwire: intel: rename res field as link_res
plbossart Sep 11, 2019
6e8f637
soundwire: add support for sdw_slave_type
plbossart Sep 11, 2019
e2dad35
soundwire: add initial definitions for sdw_master_device
plbossart Sep 11, 2019
fbc06e1
soundwire: intel: remove platform devices and provide new interface
plbossart Oct 23, 2019
494ba37
soundwire: add device driver to sdw_md_driver
bardliao Sep 12, 2019
093112c
soundwire: intel: add prepare support in sdw dai driver
RanderWang Aug 19, 2019
521de03
soundwire: intel: add trigger support in sdw dai driver
RanderWang Aug 19, 2019
1560a93
soundwire: intel: add sdw_stream_setup helper for .startup callback
RanderWang Aug 19, 2019
b938d47
soundwire: intel: free all resources on hw_free()
plbossart Oct 23, 2019
39d1bae
soundwire: intel_init: add implementation of sdw_intel_enable_irq()
plbossart Oct 23, 2019
82714a2
soundwire: intel/cadence: fix timeouts in MSI mode
bardliao Sep 24, 2019
7c3474d
soundwire: fix race between driver probe and update_status callback
plbossart Aug 2, 2019
7961b4e
soundwire: bus: add PM/no-PM versions of read/write functions
plbossart Jun 11, 2019
8faf688
soundwire: bus: write Slave Device Number without runtime_pm
plbossart Sep 26, 2019
d8a308e
soundwire: intel: add helpers for link power down and shim wake
plbossart Sep 20, 2019
ba3014b
soundwire: intel: Add basic power management support
plbossart Sep 20, 2019
11b62e8
soundwire: intel: add pm_runtime support
plbossart Sep 20, 2019
71962b0
soundwire: intel: reset pm_runtime status during system resume
plbossart Oct 11, 2019
42a3995
soundwire: bus: add helper to reset Slave status to UNATTACHED
plbossart Sep 26, 2019
eb9b363
soundwire: intel: call helper to reset Slave states on resume
plbossart Sep 26, 2019
0bf814c
soundwire: bus: check first if Slaves become UNATTACHED
plbossart Sep 26, 2019
e70f099
soundwire: add enumeration_complete signaling
plbossart Sep 26, 2019
80166e6
soundwire: intel: disable pm_runtime when removing a master
plbossart Oct 9, 2019
41ccbca
soundwire: bus: disable pm_runtime in sdw_slave_delete
plbossart Oct 9, 2019
03696a4
soundwire: stream: update state machine and add state checks
plbossart Oct 12, 2019
8a105af
soundwire: stream: only prepare stream when it is configured.
bardliao Sep 20, 2019
ce7e716
soundwire: stream: do not update parameters during DISABLED-PREPARED …
plbossart Oct 15, 2019
2f05064
soundwire: intel: reinitialize IP+DSP in .prepare()
bardliao Oct 14, 2019
4dfbe22
[HACK] add traces to debug aplay suspend/resume issue
plbossart Oct 12, 2019
73031fe
soundwire: intel: update logs when Master is disabled
plbossart Oct 24, 2019
adf0a65
soundwire: intel: pm_runtime idle scheduling
plbossart Oct 24, 2019
fb1a6a0
ASoC: SOF: Intel: add SoundWire configuration interface
plbossart Sep 11, 2019
a6af656
ASoC: SOF: IPC: dai-intel: move ALH declarations in header file
plbossart Aug 16, 2019
869c4fb
ASoC: SOF: Intel: hda: add SoundWire stream config/free callbacks
plbossart Jun 26, 2019
f236db0
ASoC: SOF: Intel: hda: initial SoundWire machine driver autodetect
plbossart Sep 12, 2019
3c23326
ASoC: SOF: Intel: hda: disable SoundWire interrupts on suspend
plbossart Sep 24, 2019
cbe7435
ASoC: SOF: Intel: add build support for SoundWire
plbossart Sep 4, 2019
153425f
ASoC: SOF: Intel: hda-ctrl: add reset cycle before parsing capabilities
plbossart Oct 21, 2019
ded823d
ASoC: codecs: rt700: add Soundwire support
shumingfan Apr 18, 2018
cf38a7d
ASoC: codecs: rt1308: add SoundWire support
shumingfan Aug 2, 2019
d66ef04
ASoC: codecs: rt711: add SoundWire support
shumingfan Aug 15, 2019
8d13b8a
ASoC: codecs: rt715: add SoundWire support
Aug 21, 2019
ad55d2f
ASoC: codecs: Add DEBUG to Makefile
plbossart Apr 18, 2019
621870b
ASoC: codecs: rt715: rt715_sdw_regmap can be static
intel-lab-lkp Oct 18, 2019
1fec317
ASoC: rt711: changes 32bits address mapping of index defined register…
shumingfan Oct 23, 2019
f2b349b
ASoC: rt700: changes 32bits address mapping of index defined register…
shumingfan Oct 23, 2019
f21a641
ASoC: rt1308-sdw: fix some coding style
shumingfan Oct 23, 2019
706b9ff
Resume correct register setting for dmic recording after suspend.
Oct 24, 2019
37d2126
ASoC: rt711: add JD2 configuration
shumingfan Oct 24, 2019
ff014f0
ASoC: codec:rt715-sdw:Modify register mapping of index from 32bits to…
Oct 25, 2019
bc6b0eb
ASoC: Intel: boards: add sdw_rt700 machine driver
plbossart Apr 11, 2019
c9322fc
ASoC: Intel: boards: add sdw_rt711_rt1308_rt715 3-in-1 config support
plbossart Aug 26, 2019
3647b59
ASoC: Intel: common: soc-acpi: declare new tables for SoundWire
plbossart Aug 24, 2019
50e85ea
ASoC: Intel: common: add match tables for ICL w/ SoundWire
bardliao Jun 20, 2019
fc622e7
ASoC: Intel: common: add match tables for CML w/ SoundWire
RanderWang Jul 22, 2019
9b1306e
ASoC: Intel: common: add match tables for TGL w/ SoundWire
plbossart Sep 4, 2019
3e146c9
ASoC: SOF: Intel: reference SoundWire machine lists
plbossart Sep 4, 2019
8d7d3f6
NOT FOR UPSTREAM: Add debug for boards
plbossart Jun 24, 2019
d35619a
[HACK] TGL table with rt711 only
plbossart Sep 13, 2019
4f2d1f0
ASoC: Intel: sdw_rt711: add machine driver
plbossart Sep 17, 2019
534f60d
ASoC: Intel: boards: fix to check board name from dmi
fredoh9 Oct 2, 2019
9bb3fc1
ASoC: codecs: sdw_rt700.c: add missing pm ops
plbossart Oct 12, 2019
14da1ff
ASoC: codecs: sdw_rt711.c: add missing pm ops
plbossart Oct 12, 2019
c22d956
ASoC: codecs: sdw_rt711_rt1308_rt715.c: add missing pm ops
plbossart Oct 12, 2019
805b2d3
ASoC: Intel: boards: SoundWire rt711 + I2S RT1308 configuration
plbossart Sep 25, 2019
20f0b6c
ASoC: Intel: soc-acpi: update TGL RVP configuration
plbossart Sep 25, 2019
d2e5119
ASoC: intel: sdw_rt711_rt1308_rt715: add HDMI jack control support
bardliao Oct 22, 2019
95974ca
ASoC: Intel: sdw_rt711_rt1308_rt715: remove unique ID
plbossart Oct 21, 2019
73705aa
[HACK] ASoC: Intel: sdw_rt711_rt1308_rt715: disable RT1308_SDW2
plbossart Oct 21, 2019
6c5f431
ASoC: Intel: sdw_rt700: remove uniqueID
plbossart Oct 22, 2019
56d0709
ASoC: Intel: sdw_rt711: remove uniqueID
plbossart Oct 22, 2019
d5e480e
ASoC: Intel: sdw_rt711_i2s_rt1308: remove uniqueID
plbossart Oct 22, 2019
a137de0
ASoC: intel: soc-acpi-intel-cnl-match: add acpi match for mask B
bardliao Oct 18, 2019
6b66292
soundwire: cadence_master: handle multiple status reports per Slave
plbossart Jun 11, 2019
68084cf
soundwire: Add generic bandwidth allocation algorithm
plbossart Apr 24, 2018
41c0b0c
soundwire: dynamic_allocation: set grp_ctrl_valid false
bardliao Aug 2, 2019
515eadf
soundwire: bus: fix device number leak on errors
plbossart Jul 30, 2019
74cde25
soundwire: intel: modify DMAT field for ALH
bardliao Aug 19, 2019
a45c72b
soundwire: intel: fix factor of two in MCLK handling
bardliao Aug 19, 2019
574ab15
soundwire: cadence_master: log register write info
plbossart Jun 26, 2019
f28401e
add more traces to bus code
plbossart Jun 11, 2019
a82e42f
add traces for bus
plbossart Aug 1, 2019
bdac758
[HACK] soundwire: add dynamic DEBUG in makefile
plbossart Sep 12, 2019
d1c9825
Merge remote-tracking branch 'sof/integration/soundwire-interfaces' i…
plbossart Oct 25, 2019
1070669
Merge remote-tracking branch 'sof/integration/soundwire-intel' into i…
plbossart Oct 25, 2019
7c1449a
Merge remote-tracking branch 'sof/integration/soundwire-sof' into int…
plbossart Oct 25, 2019
10ae0ef
Merge remote-tracking branch 'sof/integration/realtek-sdw-codecs' int…
plbossart Oct 25, 2019
5c1b497
Merge remote-tracking branch 'sof/integration/soundwire-machine-drive…
plbossart Oct 25, 2019
661d261
Merge remote-tracking branch 'sof/integration/soundwire-debug-fixes' …
plbossart Oct 25, 2019
726a19a
soundwire: complete enumeration_complete after sdw_initialize_slave
bardliao Oct 25, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 45 additions & 18 deletions Documentation/driver-api/soundwire/stream.rst
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,27 @@ Below shows the SoundWire stream states and state transition diagram. ::
+-----------+ +------------+ +----------+ +----------+
| ALLOCATED +---->| CONFIGURED +---->| PREPARED +---->| ENABLED |
| STATE | | STATE | | STATE | | STATE |
+-----------+ +------------+ +----------+ +----+-----+
^
|
|
v
+----------+ +------------+ +----+-----+
+-----------+ +------------+ +---+--+---+ +----+-----+
^ ^ ^
| | |
__| |___________ |
| | |
v | v
+----------+ +-----+------+ +-+--+-----+
| RELEASED |<----------+ DEPREPARED |<-------+ DISABLED |
| STATE | | STATE | | STATE |
+----------+ +------------+ +----------+

NOTE: State transition between prepare and deprepare is supported in Spec
but not in the software (subsystem)
NOTE: State transitions between ``SDW_STREAM_ENABLED`` and
``SDW_STREAM_DISABLED`` are only relevant when then INFO_PAUSE flag is
supported at the ALSA/ASoC level. Likewise the transition between
``SDW_DISABLED_STATE`` and ``SDW_PREPARED_STATE`` depends on the
INFO_RESUME flag.

NOTE2: Stream state transition checks need to be handled by caller
framework, for example ALSA/ASoC. No checks for stream transition exist in
SoundWire subsystem.
NOTE2: The framework implements basic state transition checks, but
does not e.g. check if a transition from DISABLED to ENABLED is valid
on a specific platform. Such tests need to be added at the ALSA/ASoC
level.

Stream State Operations
-----------------------
Expand Down Expand Up @@ -246,6 +251,9 @@ SDW_STREAM_PREPARED

Prepare state of stream. Operations performed before entering in this state:

(0) Steps 1 and 2 are omitted in the case of a resume operation,
where the bus bandwidth is known.

(1) Bus parameters such as bandwidth, frame shape, clock frequency,
are computed based on current stream as well as already active
stream(s) on Bus. Re-computation is required to accommodate current
Expand All @@ -270,13 +278,15 @@ Prepare state of stream. Operations performed before entering in this state:
After all above operations are successful, stream state is set to
``SDW_STREAM_PREPARED``.

Bus implements below API for PREPARE state which needs to be called once per
stream. From ASoC DPCM framework, this stream state is linked to
.prepare() operation.
Bus implements below API for PREPARE state which needs to be called
once per stream. From ASoC DPCM framework, this stream state is linked
to .prepare() operation. Since the .trigger() operations may not
follow the .prepare(), a direct transitions from
``SDW_STREAM_PREPARED`` to ``SDW_STREAM_DEPREPARED`` is allowed.

.. code-block:: c

int sdw_prepare_stream(struct sdw_stream_runtime * stream);
int sdw_prepare_stream(struct sdw_stream_runtime * stream, bool resume);


SDW_STREAM_ENABLED
Expand Down Expand Up @@ -332,6 +342,14 @@ Bus implements below API for DISABLED state which needs to be called once
per stream. From ASoC DPCM framework, this stream state is linked to
.trigger() stop operation.

When the INFO_PAUSE flag is supported, a direct transition to
``SDW_STREAM_ENABLED`` is allowed.

For resume operations where ASoC will use the .prepare() callback, the
stream can transition from ``SDW_STREAM_DISABLED`` to
``SDW_STREAM_PREPARED``, with all required settings restored but
without updating the bandwidth and bit allocation.

.. code-block:: c

int sdw_disable_stream(struct sdw_stream_runtime * stream);
Expand All @@ -353,9 +371,18 @@ state:
After all above operations are successful, stream state is set to
``SDW_STREAM_DEPREPARED``.

Bus implements below API for DEPREPARED state which needs to be called once
per stream. From ASoC DPCM framework, this stream state is linked to
.trigger() stop operation.
Bus implements below API for DEPREPARED state which needs to be called
once per stream. ALSA/ASoC do not have a concept of 'deprepare', and
the mapping from this stream state to ALSA/ASoC operation may be
implementation specific.

When the INFO_PAUSE flag is supported, the stream state is linked to
the .hw_free() operation - the stream is not deprepared on a
TRIGGER_STOP.

Other implementations may transition to the ``SDW_STREAM_DEPREPARED``
state on TRIGGER_STOP, should they require a transition through the
``SDW_STREAM_PREPARED`` state.

.. code-block:: c

Expand Down
4 changes: 2 additions & 2 deletions drivers/base/regmap/regmap-sdw.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@
static int regmap_sdw_write(void *context, unsigned int reg, unsigned int val)
{
struct device *dev = context;
struct sdw_slave *slave = dev_to_sdw_dev(dev);
struct sdw_slave *slave = to_sdw_slave_device(dev);

return sdw_write(slave, reg, val);
}

static int regmap_sdw_read(void *context, unsigned int reg, unsigned int *val)
{
struct device *dev = context;
struct sdw_slave *slave = dev_to_sdw_dev(dev);
struct sdw_slave *slave = to_sdw_slave_device(dev);
int read;

read = sdw_read(slave, reg);
Expand Down
4 changes: 4 additions & 0 deletions drivers/soundwire/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,15 @@ config SOUNDWIRE_CADENCE
config SOUNDWIRE_INTEL
tristate "Intel SoundWire Master driver"
select SOUNDWIRE_CADENCE
select SOUNDWIRE_GENERIC_ALLOCATION
depends on ACPI && SND_SOC
help
SoundWire Intel Master driver.
If you have an Intel platform which has a SoundWire Master then
enable this config option to get the SoundWire support for that
device.

config SOUNDWIRE_GENERIC_ALLOCATION
tristate

endif
6 changes: 5 additions & 1 deletion drivers/soundwire/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
#
# Makefile for soundwire core
#
ccflags-y += -DDEBUG

#Bus Objs
soundwire-bus-objs := bus_type.o bus.o slave.o mipi_disco.o stream.o
soundwire-bus-objs := bus_type.o bus.o master.o slave.o mipi_disco.o stream.o
obj-$(CONFIG_SOUNDWIRE) += soundwire-bus.o

soundwire-generic-allocation-objs := generic_bandwidth_allocation.o
obj-$(CONFIG_SOUNDWIRE_GENERIC_ALLOCATION) += soundwire-generic-allocation.o

ifdef CONFIG_DEBUG_FS
soundwire-bus-objs += debugfs.o
endif
Expand Down
Loading