Re: [RFC PATCH 07/40] soundwire: intel: fix channel number reported by hardware

2019-08-02 Thread Pierre-Louis Bossart
On 8/2/19 6:57 AM, Vinod Koul wrote: On 25-07-19, 18:39, Pierre-Louis Bossart wrote: PDI2 reports an invalid count, force the correct hardware-supported value Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 9 + 1 file changed, 9 insertions(+) diff --git

Re: [alsa-devel] [RFC PATCH 06/40] soundwire: intel: prevent possible dereference in hw_params

2019-08-02 Thread Pierre-Louis Bossart
On 8/2/19 6:55 AM, Vinod Koul wrote: On 25-07-19, 18:39, Pierre-Louis Bossart wrote: This should not happen in production systems but we should test for all callback arguments before invoking the config_stream callback. so you are saying callback arg is mandatory, if so please document

Re: [RFC PATCH 05/40] soundwire: intel: move interrupt enable after interrupt handler registration

2019-08-02 Thread Pierre-Louis Bossart
On 8/2/19 6:53 AM, Vinod Koul wrote: On 25-07-19, 18:39, Pierre-Louis Bossart wrote: Not sure why the existing code would enable interrupts without the ability to deal with them. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 4 ++-- 1 file changed, 2 insertions

Re: linux-next: manual merge of the sound-asoc tree with the sound tree

