Re: [PATCH v3 2/2] soundwire: qcom: add support for SoundWire controller

2019-10-11 Thread Pierre-Louis Bossart
+static int qcom_swrm_cmd_fifo_wr_cmd(struct qcom_swrm_ctrl *ctrl, u8 cmd_data, +u8 dev_addr, u16 reg_addr) +{ + DECLARE_COMPLETION_ONSTACK(comp); + unsigned long flags; + u32 val; + int ret; + + spin_lock_irqsave(&ctrl->comp_loc

Re: [PATCH] ASoC: SOF: sort out Kconfig, again

2020-04-28 Thread Pierre-Louis Bossart
On 4/28/20 4:27 PM, Arnd Bergmann wrote: The imx8 config keeps causing issues: WARNING: unmet direct dependencies detected for SND_SOC_SOF_IMX8M Depends on [n]: SOUND [=y] && !UML && SND [=y] && SND_SOC [=m] && SND_SOC_SOF_TOPLEVEL [=y] && SND_SOC_SOF_IMX_TOPLEVEL [=y] && IMX_DSP [=n]

Re: [PATCH] ASoC: SOF: sort out Kconfig, again

2020-04-28 Thread Pierre-Louis Bossart
Thanks Arnd, do you mind sharing your config? https://pastebin.com/HRX5xi3R will give it a try, thanks! We noticed last week that there's a depend/select confusion might be simpler to fix, see https://github.com/thesofproject/linux/pull/2047/commits If I look at the first line I see a

Re: [PATCH] ASoC: SOF: sort out Kconfig, again

2020-04-28 Thread Pierre-Louis Bossart
me in. Thanks -Pierre >From 208e61ae18d3a4aa93ffa73db01c4e3c24a4979f Mon Sep 17 00:00:00 2001 From: Pierre-Louis Bossart Date: Wed, 22 Apr 2020 06:21:56 -0500 Subject: [PATCH] ASoC: SOF: imx: fix depends/select IMX_DSP confusion The two IMX targets don't use depends/select in a consist

Re: [alsa-devel] [PATCH -next] ASoC: SOF: Fix randbuild error

2019-10-14 Thread Pierre-Louis Bossart
_audio_set' Reported-by: Hulk Robot Fixes: 5d43001ae436 ("ASoC: SOF: acpi led support for switch controls") Signed-off-by: YueHaibing Thanks for the fix. Acked-by: Pierre-Louis Bossart --- sound/soc/sof/control.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/sof/

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

2019-10-14 Thread Pierre-Louis Bossart
On 10/14/19 4:04 AM, Srinivas Kandagatla wrote: Thanks Pierre for taking time to review the patch. On 11/10/2019 18:50, Pierre-Louis Bossart wrote: +static int qcom_swrm_cmd_fifo_wr_cmd(struct qcom_swrm_ctrl *ctrl, u8 cmd_data, + u8 dev_addr, u16 reg_addr

Re: [alsa-devel] [PATCH 0/6] soundwire: intel/cadence: simplify PDI handling

2019-10-14 Thread Pierre-Louis Bossart
On 9/16/19 2:23 PM, Pierre-Louis Bossart wrote: These patches were originally submitted as '[RFC PATCH 00/11] soundwire: intel: simplify DAI/PDI handling'. There were no comments received. This series only provides the PDI changes, which makes it simpler to review. The DAI chang

Re: [alsa-devel] [PATCH 0/2] soundwire: Kconfig/build improvements

2019-10-14 Thread Pierre-Louis Bossart
On 9/16/19 1:57 PM, Pierre-Louis Bossart wrote: The Intel kbuild test reported issues with COMPILE_TEST or cross-compilation when SOF is enabled, fix. This has no functional impact. Vinod, if you are back at your desk, those patches are almost a month old. thanks! Pierre-Louis Bossart

Re: [alsa-devel] [PATCH v2 0/5] soundwire: intel/cadence: better initialization

2019-10-14 Thread Pierre-Louis Bossart
On 9/16/19 2:09 PM, Pierre-Louis Bossart wrote: V2 of the original series 'soundwire: inits and PM additions for 5.4', with PM additions removed since more tests on hardware are required. Vinod, if you are back at your desk, those patches are almost a month old. thanks! Cha

Re: [alsa-devel] [PATCH] ASoC: Intel: sof-rt5682: add a check for devm_clk_get

2019-10-17 Thread Pierre-Louis Bossart
On 10/16/19 9:50 PM, Chuhong Yuan wrote: sof_audio_probe misses a check for devm_clk_get and may cause problems. Add a check for it to fix the bug. Indeed this is a miss, we have this test in all machine drivers except this one. Thanks for the patch! Acked-by: Pierre-Louis Bossart

Re: [alsa-devel] linux-next: Tree for Oct 17 (soundwire)

2019-10-17 Thread Pierre-Louis Bossart
On 10/17/19 10:22 AM, Randy Dunlap wrote: On 10/16/19 9:26 PM, Stephen Rothwell wrote: Hi all, Changes since 20191016: on x86_64: # CONFIG_BLOCK is not set CC [M] drivers/soundwire/intel_init.o In file included from ../drivers/soundwire/intel_init.c:12:0: ../include/linux/iomap.h: In f

Re: [alsa-devel] [PATCH] ASoC: bdw-rt5677: enable runtime channel merge

2019-10-21 Thread Pierre-Louis Bossart
In the DAI link "Capture PCM", the FE DAI "Capture Pin" supports 4-channel capture but the BE DAI supports only 2-channel capture. To fix the channel mismatch, we need to enable the runtime channel merge for this DAI link. Hi Pierre, This patch is for the same issue discussed in the followi

Re: [alsa-devel] [PATCH v2 4/5] soundwire: intel/cadence: add flag for interrupt enable

2019-10-21 Thread Pierre-Louis Bossart
On 10/20/19 11:14 PM, Vinod Koul wrote: On 16-09-19, 14:09, Pierre-Louis Bossart wrote: Prepare for future PM support and fix error handling by disabling interrupts as needed. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 18 -- drivers

Re: [alsa-devel] [PATCH v2 2/5] soundwire: cadence_master: add hw_reset capability in debugfs

2019-10-21 Thread Pierre-Louis Bossart
On 10/20/19 11:04 PM, Vinod Koul wrote: On 16-09-19, 14:09, Pierre-Louis Bossart wrote: Provide debugfs capability to kick link and devices into hard-reset (as defined by MIPI). This capability is really useful when some devices are no longer responsive and/or to check the software handling of

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 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(&adev->dev, "SoundWir

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); +    if

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 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 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 23/40] soundwire: stream: fix disable sequence

2019-07-26 Thread Pierre-Louis Bossart
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 to

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 be

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: [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 reloo

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 licens

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 = sdw->cdns.b

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: [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 sdw_cdns_enable_

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 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, "lin

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 a/drivers/soundwir

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 *t_

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 Kanda

Re: Regression found (Stop-marking-clocks-as-CLK_IS_CRITICAL)

2019-01-22 Thread Pierre-Louis Bossart
On 1/20/19 11:55 PM, Mogens Jensen wrote: The only minor annoyance I'm experiencing now, is a large amount of debug output from something in kernel log when audio is played on the system: writing to lpe: : 01 01 01 01 00 00 08 00 ff ff ff ff 55 00 00 00 U... writing to l

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-22 Thread Pierre-Louis Bossart
The issue was that we were seeing a memory corruption bug on an AMD chromebooks with that function already (not observed on Intel). I was testing some SOF integrations and was seeing this in the kernel logs. I had Dylan verify my logic before I sent the patch because it took so long to identify

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-22 Thread Pierre-Louis Bossart
On 1/22/19 7:36 PM, Curtis Malainey wrote: Curtis Malainey | Software Engineer | cujomalai...@google.com | 650-898-3849 On Wed, Jan 23, 2019 at 4:11 AM Pierre-Louis Bossart wrote: The issue was that we were seeing a memory corruption bug on an AMD chromebooks with that function already

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-15 Thread Pierre-Louis Bossart
On 1/14/19 6:06 PM, Mark Brown wrote: On Fri, Jan 11, 2019 at 03:49:08PM -0600, Pierre-Louis Bossart wrote: Adding some traces I can see that the the platform name we use doesn't seem compatible with your logic. All the Intel boards used a constant platform name matching the PCI ID, se

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-15 Thread Pierre-Louis Bossart
Beyond the fact that the platform_name seems to be totally useless, additional tests show that the patch ('ASoC: soc-core: defer card probe until all component is added to list') adds a new restriction which contradicts existing error checks. None of the Intel machine drivers set the dailink "

Re: [PATCH 6/8] ASoC: intel: skylake: change snprintf to scnprintf for possible overflow

2019-01-16 Thread Pierre-Louis Bossart
diff --git a/sound/soc/intel/skylake/skl-debug.c b/sound/soc/intel/skylake/skl-debug.c index 5d7ac2ee7a3c..bb28db734fb7 100644 --- a/sound/soc/intel/skylake/skl-debug.c +++ b/sound/soc/intel/skylake/skl-debug.c @@ -43,7 +43,7 @@ static ssize_t skl_print_pins(struct skl_module_pin *m_pin, char

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-14 Thread Pierre-Louis Bossart
On 1/14/19 6:06 PM, Mark Brown wrote: On Fri, Jan 11, 2019 at 03:49:08PM -0600, Pierre-Louis Bossart wrote: Adding some traces I can see that the the platform name we use doesn't seem compatible with your logic. All the Intel boards used a constant platform name matching the PCI ID, se

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-18 Thread Pierre-Louis Bossart
On 1/15/19 3:16 PM, Pierre-Louis Bossart wrote: Beyond the fact that the platform_name seems to be totally useless, additional tests show that the patch ('ASoC: soc-core: defer card probe until all component is added to list') adds a new restriction which contradicts existing er

Re: [alsa-devel] [PATCH][next] ASoC: Intel: bytcht_es8316: make mic_name static, reduces object code size

2019-01-24 Thread Pierre-Louis Bossart
diff --git a/sound/soc/intel/boards/bytcht_es8316.c b/sound/soc/intel/boards/bytcht_es8316.c index fa9c4cf97686..1364e4e601d8 100644 --- a/sound/soc/intel/boards/bytcht_es8316.c +++ b/sound/soc/intel/boards/bytcht_es8316.c @@ -437,7 +437,7 @@ static const struct acpi_gpio_mapping byt_cht_es83

Re: [PATCH][V2] ASoC: Intel: make const arrays static, reduces object code size

2019-01-24 Thread Pierre-Louis Bossart
316.o After: textdata bss dec hex filename 140158896 224 231355a5f bytcht_es8316.o (gcc version 8.2.0 x86_64) Signed-off-by: Colin Ian King Acked-by: Pierre-Louis Bossart --- V2: also fix up bytcr_rt5640.c and bytcr_rt5651.c, thanks to Pierre-Louis Bossar

Re: [alsa-devel] [PATCH] ASoC: soc-core: Fix null pointer dereference in soc_find_component

2019-01-24 Thread Pierre-Louis Bossart
changes are legitimate. To move forward, maybe it's not worth spending too much time on a grand unification of string theory, there are simpler solutions: the Intel machine drivers already do get the platform driver name as an platform_data argument, so we could modify the dailinks platform nam

Re: [PATCH 1/8] soundwire: intel: filter SoundWire controller device search

2019-05-08 Thread Pierre-Louis Bossart
+ /* +* On some Intel platforms, multiple children of the HDAS +* device can be found, but only one of them is the SoundWire +* controller. The SNDW device is always exposed with +* Name(_ADR, 0x4000) so filter accordingly +*/ + if (adr !=

Re: [alsa-devel] [RFC PATCH 1/7] soundwire: Add sysfs support for master(s)

2019-05-08 Thread Pierre-Louis Bossart
On 5/8/19 4:16 AM, Greg KH wrote: On Wed, May 08, 2019 at 01:16:06PM +0530, Vinod Koul wrote: On 07-05-19, 17:49, Pierre-Louis Bossart wrote: The model here is that Master device is PCI or Platform device and then creates a bus instance which has soundwire slave devices. So for any

Re: [alsa-devel] [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-08 Thread Pierre-Louis Bossart
Vinod, the question was not for dp0 and dpN, it's fine to have subdirectories there, but rather why we need separate devices for the master and slave properties. Slave does not have a separate device. IIRC the properties for Slave are in /sys/bus/soundwire/device//... I am not sure this is

Re: [PATCH v2 1/2] ASoC: SOF: Add Comet Lake PCI IDs

2019-05-08 Thread Pierre-Louis Bossart
On 5/8/19 11:42 AM, Evan Green wrote: On Tue, May 7, 2019 at 3:14 PM Pierre-Louis Bossart wrote: Minor nit-picks below. The Kconfig would work but select CANNONLAKE even if you don't want it. +config SND_SOC_SOF_COMETLAKE_LP + tristate + select SND_SOC_SOF_CANNONLAKE

Re: [PATCH v2 2/2] ASoC: Intel: Skylake: Add Cometlake PCI IDs

2019-05-08 Thread Pierre-Louis Bossart
On 5/8/19 11:51 AM, Evan Green wrote: On Tue, May 7, 2019 at 3:31 PM Pierre-Louis Bossart wrote: On 5/7/19 4:53 PM, Evan Green wrote: Add PCI IDs for Intel CometLake platforms, which from a software point of view are extremely similar to Cannonlake platforms. Humm, I have mixed feelings

Re: [PATCH] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m

2019-05-10 Thread Pierre-Louis Bossart
On 5/10/19 2:12 AM, Takashi Iwai wrote: On Fri, 10 May 2019 04:36:57 +0200, YueHaibing wrote: Fix gcc build error while CONFIG_SND_SOC_SOF_NOCODEC=m sound/soc/sof/core.o: In function `snd_sof_device_probe': core.c:(.text+0x4af): undefined reference to `sof_nocodec_setup' Change SND_SOC_SOF_NO

Re: [alsa-devel] [PATCH] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m

2019-05-10 Thread Pierre-Louis Bossart
On 5/10/19 8:04 AM, Takashi Iwai wrote: On Fri, 10 May 2019 14:56:29 +0200, Pierre-Louis Bossart wrote: On 5/10/19 2:12 AM, Takashi Iwai wrote: On Fri, 10 May 2019 04:36:57 +0200, YueHaibing wrote: Fix gcc build error while CONFIG_SND_SOC_SOF_NOCODEC=m sound/soc/sof/core.o: In function

Re: [PATCH V2] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m

2019-05-10 Thread Pierre-Louis Bossart
On 5/10/19 8:29 AM, YueHaibing wrote: Fix gcc build error while CONFIG_SND_SOC_SOF_NOCODEC=m sound/soc/sof/core.o: In function `snd_sof_device_probe': core.c:(.text+0x4af): undefined reference to `sof_nocodec_setup' Change IS_ENABLED to IS_REACHABLE to fix this. this just hides the issue inst

Re: [alsa-devel] [PATCH] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m

2019-05-10 Thread Pierre-Louis Bossart
On 5/10/19 8:56 AM, Takashi Iwai wrote: On Fri, 10 May 2019 15:41:10 +0200, Takashi Iwai wrote: On Fri, 10 May 2019 15:34:03 +0200, Pierre-Louis Bossart wrote: On 5/10/19 8:04 AM, Takashi Iwai wrote: On Fri, 10 May 2019 14:56:29 +0200, Pierre-Louis Bossart wrote: On 5/10/19 2:12 AM

Re: [PATCH V2] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m

2019-05-10 Thread Pierre-Louis Bossart
On 5/10/19 8:50 AM, YueHaibing wrote: On 2019/5/10 21:36, Pierre-Louis Bossart wrote: On 5/10/19 8:29 AM, YueHaibing wrote: Fix gcc build error while CONFIG_SND_SOC_SOF_NOCODEC=m sound/soc/sof/core.o: In function `snd_sof_device_probe': core.c:(.text+0x4af): undefined referen

Re: [alsa-devel] [PATCH] ASoC: SOF: Fix build error with CONFIG_SND_SOC_SOF_NOCODEC=m

2019-05-10 Thread Pierre-Louis Bossart
Yes, that would work. OTOH, I see no merit to build an extra module for nocodec. nocodec.c can be built together with sof-core stuff. the module has its benefits. Today nocodec includes all possible DAIs, I wanted to add module parameters to restrict things a bit for tests/debug. It'll be e

Re: [alsa-devel] [PATCH v3 0/2] ASoC: Intel: Add Cometlake PCI IDs

2019-05-11 Thread Pierre-Louis Bossart
On 5/10/19 5:39 PM, Evan Green wrote: This small series adds PCI IDs for Cometlake platforms, for a dazzling audio experience. This is based on linux-next's next-20190510. Thank you Evan, looks good. For the series Acked-by: Pierre-Louis Bossart Changes in v3: - Copy cnl_desc t

Re: [PATCH] soundwire: stream: fix out of boundary access on port properties

2019-05-22 Thread Pierre-Louis Bossart
as is. I vaguely recall providing this feedback as well in an earlier version. Acked-by: Pierre-Louis Bossart Signed-off-by: Srinivas Kandagatla --- drivers/soundwire/stream.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/soundwire/stream.c b/drivers

Re: [PATCH] soundwire: stream: fix bad unlock balance

2019-05-22 Thread Pierre-Louis Bossart
On 5/22/19 11:25 AM, Srinivas Kandagatla wrote: This patch fixes below warning due to unlocking without locking. = WARNING: bad unlock balance detected! 5.1.0-16506-gc1c383a6f0a2-dirty #1523 Tainted: GW -

[PATCH v2 09/15] soundwire: rename/clarify MIPI DisCo properties

2019-05-22 Thread Pierre-Louis Bossart
nd DPn levels. Rename to follow the MIPI definitions, no need to be creative here. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c| 2 +- drivers/soundwire/mipi_disco.c | 6 +++--- drivers/soundwire/stream.c | 6 +++--- include/linux/soundwire/sdw.h | 13 +++-

[PATCH v2 13/15] soundwire: Intel: add log for number of PCM and PDM PDIs

2019-05-22 Thread Pierre-Louis Bossart
This information will be reflected in debugfs but it's easier to see as a dmesg log. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index 4ac141730b13..92be6ad

[PATCH v2 15/15] soundwire: intel_init: add checks on link numbers

2019-05-22 Thread Pierre-Louis Bossart
. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel_init.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c index 771a53a5c033..70637a0383d2 100644 --- a/drivers/soundwire/intel_init.c +++ b/drivers/soundwire

[PATCH v2 12/15] soundwire: cadence_master: check the number of bidir PDIs

2019-05-22 Thread Pierre-Louis Bossart
There is an assumption that the first two PDIs are reserved for Bulk, so we need to make sure the number of bidir PDIs is indeed larger than two. If the configuration provided is incorrect, this could lead to allocating a huge amount of memory. Signed-off-by: Pierre-Louis Bossart --- drivers

[PATCH v2 14/15] soundwire: fix typo in comments

2019-05-22 Thread Pierre-Louis Bossart
Copy/paste of sdw_intel_res Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/intel.h b/drivers/soundwire/intel.h index 71050e5f643d..d923b6262330 100644 --- a/drivers/soundwire/intel.h +++ b

[PATCH v2 11/15] soundwire: cadence_master: log Slave status mask on errors

2019-05-22 Thread Pierre-Louis Bossart
s not needed when you need 4. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index 6f4184f5256c..a505d74ab461 100644 --- a/dr

[PATCH v2 05/15] soundwire: mipi-disco: remove master_count property for masters

2019-05-22 Thread Pierre-Louis Bossart
The master_count is only defined for a Controller or a Slave in the MIPI DisCo for SoundWire document. Signed-off-by: Pierre-Louis Bossart --- include/linux/soundwire/sdw.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index

[PATCH v2 04/15] soundwire: remove master data port properties

2019-05-22 Thread Pierre-Louis Bossart
Hardik Shah. Signed-off-by: Pierre-Louis Bossart --- include/linux/soundwire/sdw.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index 69ae680a5a21..831a370eaedd 100644 --- a/include/linux/soundwire/sdw.h +++ b/include/linux

[PATCH v2 02/15] soundwire: mipi_disco: fix master/link error

2019-05-22 Thread Pierre-Louis Bossart
e MIPI spec will be updated to deprecate "mipi-sdw-master-N-subproperties" Fix to parse firmware information on existing devices. If we ever see a system with 'master-N-subproperties' I guess we'll have to try both. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire

[PATCH v2 06/15] soundwire: rename 'freq' fields

2019-05-22 Thread Pierre-Louis Bossart
Rename all fields with 'freq' as 'clk_freq' to follow the MIPI specification and avoid confusion between bus clock and audio clocks. No functionality change. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/bus.c| 4 ++-- drivers/soundwi

[PATCH v2 07/15] soundwire: mipi-disco: fix clock stop modes

2019-05-22 Thread Pierre-Louis Bossart
Fix support for clock_stop_mode0 and 1. The existing code uses a bitmask between enums, one of which being zero. Or-ing with zero is not very useful in general...Fix by or-ing with a BIT dependent on the enum value. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/mipi_disco.c | 4

[PATCH v2 08/15] soundwire: clarify comment

2019-05-22 Thread Pierre-Louis Bossart
The MIPI DisCo spec refers to dynamic frame shape, not to dynamic shape. Clarify. Signed-off-by: Pierre-Louis Bossart --- include/linux/soundwire/sdw.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/soundwire/sdw.h b/include/linux/soundwire/sdw.h index

[PATCH v2 10/15] soundwire: cadence_master: use rate_limited dynamic debug

2019-05-22 Thread Pierre-Louis Bossart
When commands start failing, e.g. due to a bad electrical connection or bus conflicts, the dmesg log is flooded. This should not happen for production devices but it's quite frequent when bringing-up a new platform. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c

[PATCH v2 03/15] soundwire: add port-related definitions

2019-05-22 Thread Pierre-Louis Bossart
Somehow previous header files did not include definition for sink/source, flow and grouping. Signed-off-by: Pierre-Louis Bossart --- include/linux/soundwire/sdw.h | 53 +++ 1 file changed, 53 insertions(+) diff --git a/include/linux/soundwire/sdw.h b/include

[PATCH v2 00/15] soundwire: corrections to ACPI/DisCo/Intel support

2019-05-22 Thread Pierre-Louis Bossart
patches. Changes since v2: Feedback from Vinod: 1. improve the SoundWire controller search without magic values 2. split patches as needed Other additions rate-limiting to avoid flooding dmesg logs provide better Slave status on errors more checks on links and PDIs Pierre-Louis Bossart (15

[PATCH v2 01/15] soundwire: intel: filter SoundWire controller device search

2019-05-22 Thread Pierre-Louis Bossart
represent the link type, with SoundWire assigned the value 4. Add a filter and terminate early when a valid _ADR is provided, otherwise keep iterating to find the next child. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel_init.c | 21 - 1 file changed, 20

Re: [PATCH] ASoC: sound/soc/intel/boards: limit some drivers to X86 since headers are only in arch/x86/

2019-05-23 Thread Pierre-Louis Bossart
r_rt5651.c:#include cht_bsw_rt5645.c:#include sof_rt5682.c:#include and grep "include.*asm.platform_sst_audio.h" *.c bytcht_da7213.c:#include bytcht_es8316.c:#include Signed-off-by: Randy Dunlap Cc: Mark Brown Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Jie Yang Cc: alsa-de

Re: [alsa-devel] [PATCH] ASoc: fix sound/soc/intel/skylake/slk-ssp-clk.c build error on IA64

2019-05-23 Thread Pierre-Louis Bossart
' has incomplete type struct clk_hw hw; ^~ Reported-by: kbuild test robot Signed-off-by: Randy Dunlap Cc: Mark Brown Cc: Pierre-Louis Bossart Cc: Liam Girdwood Cc: Jie Yang Cc: alsa-de...@alsa-project.org --- sound/soc/intel/Kconfig|3 ++- sound/soc/in

Re: [alsa-devel] [PATCH] ASoC: Intel: bytcr_5640.c:Refactored if statement and removed buffer

2019-05-20 Thread Pierre-Louis Bossart
On 5/20/19 3:37 AM, Hans de Goede wrote: Hi all, On 19-05-19 19:57, nariman wrote: From: Nariman Etemadi in function snd_byt_rt5640_mc_probe and removed buffer yt_rt5640_codec_aif_name & byt_rt5640_cpu_dai_name Signed-off-by: Nariman Etemadi Series (all 4 patches) look good to me: R

Re: [alsa-devel] [PATCH] ASoc: fix sound/soc/intel/skylake/slk-ssp-clk.c build error on IA64

2019-05-24 Thread Pierre-Louis Bossart
On 5/23/19 9:59 PM, Randy Dunlap wrote: On 5/23/19 4:28 AM, Pierre-Louis Bossart wrote: On 5/22/19 10:58 PM, Randy Dunlap wrote: From: Randy Dunlap skl-ssp-clk.c does not build on IA64 because the driver uses the common clock interface, so make the driver depend on COMMON_CLK. Fixes

Re: [PATCH v2] ASoC: drop COMPILE_TEST for sound/soc/intel/boards/ that use X86_INTEL_LPSS

2019-05-24 Thread Pierre-Louis Bossart
(or use an existing one?). IIRC the dependency on asm/cpu_device_id is just to find out if the device is baytrail or cherrytrail. Fixes: 164a263bf8d0 ("ASoC: Intel: Make boards more available for compile test") Signed-off-by: Randy Dunlap Cc: Mark Brown Cc: Pierre-Louis Bossart C

[PATCH 0/3] soundwire: code cleanup

2019-04-04 Thread Pierre-Louis Bossart
as is is a good solution (email bounces, etc). I also don't think providing a non-Intel address is correct since the work was funded by Intel. Is there a recommended practice here? Pierre-Louis Bossart (3): soundwire: fix style issues soundwire: bus: remove useless initializations soundwire:

[PATCH 2/3] soundwire: bus: remove useless initializations

2019-04-04 Thread Pierre-Louis Bossart
No need for explicit initialization of page and ssp fields, they are already zeroed with a memset. Detected with cppcheck: [drivers/soundwire/bus.c:309]: (style) Variable 'msg->page' is reassigned a value before the old one has been used. Signed-off-by: Pierre-Louis Bossart

[PATCH 3/3] soundwire: stream: remove useless initialization of local variable

2019-04-04 Thread Pierre-Louis Bossart
no need to reset return value. Detected with cppcheck: [drivers/soundwire/stream.c:332]: (style) Variable 'ret' is assigned a value that is never used. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 1/3] soundwire: fix style issues

2019-04-04 Thread Pierre-Louis Bossart
this. Fix Kconfig help, spelling, SPDX format, alignment, spurious parentheses, bool comparisons to true/false, macro argument protection. No new functionality added. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Kconfig | 2 +- drivers/soundwire/bus.c

Re: [alsa-devel] [PATCH 1/3] soundwire: fix style issues

2019-04-04 Thread Pierre-Louis Bossart
Thanks for the review Joe, @@ -458,13 +458,13 @@ static int sdw_assign_device_num(struct sdw_slave *slave) mutex_unlock(&slave->bus->bus_lock); if (dev_num < 0) { dev_err(slave->bus->dev, "Get dev_num failed: %d", -

Re: [alsa-devel] [PATCH] ASoC: max98090: remove 24-bit format support

2019-05-13 Thread Pierre-Louis Bossart
On 5/10/19 5:25 AM, Yu-Hsuan Hsu wrote: Remove 24-bit format support because it doesn't work now. We can revert this change after it really supports. (https://patchwork.kernel.org/patch/10783561/) Signed-off-by: Yu-Hsuan Hsu As discussed in the previous thread, the data sheet explicitly me

Re: [alsa-devel] [PATCH v2] ACPI / device_sysfs: change _ADR representation to 64 bits

2019-05-14 Thread Pierre-Louis Bossart
diff --git a/drivers/acpi/device_sysfs.c b/drivers/acpi/device_sysfs.c index 8940054d6250..7dda0ee05cd1 100644 --- a/drivers/acpi/device_sysfs.c +++ b/drivers/acpi/device_sysfs.c @@ -428,8 +428,10 @@ static ssize_t acpi_device_adr_show(struct device *dev, { struct acpi_device *acpi_dev

Re: [alsa-devel] [PATCH v3 2/5] soundwire: fix style issues

2019-04-19 Thread Pierre-Louis Bossart
  enum sdw_command_response   cdns_xfer_msg_defer(struct sdw_bus *bus, -    struct sdw_msg *msg, struct sdw_defer *defer) +    struct sdw_msg *msg, struct sdw_defer *defer) this one too..   static int cdns_port_params(struct sdw_bus *bus, -    struct sdw_port_params *p_param

Re: [alsa-devel] [PATCH v3 0/5] soundwire: code cleanup

2019-04-19 Thread Pierre-Louis Bossart
On 4/15/19 7:57 AM, Pierre-Louis Bossart wrote: On 4/14/19 5:04 AM, Vinod Koul wrote: On 10-04-19, 22:16, Pierre-Louis Bossart wrote: SoundWire support will be provided in Linux with the Sound Open Firmware (SOF) on Intel platforms. Before we start adding the missing pieces, there are a

[PATCH v2 0/2] soundwire: fix Kconfig select/depend issues

2019-04-19 Thread Pierre-Louis Bossart
useless depend in REGMAP_SOUNDWIRE (select will ignore dependencies) Reordered patches to avoid circular dependencies with git bisect Pierre-Louis Bossart (2): soundwire: fix SOUNDWIRE_BUS option regmap: soundwire: fix Kconfig select/depend issue drivers/base/regmap/Kconfig | 2 +- drivers/

[PATCH v2 2/2] regmap: soundwire: fix Kconfig select/depend issue

2019-04-19 Thread Pierre-Louis Bossart
: 7c22ce6e2184 ('03fc8746f7915b5a391d8227f7e1') Signed-off-by: Pierre-Louis Bossart --- drivers/base/regmap/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/base/regmap/Kconfig b/drivers/base/regmap/Kconfig index 6ad5ef48b61e..c12e3f1fb110 100644 --- a/dr

[PATCH v2 1/2] soundwire: fix SOUNDWIRE_BUS option

2019-04-19 Thread Pierre-Louis Bossart
c49b32d3c09 ('soundwire: select REGMAP_SOUNDWIRE') Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Kconfig | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/soundwire/Kconfig b/drivers/soundwire/Kconfig index 84876a74874f..d382d80d2fe1 100644 --- a/drivers/soundwire/Kconfig

Re: [alsa-devel] [RFC PATCH 6/7] soundwire: cadence_master: add debugfs register dump

2019-05-06 Thread Pierre-Louis Bossart
+void sdw_cdns_debugfs_init(struct sdw_cdns *cdns, struct dentry *root) +{ + debugfs_create_file("cdns-registers", 0400, root, cdns, &cdns_reg_fops); +} +EXPORT_SYMBOL(sdw_cdns_debugfs_init); Don't wrap debugfs calls with export symbol without using EXPORT_SYMBOL_GPL() or you will get g

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

2019-05-06 Thread Pierre-Louis Bossart
+static void intel_debugfs_init(struct sdw_intel *sdw) +{ + struct dentry *root = sdw_bus_debugfs_get_root(sdw->cdns.bus.debugfs); + + if (!root) + return; + + sdw->fs = debugfs_create_dir("intel-sdw", root); + if (IS_ERR_OR_NULL(sdw->fs)) { Again, you do

Re: [alsa-devel] [RFC PATCH 5/7] soundwire: add debugfs support

2019-05-06 Thread Pierre-Louis Bossart
@@ -136,6 +139,8 @@ static int sdw_delete_slave(struct device *dev, void *data) void sdw_delete_bus_master(struct sdw_bus *bus) { sdw_sysfs_bus_exit(bus); + if (bus->debugfs) + sdw_bus_debugfs_exit(bus->debugfs); No need to check, just call it. That was on my

Re: [alsa-devel] [RFC PATCH 2/7] soundwire: add Slave sysfs support

2019-05-06 Thread Pierre-Louis Bossart
+static struct attribute_group sdw_slave_dev_attr_group = { + .attrs = slave_dev_attrs, +}; + +const struct attribute_group *sdw_slave_dev_attr_groups[] = { + &sdw_slave_dev_attr_group, + NULL +}; ATTRIBUTE_GROUP()? yes. + +int sdw_sysfs_slave_init(struct sdw_slave *

Re: [alsa-devel] [PATCH] ASoC: Intel: bytcr_5640.c:Refactored if statement and removed buffer

2019-05-06 Thread Pierre-Louis Bossart
static int byt_rt5640_suspend(struct snd_soc_card *card) @@ -1268,28 +1266,12 @@ static int snd_byt_rt5640_mc_probe(struct platform_device *pdev) log_quirks(&pdev->dev); if ((byt_rt5640_quirk & BYT_RT5640_SSP2_AIF2) || - (byt_rt5640_quirk & BYT_RT5640_SSP0_AIF2)) { -

Re: [alsa-devel] [PATCH] ASoC: Intel: cht_bsw_rt5645.c: Remove buffer and snprintf calls

2019-05-06 Thread Pierre-Louis Bossart
On 5/4/19 10:16 AM, Nariman wrote: From: Damian van Soelen The snprintf calls filling cht_rt5645_cpu_dai_name / cht_rt5645_codec_aif_name always fill them with the same string ("ssp0-port" resp "rt5645-aif2") so instead of keeping these buffers around and making the cpu_dai_name / codec_aif_nam

Re: [PATCH] ASoC: Intel: bytcr_rt5651.c: remove string buffers 'byt_rt5651_cpu_dai_name' and 'byt_rt5651_cpu_dai_name'

2019-05-06 Thread Pierre-Louis Bossart
On 5/4/19 10:16 AM, Nariman wrote: From: Jordy Ubink The snprintf calls filling byt_rt5651_cpu_dai_name / byt_rt5651_cpu_dai_name always fill them with the same string (ssp0-port" resp "rt5651-aif2"). So instead of keeping these buffers around and making the cpu_dai_name / codec_dai_name poin

Re: [PATCH v2 2/2] regmap: soundwire: fix Kconfig select/depend issue

2019-05-06 Thread Pierre-Louis Bossart
On 5/5/19 11:40 PM, Mark Brown wrote: On Fri, May 03, 2019 at 09:32:53AM -0500, Pierre-Louis Bossart wrote: As I mentioned it'll compile the bus even if there is no user for it, but it's your call: alignment or optimization. You can have both. Alignment is a requirement. If y

Re: [alsa-devel] [PATCH] ASoC: Intel: bytcr_5640.c:Refactored if statement and removed buffer

2019-05-06 Thread Pierre-Louis Bossart
On 5/6/19 10:43 AM, Hans de Goede wrote: Hi Pierre-Louis, Nariman and the author authors of these patches are a group of students doing some kernel work for me and this is a warm-up assignment for them to get used to the kernel development process. On 06-05-19 17:21, Pierre-Louis Bossart

<    1   2   3   4   5   6   7   8   9   10   >