2019-08-01 Thread Pierre-Louis Bossart
On 7/31/19 9:50 PM, Stephen Rothwell wrote: Hi all, Today's linux-next merge of the sound-asoc tree got conflicts in: sound/soc/intel/skylake/skl-nhlt.c sound/soc/intel/skylake/skl.h between commit: 1169cbf6b98e ("ASoC: Intel: Skylake: use common NHLT module") from the sound

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-30 Thread Pierre-Louis Bossart
On 7/30/19 6:21 AM, Andy Shevchenko wrote: On Mon, Jul 29, 2019 at 05:07:39PM -0500, Pierre-Louis Bossart wrote: On 7/26/19 2:08 PM, Andy Shevchenko wrote: On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote: - if (ret < 0) + if (ret < 0 &&

Re: [alsa-devel] [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-29 Thread Pierre-Louis Bossart
On 7/26/19 2:08 PM, Andy Shevchenko wrote: On Fri, Jul 26, 2019 at 01:08:57PM -0500, Pierre-Louis Bossart wrote: This thread became unreadable with interleaved top-posting, allow me restate the options and ask PM folks what they think On 7/25/19 6:40 PM, Pierre-Louis Bossart wrote: Not all

Re: [RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-26 Thread Pierre-Louis Bossart
This thread became unreadable with interleaved top-posting, allow me restate the options and ask PM folks what they think On 7/25/19 6:40 PM, Pierre-Louis Bossart wrote: Not all platforms support runtime_pm for now, let's use runtime_pm only when enabled. Suggested-by: Srinivas Kandagatla

Re: [alsa-devel] [RFC PATCH 27/40] soundwire: Add Intel resource management algorithm

2019-07-26 Thread Pierre-Louis Bossart
Thanks Guennadi for looking at this code, it's hard to review and figure things out... I replied to each, even trivial ones, to have a trace of all the issues. +static void sdw_compute_slave_ports(struct sdw_master_runtime *m_rt, + struct sdw_transport_data

Re: [alsa-devel] [RFC PATCH 38/40] soundwire: cadence_master: make clock stop exit configurable on init

2019-07-26 Thread Pierre-Louis Bossart
-int sdw_cdns_init(struct sdw_cdns *cdns); +int sdw_cdns_init(struct sdw_cdns *cdns, bool clock_stop_exit); int sdw_cdns_pdi_init(struct sdw_cdns *cdns, struct sdw_cdns_stream_config config); int sdw_cdns_exit_reset(struct sdw_cdns *cdns); diff --git

Re: [alsa-devel] [RFC PATCH 37/40] soundwire: cadence_master: add hw_reset capability in debugfs

2019-07-26 Thread Pierre-Louis Bossart
+static int cdns_hw_reset(void *data, u64 value) +{ + struct sdw_cdns *cdns = data; + int ret; + + if (value != 1) + return 0; + + dev_info(cdns->dev, "starting link hw_reset\n"); + + ret = sdw_cdns_exit_reset(cdns); + + dev_info(cdns->dev,

Re: [alsa-devel] [RFC PATCH 36/40] soundwire: intel: disable interrupts on suspend

2019-07-26 Thread Pierre-Louis Bossart
-int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns) +int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns, bool state) { u32 mask; - cdns_writel(cdns, CDNS_MCP_SLAVE_INTMASK0, - CDNS_MCP_SLAVE_INTMASK0_MASK); - cdns_writel(cdns, CDNS_MCP_SLAVE_INTMASK1, -

Re: [alsa-devel] [RFC PATCH 35/40] soundwire: intel: export helper to exit reset

2019-07-26 Thread Pierre-Louis Bossart
@@ -161,6 +161,7 @@ irqreturn_t sdw_cdns_thread(int irq, void *dev_id); int sdw_cdns_init(struct sdw_cdns *cdns); int sdw_cdns_pdi_init(struct sdw_cdns *cdns, struct sdw_cdns_stream_config config); +int sdw_cdns_exit_reset(struct sdw_cdns *cdns); int

Re: [alsa-devel] [PATCH v4 1/1] ASoC: Intel: Skylake: Remove static table index when parsing topology

2019-07-26 Thread Pierre-Louis Bossart
ned-off-by: Amadeusz Sławiński Reviewed-by: Pierre-Louis Bossart --- sound/soc/intel/skylake/skl-topology.c | 34 +- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/sound/soc/intel/skylake/skl-topology.c b/sound/soc/intel/skylake/skl-topology.c in

Re: [RFC PATCH 04/40] soundwire: intel: add debugfs register dump

2019-07-26 Thread Pierre-Louis Bossart
+static const struct file_operations intel_reg_fops = { + .open = simple_open, + .read = intel_reg_read, + .llseek = default_llseek, +}; DEFINE_SIMPLE_ATTRIBUTE()? yes + +static void intel_debugfs_init(struct sdw_intel *sdw) +{ + struct dentry *root =

Re: [RFC PATCH 01/40] soundwire: add debugfs support

2019-07-26 Thread Pierre-Louis Bossart
diff --git a/drivers/soundwire/debugfs.c b/drivers/soundwire/debugfs.c new file mode 100644 index ..8d86e100516e --- /dev/null +++ b/drivers/soundwire/debugfs.c @@ -0,0 +1,156 @@ +// SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) No, for debugfs-specific code, that dual

Re: [RFC PATCH 02/40] soundwire: cadence_master: add debugfs register dump

2019-07-26 Thread Pierre-Louis Bossart
+static const struct file_operations cdns_reg_fops = { + .open = simple_open, + .read = cdns_reg_read, + .llseek = default_llseek, +}; DEFINE_SHOW_ATTRIBUTE()? I remember looking at this but can't recall why I left it this way. That was before my Summer break so will

Re: [alsa-devel] [RFC PATCH 21/40] soundwire: export helpers to find row and column values

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 9:43 AM, Guennadi Liakhovetski wrote: On Thu, Jul 25, 2019 at 06:40:13PM -0500, Pierre-Louis Bossart wrote: Add a prefix for common tables and export 2 helpers to set the frame shapes based on row/col values. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.h

Re: [alsa-devel] [RFC PATCH 00/40] soundwire: updates for 5.4

2019-07-26 Thread Pierre-Louis Bossart
Comments and feedback welcome! Hello Pierre, This patchset is pretty large - I'd suggest dividing next RFC into segments: debugfs, info, power-management, basic flow corrections and frame shape calculator. There was an intent to provide a logical progression... First debugfs, since I

Re: [alsa-devel] [RFC PATCH 23/40] soundwire: stream: fix disable sequence

2019-07-26 Thread Pierre-Louis Bossart
: will look at this, thanks. On Thu, Jul 25, 2019 at 06:40:15PM -0500, Pierre-Louis Bossart wrote: When we disable the stream and then call hw_free, two bank switches will be handled and as a result we re-enable the stream on hw_free. Make sure the stream is disabled on both banks. TODO: we need

Re: [alsa-devel] [RFC PATCH 37/40] soundwire: cadence_master: add hw_reset capability in debugfs

2019-07-26 Thread Pierre-Louis Bossart
Thanks for the review Greg. +static int cdns_hw_reset(void *data, u64 value) +{ + struct sdw_cdns *cdns = data; + int ret; + + if (value != 1) + return 0; + + dev_info(cdns->dev, "starting link hw_reset\n"); + + ret = sdw_cdns_exit_reset(cdns); + +

Re: [alsa-devel] [RFC PATCH 32/40] soundwire: intel: add helper for initialization

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 5:42 AM, Cezary Rojewski wrote: On 2019-07-26 01:40, Pierre-Louis Bossart wrote: Move code to helper for reuse in power management routines Signed-off-by: Pierre-Louis Bossart ---   drivers/soundwire/intel.c | 16 +++-   1 file changed, 11 insertions(+), 5 deletions

Re: [alsa-devel] [RFC PATCH 33/40] soundwire: intel: Add basic power management support

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 5:50 AM, Cezary Rojewski wrote: On 2019-07-26 01:40, Pierre-Louis Bossart wrote: +static int intel_resume(struct device *dev) +{ +    struct sdw_intel *sdw; +    int ret; + +    sdw = dev_get_drvdata(dev); + +    ret = intel_init(sdw); +    if (ret) { +    dev_err(dev, &qu

Re: [alsa-devel] [RFC PATCH 31/40] soundwire: intel: move shutdown() callback and don't export symbol

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 5:38 AM, Cezary Rojewski wrote: On 2019-07-26 01:40, Pierre-Louis Bossart wrote: +void intel_shutdown(struct snd_pcm_substream *substream, +    struct snd_soc_dai *dai) +{ +    struct sdw_cdns_dma_data *dma; + +    dma = snd_soc_dai_get_dma_data(dai, substream

Re: [alsa-devel] [RFC PATCH 29/40] soundwire: intel_init: add kernel module parameter to filter out links

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 5:30 AM, Cezary Rojewski wrote: On 2019-07-26 01:40, Pierre-Louis Bossart wrote: @@ -83,6 +87,9 @@ static struct sdw_intel_ctx   caps = ioread32(res->mmio_base + SDW_SHIM_BASE + SDW_SHIM_LCAP);   caps &= GENMASK(2, 0); +    dev_dbg(>dev, "SoundWire links

Re: [alsa-devel] [RFC PATCH 27/40] soundwire: Add Intel resource management algorithm

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 6:07 AM, Cezary Rojewski wrote: On 2019-07-26 01:40, Pierre-Louis Bossart wrote: This algorithm computes bus parameters like clock frequency, frame shape and port transport parameters based on active stream(s) running on the bus. This implementation is optimal for Intel platforms

Re: [alsa-devel] [RFC PATCH 26/40] soundwire: cadence_master: fix divider setting in clock register

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 12:19 AM, Bard liao wrote: On 7/26/2019 7:40 AM, Pierre-Louis Bossart wrote: From: Rander Wang The existing code uses an OR operation which would mix the original divider setting with the new one, resulting in an invalid configuration that can make codecs hang. Add the mask

Re: [alsa-devel] [RFC PATCH 24/40] soundwire: cadence_master: use BIOS defaults for frame shape

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 5:20 AM, Cezary Rojewski wrote: On 2019-07-26 01:40, Pierre-Louis Bossart wrote: +static u32 cdns_set_default_frame_shape(int n_rows, int n_cols) +{ +    u32 val; +    int c; +    int r; + +    r = sdw_find_row_index(n_rows); +    c = sdw_find_col_index(n_cols); + +    val = (r

Re: [alsa-devel] [RFC PATCH 23/40] soundwire: stream: fix disable sequence

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 5:14 AM, Cezary Rojewski wrote: On 2019-07-26 01:40, Pierre-Louis Bossart wrote: -    return do_bank_switch(stream); +    ret = do_bank_switch(stream); +    if (ret < 0) { +    dev_err(bus->dev, "Bank switch failed: %d\n", ret); +    return ret; +    } + +

Re: [alsa-devel] [RFC PATCH 20/40] soundwire: prototypes for suspend/resume

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 5:04 AM, Cezary Rojewski wrote: On 2019-07-26 01:40, Pierre-Louis Bossart wrote: Signed-off-by: Pierre-Louis Bossart ---   drivers/soundwire/cadence_master.h | 3 +++   1 file changed, 3 insertions(+) diff --git a/drivers/soundwire/cadence_master.h b/drivers/soundwire

Re: [alsa-devel] [RFC PATCH 16/40] soundwire: cadence_master: improve startup sequence with link hw_reset

2019-07-26 Thread Pierre-Louis Bossart
+static int do_reset(struct sdw_cdns *cdns) +{ + int ret; + + /* program maximum length reset to be safe */ + cdns_updatel(cdns, CDNS_MCP_CONTROL, +CDNS_MCP_CONTROL_RST_DELAY, +CDNS_MCP_CONTROL_RST_DELAY); + + /* use hardware

Re: [alsa-devel] [RFC PATCH 15/40] soundwire: cadence_master: handle multiple status reports per Slave

2019-07-26 Thread Pierre-Louis Bossart
diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 889fa2cd49ae..25d5c7267c15 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -643,13 +643,35 @@ static int cdns_update_slave_status(struct sdw_cdns *cdns,

Re: [alsa-devel] [RFC PATCH 09/40] soundwire: cadence_master: fix usage of CONFIG_UPDATE

2019-07-26 Thread Pierre-Louis Bossart
@@ -943,7 +953,10 @@ int sdw_cdns_init(struct sdw_cdns *cdns) cdns_writel(cdns, CDNS_MCP_CONFIG, val); - return 0; + /* commit changes */ + ret = cdns_update_config(cdns); + + return ret; + return cdns_update_config(cdns); yes, will fix. thanks!

Re: [alsa-devel] [RFC PATCH 06/40] soundwire: intel: prevent possible dereference in hw_params

2019-07-26 Thread Pierre-Louis Bossart
diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 68832e613b1e..497879dd9c0d 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c @@ -509,7 +509,7 @@ static int intel_config_stream(struct sdw_intel *sdw, struct snd_soc_dai *dai,

Re: [alsa-devel] [RFC PATCH 04/40] soundwire: intel: add debugfs register dump

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 4:35 AM, Cezary Rojewski wrote: On 2019-07-26 01:39, Pierre-Louis Bossart wrote: +static void intel_debugfs_init(struct sdw_intel *sdw) +{ +    struct dentry *root = sdw->cdns.bus.debugfs; + +    if (!root) +    return; + +    sdw->fs = debugfs_create_dir("intel

Re: [alsa-devel] [RFC PATCH 03/40] soundwire: cadence_master: align debugfs to 8 digits

2019-07-26 Thread Pierre-Louis Bossart
On 7/26/19 4:38 AM, Cezary Rojewski wrote: On 2019-07-26 01:39, Pierre-Louis Bossart wrote: SQUASHME Signed-off-by: Pierre-Louis Bossart ---   drivers/soundwire/cadence_master.c | 2 +-   1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/cadence_master.c b

Re: [alsa-devel] [RFC PATCH 01/40] soundwire: add debugfs support

2019-07-26 Thread Pierre-Louis Bossart
Thanks for the feedback Cezary. +static ssize_t sdw_slave_reg_read(struct file *file, char __user *user_buf, +  size_t count, loff_t *ppos) +{ +    struct sdw_slave *slave = file->private_data; +    unsigned int reg; +    char *buf; +    ssize_t ret; +    int i, j; + +    buf =

Re: [alsa-devel] [RFC PATCH 01/40] soundwire: add debugfs support

2019-07-26 Thread Pierre-Louis Bossart
On 7/25/19 5:15 PM, Guennadi Liakhovetski wrote: Hi Pierre, A couple of nitpicks: Thanks for the feedback! create mode 100644 drivers/soundwire/debugfs.c [snip] diff --git a/drivers/soundwire/bus.h b/drivers/soundwire/bus.h index 3048ca153f22..06ac4adb0074 100644 ---

Re: [alsa-devel] [RFC PATCH 09/40] soundwire: cadence_master: fix usage of CONFIG_UPDATE

2019-07-26 Thread Pierre-Louis Bossart
@@ -758,15 +774,9 @@ static int _cdns_enable_interrupt(struct sdw_cdns *cdns)    */   int sdw_cdns_enable_interrupt(struct sdw_cdns *cdns)   { -    int ret; -   _cdns_enable_interrupt(cdns); -    ret = cdns_clear_bit(cdns, CDNS_MCP_CONFIG_UPDATE, -

[RFC PATCH 40/40] soundwire: intel: add delay on restart for enumeration

2019-07-25 Thread Pierre-Louis Bossart
We have a conceptual issue on restart: the interaction with the slaves can start before (re) enumeration is complete. Add a delay for now but we will need to have an async notification that all devices are back on the bus. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 5

[RFC PATCH 30/40] soundwire: cadence_master: add kernel parameter to override interrupt mask

2019-07-25 Thread Pierre-Louis Bossart
The code has a set of defaults which may not be relevant in all cases, add kernel parameter as a helper - mostly for early board bring-up. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/soundwire

[RFC PATCH 33/40] soundwire: intel: Add basic power management support

2019-07-25 Thread Pierre-Louis Bossart
Implement suspend/resume capabilities (not runtime_pm for now) Credits: this patch is based on an earlier internal contribution by Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 102

[RFC PATCH 09/40] soundwire: cadence_master: fix usage of CONFIG_UPDATE

2019-07-25 Thread Pierre-Louis Bossart
the update when the CONFIG is changed. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 29 + 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 9f611a1fff0a

[RFC PATCH 37/40] soundwire: cadence_master: add hw_reset capability in debugfs

2019-07-25 Thread Pierre-Louis Bossart
This is to kick devices into reset and see what software does Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index

[RFC PATCH 11/40] soundwire: cadence_master: simplify bus clash interrupt clear

2019-07-25 Thread Pierre-Louis Bossart
The bus clash interrupts are generated when the status is one, and also cleared by writing a one. It's overkill/useless to use an OR when the bit is already set. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[RFC PATCH 16/40] soundwire: cadence_master: improve startup sequence with link hw_reset

2019-07-25 Thread Pierre-Louis Bossart
attachment does not generate any interrupt, despite the status showing them being attached. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 35 +- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/drivers/soundwire

[RFC PATCH 01/40] soundwire: add debugfs support

2019-07-25 Thread Pierre-Louis Bossart
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. The main change is the use of scnprintf to avoid known issues with snprintf. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Makefile| 4 +- drivers/soundwire/bus.c | 6 ++ drivers/soundwire/bus.h | 24 ++ drivers

[RFC PATCH 08/40] soundwire: intel: remove BIOS work-arounds

2019-07-25 Thread Pierre-Louis Bossart
the values passed by all existing BIOS are fine, let's use them as is. The existing code must have been needed only on early prototypes. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/drivers/soundwire/intel.c b

[RFC PATCH 12/40] soundwire: cadence_master: revisit interrupt settings

2019-07-25 Thread Pierre-Louis Bossart
Adding missing interrupt masks (parity, etc) and missing checks. Clarify which masks are for which usage. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 25 ++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff

[RFC PATCH 34/40] soundwire: intel: ignore disabled links for suspend/resume

2019-07-25 Thread Pierre-Louis Bossart
Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 1477c35f616f..a976480d6f36 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c

[RFC PATCH 10/40] soundwire: cadence_master: remove useless wrapper

2019-07-25 Thread Pierre-Louis Bossart
Now that we've removed the update config, there's no need for a wrapper. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire

[RFC PATCH 03/40] soundwire: cadence_master: align debugfs to 8 digits

2019-07-25 Thread Pierre-Louis Bossart
SQUASHME Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 91e8bacb83e3..9f611a1fff0a 100644 --- a/drivers/soundwire

[RFC PATCH 06/40] soundwire: intel: prevent possible dereference in hw_params

2019-07-25 Thread Pierre-Louis Bossart
This should not happen in production systems but we should test for all callback arguments before invoking the config_stream callback. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/intel.c

[RFC PATCH 25/40] soundwire: intel: use BIOS information to set clock dividers

2019-07-25 Thread Pierre-Louis Bossart
The BIOS provides an Intel-specific property, let's use it to avoid hard-coded clock dividers. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 26 ++ drivers/soundwire/intel.c | 26 ++ include/linux/soundwire

[RFC PATCH 07/40] soundwire: intel: fix channel number reported by hardware

2019-07-25 Thread Pierre-Louis Bossart
PDI2 reports an invalid count, force the correct hardware-supported value Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 497879dd9c0d..51990b192dc0 100644

[RFC PATCH 29/40] soundwire: intel_init: add kernel module parameter to filter out links

2019-07-25 Thread Pierre-Louis Bossart
when they expose a connector. Add a module parameter to filter out such links, e.g. adding the following config to a file in /etc/modprobe.d will select the second and third links only. options soundwire_intel_init sdw_link_mask=0x6 Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire

[RFC PATCH 19/40] soundwire: bus: improve dynamic debug comments for enumeration

2019-07-25 Thread Pierre-Louis Bossart
update comments to provide better understanding of enumeration flows. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/soundwire/bus.c b/drivers/soundwire/bus.c index bca378806d00..2354675ef104 100644

[RFC PATCH 13/40] soundwire: cadence_master: fix register definition for SLAVE_STATE

2019-07-25 Thread Pierre-Louis Bossart
wrong prefix and wrong macro. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 0f3b9c160b01..d9d9e3d964dd 100644

[RFC PATCH 36/40] soundwire: intel: disable interrupts on suspend

2019-07-25 Thread Pierre-Louis Bossart
Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 42 +- drivers/soundwire/cadence_master.h | 2 +- drivers/soundwire/intel.c | 6 +++-- 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/drivers/soundwire

[RFC PATCH 15/40] soundwire: cadence_master: handle multiple status reports per Slave

2019-07-25 Thread Pierre-Louis Bossart
When a Slave reports multiple status in the sticky bits, find the latest configuration from the mirror of the PING frame status and update the status directly. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 34 -- 1 file changed, 28

[RFC PATCH 35/40] soundwire: intel: export helper to exit reset

2019-07-25 Thread Pierre-Louis Bossart
Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 9 +++-- drivers/soundwire/cadence_master.h | 1 + drivers/soundwire/intel.c | 4 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire

[RFC PATCH 02/40] soundwire: cadence_master: add debugfs register dump

2019-07-25 Thread Pierre-Louis Bossart
Add debugfs file to dump the Cadence master registers Credits: this patch is based on an earlier internal contribution by Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. The main change is the use of scnprintf to avoid known issues with snprintf. Signed-off-by: Pierre-Louis Bossart

[RFC PATCH 31/40] soundwire: intel: move shutdown() callback and don't export symbol

2019-07-25 Thread Pierre-Louis Bossart
All DAI callbacks are in intel.c except for shutdown. Move and remove export symbol Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 14 -- drivers/soundwire/cadence_master.h | 2 -- drivers/soundwire/intel.c | 17 +++-- 3 files

[RFC PATCH 26/40] soundwire: cadence_master: fix divider setting in clock register

2019-07-25 Thread Pierre-Louis Bossart
-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 10ebcef2e84e..18c6ac026e85 100644 --- a/drivers/soundwire/cadence_master.c +++ b

[RFC PATCH 17/40] soundwire: bus: use runtime_pm_get_sync/pm when enabled

2019-07-25 Thread Pierre-Louis Bossart
Not all platforms support runtime_pm for now, let's use runtime_pm only when enabled. Suggested-by: Srinivas Kandagatla Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/drivers

[RFC PATCH 27/40] soundwire: Add Intel resource management algorithm

2019-07-25 Thread Pierre-Louis Bossart
arg is almost always a bug + group->rates = krealloc(group->rates, Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Makefile | 2 +- drivers/soundwire/algo_dynamic_allocation.c | 403 drivers/soundwire

[RFC PATCH 22/40] soundwire: include mod_devicetable.h to avoid compiling warnings

2019-07-25 Thread Pierre-Louis Bossart
From: Bard liao Reported-by: kbuild test robot Signed-off-by: Bard liao Signed-off-by: Pierre-Louis Bossart --- include/linux/soundwire/sdw.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index a49028e9d666..31d1e8acf25b

[RFC PATCH 28/40] soundwire: intel: handle disabled links

2019-07-25 Thread Pierre-Louis Bossart
to the OS with an Intel-specific _DSD property. The same capability will be added to revisions of the MIPI DisCo specification. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 26 ++ include/linux/soundwire/sdw.h | 2 ++ 2 files changed, 24 insertions

[RFC PATCH 24/40] soundwire: cadence_master: use BIOS defaults for frame shape

2019-07-25 Thread Pierre-Louis Bossart
Remove hard-coding and use BIOS values. If they are wrong use default 48x2 frame shape. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b

[RFC PATCH 32/40] soundwire: intel: add helper for initialization

2019-07-25 Thread Pierre-Louis Bossart
Move code to helper for reuse in power management routines Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index c40ab443e723

[RFC PATCH 18/40] soundwire: bus: split handling of Device0 events

2019-07-25 Thread Pierre-Louis Bossart
Assigning a device number to a Slave will result in additional events when it reports its status in a PING frame. There is no point in dealing with all the other devices in a loop, this can be done when a non-device0 event happens. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c

[RFC PATCH 20/40] soundwire: prototypes for suspend/resume

2019-07-25 Thread Pierre-Louis Bossart
Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/soundwire/cadence_master.h b/drivers/soundwire/cadence_master.h index c0bf6ff00a44..d375bbfead18 100644 --- a/drivers/soundwire/cadence_master.h +++ b

[RFC PATCH 21/40] soundwire: export helpers to find row and column values

2019-07-25 Thread Pierre-Louis Bossart
Add a prefix for common tables and export 2 helpers to set the frame shapes based on row/col values. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.h| 7 +-- drivers/soundwire/stream.c | 14 -- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git

[RFC PATCH 23/40] soundwire: stream: fix disable sequence

2019-07-25 Thread Pierre-Louis Bossart
and alternate banks. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/stream.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 53f5e790fcd7..75b9ad1fb1a6 100644 --- a/drivers/soundwire/stream.c

[RFC PATCH 38/40] soundwire: cadence_master: make clock stop exit configurable on init

2019-07-25 Thread Pierre-Louis Bossart
The use of clock stop is not a requirement, the IP can e.g. be completely power gated and not detect any wakes while in s2idle/deep sleep. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 15 --- drivers/soundwire/cadence_master.h | 2 +- drivers

[RFC PATCH 39/40] soundwire: intel: add pm_runtime support

2019-07-25 Thread Pierre-Louis Bossart
-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 38 ++ 1 file changed, 38 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index db7bf2912767..1394a2322553 100644 --- a/drivers/soundwire/intel.c +++ b/drivers/soundwire/intel.c

[RFC PATCH 00/40] soundwire: updates for 5.4

2019-07-25 Thread Pierre-Louis Bossart
and Tomasz Lauda on the SOF side, currently being reviewed, see https://github.com/thesofproject/sof/pull/1638 Comments and feedback welcome! Bard liao (1): soundwire: include mod_devicetable.h to avoid compiling warnings Pierre-Louis Bossart (38): soundwire: add debugfs support soundwire

[RFC PATCH 04/40] soundwire: intel: add debugfs register dump

2019-07-25 Thread Pierre-Louis Bossart
Add debugfs file to dump the Intel SoundWire registers Credits: this patch is based on an earlier internal contribution by Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. The main change is the use of scnprintf to avoid known issues with snprintf. Signed-off-by: Pierre-Louis Bossart

[RFC PATCH 14/40] soundwire: cadence_master: fix definitions for INTSTAT0/1

2019-07-25 Thread Pierre-Louis Bossart
Two off-by-one errors: INTSTAT0 missed BIT(31) and INTSTAT1 is only defined on first 16 bits. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers

[RFC PATCH 05/40] soundwire: intel: move interrupt enable after interrupt handler registration

2019-07-25 Thread Pierre-Louis Bossart
Not sure why the existing code would enable interrupts without the ability to deal with them. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index

Re: [PATCH] ASoC: Intel: Fix some acpi vs apci typo in somme comments

2019-07-25 Thread Pierre-Louis Bossart
On 7/25/19 12:35 AM, Christophe JAILLET wrote: Fix some typo to have the filaname given in a comment match the real name of the file. Some 'acpi' have erroneously been written 'apci' Signed-off-by: Christophe JAILLET yes, thanks for the corrections. Acked-by: Pierre-Louis Bossart

Re: [Sound-open-firmware] [PATCH v2 1/5] ASoC: SOF: imx: Add i.MX8 HW support

2019-07-23 Thread Pierre-Louis Bossart
diff --git a/sound/soc/sof/imx/Makefile b/sound/soc/sof/imx/Makefile new file mode 100644 index ..c69237971da5 --- /dev/null +++ b/sound/soc/sof/imx/Makefile @@ -0,0 +1,7 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-3-Clause) + +ccflags-y += -DDEBUG this should be removed or in

Re: [Sound-open-firmware] [PATCH v2 3/5] ASoC: SOF: Add DT DSP device support

2019-07-23 Thread Pierre-Louis Bossart
diff --git a/sound/soc/sof/Kconfig b/sound/soc/sof/Kconfig index 61b97fc55bb2..2aa3a1cdf60c 100644 --- a/sound/soc/sof/Kconfig +++ b/sound/soc/sof/Kconfig @@ -36,6 +36,15 @@ config SND_SOC_SOF_ACPI Say Y if you need this option If unsure select "N". +config

Re: [alsa-devel] [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers

2019-07-22 Thread Pierre-Louis Bossart
On 7/22/19 8:39 AM, Arnd Bergmann wrote: On Sun, Jul 21, 2019 at 4:25 PM Masahiro Yamada wrote: struct snd_sof_blk_hdr { enum snd_sof_fw_blk_type type; - uint32_t size; /* bytes minus this header */ - uint32_t offset;/* offset from base */ +

Re: [alsa-devel] [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers

2019-07-22 Thread Pierre-Louis Bossart
On 7/22/19 8:34 AM, Arnd Bergmann wrote: On Mon, Jul 22, 2019 at 3:16 PM Pierre-Louis Bossart wrote: On 7/22/19 7:56 AM, Takashi Iwai wrote: On Mon, 22 Jul 2019 14:49:34 +0200, Pierre-Louis Bossart wrote: On 7/21/19 9:23 AM, Masahiro Yamada wrote: When CONFIG_UAPI_HEADER_TEST=y

Re: [alsa-devel] [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers

2019-07-22 Thread Pierre-Louis Bossart
On 7/22/19 7:56 AM, Takashi Iwai wrote: On Mon, 22 Jul 2019 14:49:34 +0200, Pierre-Louis Bossart wrote: On 7/21/19 9:23 AM, Masahiro Yamada wrote: When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to make sure they can be included from user-space. Currently, header.h

Re: [alsa-devel] [PATCH] ASoC: SOF: use __u32 instead of uint32_t in uapi headers

2019-07-22 Thread Pierre-Louis Bossart
On 7/21/19 9:23 AM, Masahiro Yamada wrote: When CONFIG_UAPI_HEADER_TEST=y, exported headers are compile-tested to make sure they can be included from user-space. Currently, header.h and fw.h are excluded from the test coverage. To make them join the compile-test, we need to fix the build

[PATCH] soundwire: fix regmap dependencies and align with other serial links

2019-07-18 Thread Pierre-Louis Bossart
by all other serial links. Signed-off-by: Pierre-Louis Bossart --- drivers/base/regmap/Kconfig | 2 +- drivers/soundwire/Kconfig | 7 +-- drivers/soundwire/Makefile | 2 +- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap

Re: [alsa-devel] [PATCH] ASoC: Intel: Atom: read timestamp moved to period_elapsed

2019-07-17 Thread Pierre-Louis Bossart
On 7/10/19 6:15 PM, Curtis Malainey wrote: On Tue, Jul 9, 2019 at 4:45 AM Andy Shevchenko wrote: On Mon, Jul 08, 2019 at 09:01:47PM -0700, Alex Levin wrote: sst_platform_pcm_pointer is called from both snd_pcm_period_elapsed and from snd_pcm_ioctl. Calling read timestamp results in

Re: [alsa-devel] [PATCH 1/2] ASoC: soc-core: defer card registration if codec component is missing

2019-06-26 Thread Pierre-Louis Bossart
On 6/26/19 3:36 PM, Jerome Brunet wrote: Like cpus and platforms, defer sound card initialization if the codec component is missing when initializing the dai_link Signed-off-by: Jerome Brunet --- sound/soc/soc-core.c | 8 1 file changed, 8 insertions(+) diff --git

Re: [alsa-devel] [PATCH v2 00/11] Fix driver reload issues

2019-06-25 Thread Pierre-Louis Bossart
do an airport lounge review and didn't see any blatant issues, so feel free to take the following tag for the series. Reviewed-by: Pierre-Louis Bossart

Re: [PATCH -next] ASoC: SOF: Intel: hda: remove duplicated include from hda.c

2019-06-20 Thread Pierre-Louis Bossart
On 6/20/19 4:57 PM, YueHaibing wrote: Remove duplicated include. Signed-off-by: YueHaibing Acked-by: Pierre-Louis Bossart --- sound/soc/sof/intel/hda.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index 51c1c1787de7

Re: [alsa-devel] [PATCH v2 09/11] ASoC: Intel: hdac_hdmi: Set ops to NULL on remove

2019-06-20 Thread Pierre-Louis Bossart
Could you please give a bit more context on what error you see when this happens? Hi, I get Oops. This is what happens with all other patches in this series and only this one reverted: root@APL:~# rmmod snd_soc_sst_bxt_rt298 root@APL:~# rmmod snd_soc_hdac_hdmi root@APL:~# rmmod snd_soc_skl

Re: [alsa-devel] [PATCH] ASoC: SOF: disallow building without CONFIG_PCI again

2019-06-17 Thread Pierre-Louis Bossart
On 6/17/19 2:45 PM, Arnd Bergmann wrote: Compile-testing without PCI just causes warnings: sound/soc/sof/sof-pci-dev.c:330:13: error: 'sof_pci_remove' defined but not used [-Werror=unused-function] static void sof_pci_remove(struct pci_dev *pci) ^~

Re: [alsa-devel] [RFC PATCH 6/6] soundwire: qcom: add support for SoundWire controller

2019-06-11 Thread Pierre-Louis Bossart
On 6/11/19 5:29 AM, Srinivas Kandagatla wrote: On 10/06/2019 15:12, Pierre-Louis Bossart wrote: + +    if (dev_addr == SDW_BROADCAST_DEV_NUM) { +    ctrl->fifo_status = 0; +    ret = wait_for_completion_timeout(>sp_cmd_comp, +  msecs_to_jiffies(TIME

Re: [alsa-devel] [RFC PATCH 6/6] soundwire: qcom: add support for SoundWire controller

2019-06-10 Thread Pierre-Louis Bossart
+#define SWRM_COMP_HW_VERSION    0x00 Can we please use SDW_ or QCOM_SDW_ as prefix? SWRM prefix is as per the data sheet register names, If it help am happy to add QCOM_ prefix it. That'd be fine. As long as there is no duplication and two terms/prefixes used for the

Re: [alsa-devel] [RFC PATCH 5/6] dt-bindings: soundwire: add bindings for Qcom controller

2019-06-10 Thread Pierre-Louis Bossart
diff --git a/Documentation/devicetree/bindings/soundwire/qcom,swr.txt b/Documentation/devicetree/bindings/soundwire/qcom,swr.txt new file mode 100644 index ..eb84d0f4f36f --- /dev/null +++ b/Documentation/devicetree/bindings/soundwire/qcom,swr.txt @@ -0,0 +1,62 @@ +Qualcomm

Re: [PATCH] ASoC: Intel: sst: fix kmalloc call with wrong flags

2019-06-07 Thread Pierre-Louis Bossart
On 6/7/19 5:19 PM, Alex Levin wrote: When calling kmalloc with GFP_KERNEL in case CONFIG_SLOB is unset, kmem_cache_alloc_trace is called. In case CONFIG_TRACING is set, kmem_cache_alloc_trace will ball slab_alloc, which will call slab_pre_alloc_hook which might_sleep_if. The context in

Re: [alsa-devel] next/master boot bisection: next-20190528 on sun8i-h3-libretech-all-h3-cc

2019-06-07 Thread Pierre-Louis Bossart
On 6/7/19 2:00 PM, Mark Brown wrote: On Fri, Jun 07, 2019 at 05:31:12PM +0100, Guillaume Tucker wrote: On 30/05/2019 16:53, Takashi Iwai wrote: + mutex_lock(_mutex); for_each_rtdcom(rtd, rtdcom) { component = rtdcom->component; if

Re: [alsa-devel] [RFC PATCH 6/6] soundwire: qcom: add support for SoundWire controller

2019-06-07 Thread Pierre-Louis Bossart
+config SOUNDWIRE_QCOM + tristate "Qualcomm SoundWire Master driver" + select SOUNDWIRE_BUS + depends on SND_SOC depends on SLIMBUS if you need the SlimBus link to talk to your SoundWire Master? Also depends on device tree since you use of_ functions? +#define

Re: [alsa-devel] [RFC PATCH 5/6] dt-bindings: soundwire: add bindings for Qcom controller

2019-06-07 Thread Pierre-Louis Bossart
On 6/7/19 3:56 AM, Srinivas Kandagatla wrote: This patch adds bindings for Qualcomm soundwire controller. Qualcomm SoundWire Master controller is present in most Qualcomm SoCs either integrated as part of WCD audio codecs via slimbus or as part of SOC I/O. Signed-off-by: Srinivas Kandagatla

<    3   4   5   6   7   8   9   10   11   12   >