Re: [PATCH v3 1/5] soundwire: add static port mapping support

2021-03-12 Thread Pierre-Louis Bossart
On 3/12/21 5:39 AM, Srinivas Kandagatla wrote: Some of the SoundWire device ports are statically mapped to Controller ports during design, however there is no way to expose this information to the controller. Controllers like Qualcomm ones use this info to setup static bandwidth parameters for

[PATCH 00/23] ASoC: codecs: remove cppcheck warnings

2021-03-12 Thread Pierre-Louis Bossart
Lots of small fixes in various codec drivers that should have no functional impact. Pierre-Louis Bossart (23): ASoC: ab8500-codec: remove useless structure ASoC: ad1836: remove useless return ASoC: adau1977: remove useless return ASoC: cros_ec_codec: remove null pointer dereference

[PATCH 01/23] ASoC: ab8500-codec: remove useless structure

2021-03-12 Thread Pierre-Louis Bossart
c/codecs/ab8500-codec.c:120:20: style: struct member 'ab8500_codec_drvdata_dbg::vdmic' is never used. [unusedStructMember] struct regulator *vdmic; ^ The structure is never used, remove. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/ab8500-codec.c

[PATCH 02/23] ASoC: ad1836: remove useless return

2021-03-12 Thread Pierre-Louis Bossart
will return/exit if (ret) ^ sound/soc/codecs/ad1836.c:311:9: note: Returning identical expression 'ret' return ret; ^ Likely copy/paste between adc and dac cases. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/ad1836.c | 2 -- 1 file changed, 2 deletions(-)

[PATCH 05/23] ASoC: cx2070x: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
c:831:26: note: reg1.r.tx_data_one_line is overwritten reg1.r.tx_data_one_line = 1; ^ Likely copy/paste. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/cx2072x.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/sound/soc/codecs/cx2072x.c b/sound/soc/co

[PATCH 03/23] ASoC: adau1977: remove useless return

2021-03-12 Thread Pierre-Louis Bossart
ion will return/exit if (ret) ^ sound/soc/codecs/adau1977.c:242:9: note: Returning identical expression 'ret' return ret; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/adau1977.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sound/soc/codecs/adau1977.c

[PATCH 04/23] ASoC: cros_ec_codec: remove null pointer dereference warning

2021-03-12 Thread Pierre-Louis Bossart
nt, but this is likely to fool other static analysis tools. Add a test to avoid doing the memcpy if the pointer is NULL or the size is zero. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/cros_ec_codec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/code

[PATCH 08/23] ASoC: hdac_hdmi: remove useless initializations

2021-03-12 Thread Pierre-Louis Bossart
Cppcheck complains a lot about possible null pointer dereferences but it's again a case of useless initializations to NULL. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/hdac_hdmi.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sound/soc/c

[PATCH 06/23] ASoC: cx2070x: remove duplicate else branch

2021-03-12 Thread Pierre-Louis Bossart
lse'. } else { ^ sound/soc/codecs/cx2072x.c:1436:10: note: Found duplicate branches for 'if' and 'else'. } else if (type & 0x4) { ^ The last two branches do the same thing and can be collapsed together. Signed-off-by: Pierre-Louis Bossart --- sound/s

[PATCH 09/23] ASoC: hdac_hdmi: align function arguments

2021-03-12 Thread Pierre-Louis Bossart
t snd_soc_dai *dai, int device, ^ sound/soc/codecs/hdac_hdmi.h:5:54: note: Function 'hdac_hdmi_jack_init' argument 2 names different: declaration 'pcm' definition 'device'. int hdac_hdmi_jack_init(struct snd_soc_dai *dai, int pcm,

[PATCH 10/23] ASoC: hdmi-codec: remove useless initialization

2021-03-12 Thread Pierre-Louis Bossart
lized struct hdmi_codec_daifmt *cf = dai->playback_dma_data; ^ sound/soc/codecs/hdmi-codec.c:745:5: note: cf is overwritten cf = dai->playback_dma_data; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/hdmi-codec.c | 2 +- 1 file changed, 1 inser

[PATCH 07/23] ASoC: da7219-aad: remove useless initialization

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/da7219-aad.c:118:22: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int report = 0, ret = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/da7219-aad.c | 2 +- 1 file changed, 1

[PATCH 11/23] ASoC: hdmi-codec: remove unused spk_mask member

2021-03-12 Thread Pierre-Louis Bossart
fix cppcheck warning: sound/soc/codecs/hdmi-codec.c:25:16: style: struct member 'hdmi_codec_channel_map_table::spk_mask' is never used. [unusedStructMember] unsigned long spk_mask; /* speaker position bit mask */ ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/c

[PATCH 16/23] ASoC: pcm1681: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/pcm1681.c:87:8: style: Variable 'i' is assigned a value that is never used. [unreadVariable] int i = 0, val = -1, enable = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/pcm1681.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 14/23] ASoC: mt6359: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
lue that is never used. [unreadVariable] int i = 0, stage = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/mt6359.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/mt6359.c b/sound/soc/codecs/mt6359.c index 6f4b1da52082..b9

[PATCH 13/23] ASoC: mt6358: remove useless initializations

2021-03-12 Thread Pierre-Louis Bossart
6359.c:274:19: style: Variable 'stage' is assigned a value that is never used. [unreadVariable] int i = 0, stage = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/mt6358.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/c

[PATCH 12/23] ASoC: max98090: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/max98090.c:1835:16: style: Variable 'test_diff' is assigned a value that is never used. [unreadVariable] int test_diff = INT_MAX; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/max98090.c | 2 +- 1 file changed, 1 inser

[PATCH 15/23] ASoC: nau8825: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/nau8825.c:2113:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/nau8825.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH 17/23] ASoC: sigmadsp: align function prototype

2021-03-12 Thread Pierre-Louis Bossart
sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int rate); ^ sound/soc/codecs/sigmadsp.c:736:60: note: Function 'sigmadsp_setup' argument 2 names different: declaration 'rate' definition 'samplerate'. int sigmadsp_setup(struct sigmadsp *sigmadsp, unsigned int samplerate)

[PATCH 18/23] ASoC: sti-sas: remove unused struct members

2021-03-12 Thread Pierre-Louis Bossart
' is never used. [unusedStructMember] struct reset_control *rst; ^ sound/soc/codecs/sti-sas.c:61:25: style: struct member 'sti_spdif_audio::field' is never used. [unusedStructMember] struct regmap_field **field; ^ Signed-off-by: Pierre-Louis Boss

[PATCH 19/23] ASoC: tas2562: remove useless assignment

2021-03-12 Thread Pierre-Louis Bossart
x27;s remove it. Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/tas2562.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sound/soc/codecs/tas2562.c b/sound/soc/codecs/tas2562.c index 19965fabe949..ba23f9f07f04 100644 --- a/sound/soc/codecs/tas2562.c +++ b/sound/soc/codecs/tas2

[PATCH 22/23] ASoC: tlv320dac33: clarify expression

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/tlv320dac33.c:1074:43: style: Clarify calculation precedence for '%' and '?'. [clarifyCalculation] (dac33->alarm_threshold % period_size ? ^ Signed-off-by: Pierre-Louis Bossart --- sound/s

[PATCH 21/23] ASoC: tas2770: remove useless initialization

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/tas2770.c:109:10: style: Variable 'ret' is assigned a value that is never used. [unreadVariable] int ret = 0; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/tas2770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) di

[PATCH 20/23] ASoC: tas2562: remove warning on return value

2021-03-12 Thread Pierre-Louis Bossart
will return/exit if (ret) ^ sound/soc/codecs/tas2562.c:530:9: note: Returning identical expression 'ret' return ret; ^ Fix with return 0 Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs/tas2562.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 23/23] ASoC: tscs454: remove useless test on PLL disable

2021-03-12 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/codecs/tscs454.c:730:37: style: Same value in both branches of ternary operator. [duplicateValueTernary] val = pll1 ? FV_PLL1CLKEN_DISABLE : FV_PLL2CLKEN_DISABLE; ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/codecs

Re: [PATCH] ASoC: Intel: sof_rt5682: Add rt1015p speaker amp support

2021-03-15 Thread Pierre-Louis Bossart
I am not a big fan of the code partition you've selected. +void sof_rt1015p_set_share_en_spk(void) +{ + /* Two amps share one en pin so there is only one device in acpi +* table +*/ + rt1015p_quirk |= RT1015P_SHARE_EN_SPK; +} This is a function now used in the machi

Re: [PATCH v3] ASoC: amd: add support for rt5682 codec in machine driver

2021-03-15 Thread Pierre-Louis Bossart
+static int rt5682_clk_enable(struct snd_pcm_substream *substream) +{ + int ret; + struct snd_soc_pcm_runtime *rtd = asoc_substream_to_rtd(substream); + + /* +* Set wclk to 48000 because the rate constraint of this driver is +* 48000. ADAU7002 spec: "The ADAU70

Re: [PATCH v2] ASoC: Intel: Skylake: Check the kcontrol against NULL

2021-01-20 Thread Pierre-Louis Bossart
On 1/20/21 9:49 AM, Łukasz Majczak wrote: Hi Pierre, Is there anything more to do to get the ACK for this patch? Adding Cezary and Amadeusz for feedback, I can't pretend having any sort of knowledge on the Skylake driver internals and topology usage. Best regards, Lukasz wt., 12 sty 20

Re: [RFC PATCH 1/2] soundwire: add support for static port mapping

2021-01-20 Thread Pierre-Louis Bossart
On 1/20/21 12:01 PM, Srinivas Kandagatla wrote: Some of the soundwire controllers can have static functions assigned to each port, like some ports can only do PCM or PDM. This is the situation with some of the Qualcomm Controllers. In such cases its not correct to assign/map any free port on

Re: [PATCH V2] ASoC: soc-core: Prevent warning if no DMI table is present

2021-03-10 Thread Pierre-Louis Bossart
On 3/10/21 7:35 AM, Mark Brown wrote: On Tue, Mar 09, 2021 at 01:41:45PM -0600, Pierre-Louis Bossart wrote: The problem is that the cards are platform devices created by the parent (which itself may be a PCI or ACPI device) and have nothing to do with ACPI. Could we flip the logic and

Re: [PATCH v2 2/5] soundwire: qcom: update port map allocation bit mask

2021-03-10 Thread Pierre-Louis Bossart
On 3/9/21 8:15 AM, Srinivas Kandagatla wrote: currently the internal bitmask used for allocating ports starts with offset 0. This is bit confusing as data port numbers on Qualcomm controller are valid from 1 to 14. So adjust this bit mask accordingly, this will also help while adding static po

Re: [PATCH v2 3/5] soundwire: qcom: add static port map support

2021-03-10 Thread Pierre-Louis Bossart
list_for_each_entry(m_rt, &bus->m_rt_list, bus_node) { @@ -473,8 +475,13 @@ static int qcom_swrm_compute_params(struct sdw_bus *bus) } list_for_each_entry(s_rt, &m_rt->slave_rt_list, m_rt_node) { + slave = s_rt->slave;

Re: [PATCH V2] ASoC: soc-core: Prevent warning if no DMI table is present

2021-03-10 Thread Pierre-Louis Bossart
On 3/10/21 10:37 AM, Takashi Iwai wrote: On Wed, 10 Mar 2021 17:18:14 +0100, Mark Brown wrote: On Wed, Mar 10, 2021 at 09:44:07AM -0600, Pierre-Louis Bossart wrote: On 3/10/21 7:35 AM, Mark Brown wrote: Just change it to a system level check for ACPI, checking for OF would leave

Re: [PATCH V2] ASoC: soc-core: Prevent warning if no DMI table is present

2021-03-10 Thread Pierre-Louis Bossart
On 3/10/21 10:52 AM, Mark Brown wrote: On Wed, Mar 10, 2021 at 10:41:18AM -0600, Pierre-Louis Bossart wrote: would this work? if (!IS_ENABLED(CONFIG_DMI)) return 0; Build time dependencies aren't going to help anything, arm64 (and to my understanding some future x86 sy

Re: [PATCH V2] ASoC: soc-core: Prevent warning if no DMI table is present

2021-03-10 Thread Pierre-Louis Bossart
Build time dependencies aren't going to help anything, arm64 (and to my understanding some future x86 systems, LynxPoint IIRC) supports both DT and ACPI and so you have kernels built with support for both. well, that's what I suggested initially: if (is_of_node(card->dev->fwnode))

[PATCH] ASoC: soc-core: fix DMI handling

2021-03-10 Thread Pierre-Louis Bossart
ASoC core. Fixes: c014170408bc ("ASoC: soc-core: Prevent warning if no DMI table is present") Signed-off-by: Pierre-Louis Bossart --- drivers/firmware/dmi_scan.c | 1 + sound/soc/soc-core.c| 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/firmware/

[PATCH 0/4] ASoC: mediatek: remove cppcheck warnings

2021-03-10 Thread Pierre-Louis Bossart
There should be no functionality change, this patchset only fixes shadowed variables, prototypes and removes a useless assignment. Pierre-Louis Bossart (4): ASoC: mediatek: mtk-btcvsd: remove useless assignment ASoC: mediatek: mt2701: align function prototype ASoC: mediatek: mt2701: rename

[PATCH 1/4] ASoC: mediatek: mtk-btcvsd: remove useless assignment

2021-03-10 Thread Pierre-Louis Bossart
cppcheck warning: sound/soc/mediatek/common/mtk-btcvsd.c:783:34: style: Variable 'avail' is assigned a value that is never used. [unreadVariable] int written_size = count, avail = 0, cur_write_idx, write_size, cont; ^ Signed-off-by: Pierre-Lou

[PATCH 3/4] ASoC: mediatek: mt2701: rename shadowed array

2021-03-10 Thread Pierre-Louis Bossart
static const struct mtk_base_memif_data memif_data[MT2701_MEMIF_NUM] = { ^ sound/soc/mediatek/mt2701/mt2701-afe-pcm.c:431:36: note: Shadow variable const struct mtk_base_memif_data *memif_data; ^ Signed-off-by: Pierre-Louis Bos

[PATCH 4/4] ASoC: mediatek: mt8173: rename local irq variable

2021-03-10 Thread Pierre-Louis Bossart
in the same function... Signed-off-by: Pierre-Louis Bossart --- sound/soc/mediatek/mt8173/mt8173-afe-pcm.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c b/sound/soc/mediatek/mt8173/mt8173-afe-pcm.c index 685f4074b4e0..6350390414d4 10

[PATCH 2/4] ASoC: mediatek: mt2701: align function prototype

2021-03-10 Thread Pierre-Louis Bossart
note: Function 'mt2701_afe_disable_i2s' argument 2 names different: declaration 'path' definition 'i2s_path'. struct mt2701_i2s_path *i2s_path, ^ Signed-off-by: Pierre-Louis Bossart --- sound/soc/mediatek/mt2701/mt2701-afe-clock-ctrl.h

[PATCH] iwlwifi: fix ARCH=i386 compilation warnings

2021-03-01 Thread Pierre-Louis Bossart
An unsigned long variable should rely on '%lu' format strings, not '%zd' Fixes: a1a6a4cf49ece ("iwlwifi: pnvm: implement reading PNVM from UEFI") Signed-off-by: Pierre-Louis Bossart --- warnings found with v5.12-rc1 and next-20210301 drivers/net/wireless/intel

Re: [PATCH 2/3] soundwire: qcom: add auto enumeration support

2021-03-02 Thread Pierre-Louis Bossart
+    if (!val1 && !val2) +    break; + +    addr = buf2[1] | (buf2[0] << 8) | (buf1[3] << 16) | +    ((u64)buf1[2] << 24) | ((u64)buf1[1] << 32) | +    ((u64)buf1[0] << 40); + +    sdw_extract_slave_id(bus, addr, &id); +    /* Now compare with entries */

Re: [PATCH v2 1/5] soundwire: qcom: add support to missing transport params

2021-03-02 Thread Pierre-Louis Bossart
  for (i = 0; i < nports; i++) {   ctrl->pconfig[i].si = si[i];   ctrl->pconfig[i].off1 = off1[i];   ctrl->pconfig[i].off2 = off2[i];   ctrl->pconfig[i].bp_mode = bp_mode[i]; +    ctrl->pconfig[i].hstart = hstart[i]; +    ctrl->pconfig[i].hstop = hsto

Re: [PATCH v3 2/4] ALSA: hda/cirrus: Add support for CS8409 HDA bridge and CS42L42 companion codec.

2021-03-08 Thread Pierre-Louis Bossart
+/* Enable I2C clocks */ +static void cs8409_enable_i2c_clock(struct hda_codec *codec, unsigned int flag) +{ + unsigned int retval = 0; + unsigned int newval = 0; initializations not needed + retval = cs_vendor_coef_get(codec, 0x0); + newval = (flag) ? (retval | 0x8)

Re: [PATCH v3 3/4] ALSA: hda/cirrus: Add jack detect interrupt support from CS42L42 companion codec.

2021-03-08 Thread Pierre-Louis Bossart
@@ -38,6 +39,15 @@ struct cs_spec { /* for MBP SPDIF control */ int (*spdif_sw_put)(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol); + + unsigned int cs42l42_hp_jack_in:1; + unsigned int cs42l42_mic_jack_in:1; + +

Re: [PATCH v3 4/4] ALSA: hda/cirrus: Add Headphone and Headset MIC Volume Control

2021-03-08 Thread Pierre-Louis Bossart
On 3/6/21 5:19 AM, Vitaly Rodionov wrote: From: Stefan Binding CS8409 does not support Volume Control for NIDs 0x24 (the Headphones), or 0x34 (The Headset Mic). However, CS42L42 codec does support gain control for both. Volume Control for both We can add support for Volume Controls, by w

Re: [PATCH] soundwire: bus: Fix device found flag correctly

2021-03-08 Thread Pierre-Louis Bossart
ot on device list"? if yes, the first part is ambiguous in its wording, the enumeration completes by programming a device number. At this point the device is only 'attached'. The fix is correct otherwise, please add my tag if you change the commit message in a v2. Revie

Re: [PATCH v4 1/2] platform/x86: dell-privacy: Add support for Dell hardware privacy

2021-03-08 Thread Pierre-Louis Bossart
module_param(force_rfkill, bool, 0444); MODULE_PARM_DESC(force_rfkill, "enable rfkill on non whitelisted models"); + spurious line change I just want to make them separate with more space . If it cause concern, I will remote the line in V5. it's fine to improve spaces/alignment, j

Re: [PATCH v3 8/9] soundwire: qcom: add auto enumeration support

2021-03-08 Thread Pierre-Louis Bossart
+static int qcom_swrm_enumerate(struct sdw_bus *bus) +{ + struct qcom_swrm_ctrl *ctrl = to_qcom_sdw(bus); + struct sdw_slave *slave, *_s; + struct sdw_slave_id id; + u32 val1, val2; + bool found; + u64 addr; + int i; + char *buf1 = (char *)&val1,

Re: [RFC PATCH 1/2] soundwire: add support for static port mapping

2021-01-21 Thread Pierre-Louis Bossart
Port allocations are something like this: RX: (Simple) Port 1 -> HPH L/R Port 2 -> CLASS H Amp Port 3 -> COMP Port 4 -> DSD. TX: (This get bit more complicated) Port 1: PCM Port 2: ADC 1 & 2 Port 3: ADC 3 & 4 Port 4: DMIC-0, DMIC-1, DIMC-2 , DMIC-3 and MBHC Port 5: DMIC-4, DMIC-5, DMIC-6 and

Re: [PATCH] soundwire: debugfs: use controller id instead of link_id

2021-01-21 Thread Pierre-Louis Bossart
On 1/21/21 6:03 AM, Srinivas Kandagatla wrote: On 19/01/2021 19:09, Pierre-Louis Bossart wrote: currently we have /sys/kernel/debug/soundwire/master-* Are you suggesting that we have something like this: /sys/kernel/debug/soundwire/xyz-controller/master- ?? Yes this is what I was

Re: [RFC PATCH 1/2] soundwire: add support for static port mapping

2021-01-21 Thread Pierre-Louis Bossart
On 1/21/21 9:41 AM, Srinivas Kandagatla wrote: On 21/01/2021 14:56, Pierre-Louis Bossart wrote: Port allocations are something like this: RX: (Simple) Port 1 -> HPH L/R Port 2 -> CLASS H Amp Port 3 -> COMP Port 4 -> DSD. TX: (This get bit more complicated) Port 1: PCM P

Re: [PATCH] soundwire: debugfs: use controller id instead of link_id

2021-01-21 Thread Pierre-Louis Bossart
diff --git a/drivers/soundwire/debugfs.c b/drivers/soundwire/debugfs.c index b6cad0d59b7b..f22868614f09 100644 --- a/drivers/soundwire/debugfs.c +++ b/drivers/soundwire/debugfs.c @@ -19,13 +19,14 @@ void sdw_bus_debugfs_init(struct sdw_bus *bus)     return;     /* create the

Re: [RFC PATCH 1/2] soundwire: add support for static port mapping

2021-01-21 Thread Pierre-Louis Bossart
[SLAVE]---[MASTER] NA-Port 1: PCM Port 1-Port 2: ADC 1 & 2 Port 2-Port 3: ADC 3 & 4 Port 3-Port 4: DMIC-0, DMIC-1, DIMC-2 , DMIC-3 and MBHC Port 4-Port 5: DMIC-4, DMIC-5, DMIC-6 and DMIC-7 Mapping is still static however Number of ports selectio

Re: [RFC PATCH 1/2] soundwire: add support for static port mapping

2021-01-22 Thread Pierre-Louis Bossart
On 1/22/21 1:05 AM, Srinivas Kandagatla wrote: On 21/01/2021 21:30, Pierre-Louis Bossart wrote: Am looking at intel_hw_params(). Isn't sdw_stream_add_master() called for every dai in the dai link. Yes, that's correct, but again a dai may use one or more ports. if you defined

Re: [RFC PATCH 1/2] soundwire: add support for static port mapping

2021-01-22 Thread Pierre-Louis Bossart
No, what I was saying is that you need to define multiple streams e.g. - headset capture (configured with or without click suppression) - mic capture (configured with AMICs or DMICs) - playback (or possibly different endpoint specific streams depending on whether concurrency between endpoint i

Re: [PATCH] ASoC: amd: add support for rt5682 codec in machine driver

2021-03-09 Thread Pierre-Louis Bossart
+++ b/sound/soc/amd/Kconfig @@ -5,14 +5,15 @@ config SND_SOC_AMD_ACP This option enables ACP DMA support on AMD platform. config SND_SOC_AMD_CZ_DA7219MX98357_MACH - tristate "AMD CZ support for DA7219 and MAX9835" + tristate "AMD CZ support for DA7219, RT5682 and MAX

Re: [PATCH V2] ASoC: soc-core: Prevent warning if no DMI table is present

2021-03-09 Thread Pierre-Louis Bossart
On 3/3/21 5:55 AM, Jon Hunter wrote: Many systems do not use ACPI and hence do not provide a DMI table. On non-ACPI systems a warning, such as the following, is printed on boot. WARNING KERN tegra-audio-graph-card sound: ASoC: no DMI vendor name! The variable 'dmi_available' is not exporte

Re: [alsa-devel] [PATCH v2 5/6] sound/usb: pcm changes to use media token api

2014-10-22 Thread Pierre-Louis Bossart
On 10/21/14, 11:08 AM, Devin Heitmueller wrote: Sorry, I'm not convinced by that. If the device has to be controlled exclusively, the right position is the open/close. Otherwise, the program cannot know when it becomes inaccessible out of sudden during its operation. I can say that I've defin

Re: [alsa-devel] [PATCH 00/11] Add AXD Audio Processing IP driver

2014-10-29 Thread Pierre-Louis Bossart
On 10/28/14, 8:18 AM, Qais Yousef wrote: On 10/28/2014 11:55 AM, Clemens Ladisch wrote: Qais Yousef wrote: AXD Audio Processing IP performs audio decoding, encoding, mixing, equalisation, synchronisation and playback. What exactly do you mean with "synchronisation" and "playback"? Synchronis

Re: [alsa-devel] [PATCH 2/2] ALSA: compress: Pass id string to snd_compress_new

2015-11-25 Thread Pierre-Louis Bossart
@@ -689,7 +689,13 @@ int snd_soc_new_compress(struct snd_soc_pcm_runtime *rtd, int num) compr->ops->copy = soc_compr_copy; mutex_init(&compr->lock); - ret = snd_compress_new(rtd->card->snd_card, num, direction, compr); + + snprintf(new_name, sizeof(new_name)

Re: [alsa-devel] [PATCH] ASoC: rt5640: add master clock handling for rt5640

2016-02-26 Thread Pierre-Louis Bossart
On 2/25/16 7:08 PM, Mark Brown wrote: On Wed, Feb 24, 2016 at 10:10:05AM -0600, Pierre-Louis Bossart wrote: On 2/23/16 9:32 PM, Mark Brown wrote: That said we really do need x86 to transition to use the clock API in order to integrate with external devices, where the machine driver does

Re: [alsa-devel] [PATCH] ASoC: rt5640: add master clock handling for rt5640

2016-02-23 Thread Pierre-Louis Bossart
On 2/22/16 7:26 PM, Sugar Zhang wrote: enable/disable master clock when codec is active or not. Signed-off-by: Sugar Zhang --- Documentation/devicetree/bindings/sound/rt5640.txt | 3 +++ sound/soc/codecs/rt5640.c | 31 ++ sound/soc/codecs/rt564

Re: [alsa-devel] [PATCH] ASoC: rt5640: add master clock handling for rt5640

2016-02-24 Thread Pierre-Louis Bossart
On 2/23/16 9:32 PM, Mark Brown wrote: On Wed, Feb 24, 2016 at 12:08:31AM +0100, Heiko Stuebner wrote: Am Dienstag, 23. Februar 2016, 08:50:04 schrieb Pierre-Louis Bossart: This patch assumes that the information on mclk comes from DeviceTree. The mclk may also be enabled/disabled in the

Re: [alsa-devel] Question on Compressed offload session

2014-11-13 Thread Pierre-Louis Bossart
On 11/12/14, 9:02 PM, gsant...@codeaurora.org wrote: Hi All, The Question is for the compressed offload session. For a generic codec driver during the startup function it will set some of the hw_constraints rule similarly like this. snd_pcm_hw_constraint_list(substream->runtime, 0,

Re: [alsa-devel] Question on Compressed offload session

2014-11-14 Thread Pierre-Louis Bossart
On 11/13/14, 10:08 PM, gsant...@codeaurora.org wrote: On 11/12/14, 9:02 PM, gsant...@codeaurora.org wrote: Hi All, The Question is for the compressed offload session. For a generic codec driver during the startup function it will set some of the hw_constraints rule similarly like this.

Re: [alsa-devel] [PATCH] ASoC: bdw-rt5677: channel constraint support

2019-09-06 Thread Pierre-Louis Bossart
On 9/5/19 8:24 PM, Brent Lu wrote: BDW boards using this machine driver supports only stereo capture and playback. Implement a constraint to enforce it. Humm, can you clarify what problem/error this patch fixes? There are already constraints on the hsw_dais[] where the channels are stereo onl

Re: [alsa-devel] [PATCH] ASoC: bdw-rt5677: channel constraint support

2019-09-09 Thread Pierre-Louis Bossart
be obtuse but we should only change older platforms when there is evidence that a change is needed. -Pierre Regards, Brent Lu -Original Message- From: Pierre-Louis Bossart [mailto:pierre-louis.boss...@linux.intel.com] Sent: Friday, September 6, 2019 10:21 PM To: Lu, Brent ; alsa-de...@a

Re: [PATCH] ASoC: SOF: Intel: work around snd_hdac_aligned_read link failure

2019-09-09 Thread Pierre-Louis Bossart
On 9/9/19 2:51 PM, Arnd Bergmann wrote: When CONFIG_SND_HDA_ALIGNED_MMIO is selected by another driver (i.e. Tegra) that selects CONFIG_SND_HDA_CORE as a loadable module, but SND_SOC_SOF_HDA_COMMON is built-in, we get a link failure from some functions that access the hda register: sound/soc/sof

Re: [alsa-devel] [PATCH] ASoC: bdw-rt5677: channel constraint support

2019-09-10 Thread Pierre-Louis Bossart
I also don't see any case where we support 4 channels in any broadwell machine driver? It's the bdw-rt5650.c which only exists in chrome's 3.14 branch supporting Buddy project. They submitted the machine driver but not yet merged. https://patchwork.kernel.org/patch/11050985/ So again can y

Re: [alsa-devel] mmotm 2019-08-27-20-39 uploaded (sound/hda/intel-nhlt.c)

2019-08-29 Thread Pierre-Louis Bossart
On 8/29/19 10:08 AM, Takashi Iwai wrote: On Thu, 29 Aug 2019 00:45:05 +0200, Pierre-Louis Bossart wrote: I just checked with Mark Brown's for-next tree 8aceffa09b4b9867153bfe0ff6f40517240cee12 and things are fine in i386 mode, see below. next-20190828 also works fine for me in i386

Re: [alsa-devel] [PATCH v5 4/4] ASoC: codecs: add wsa881x amplifier support

2019-08-29 Thread Pierre-Louis Bossart
to have udelay explicitly set here instead of in the caller below for consistency with the comments. + wsa881x_ramp_pa_gain(comp, min_gain, max_gain, 1000); But apart from that I didn't see anything blatantly wrong, so Reviewed-by: Pierre-Louis Bossart

Re: [alsa-devel] [PATCH 00/17] soundwire: fixes for 5.4

2019-08-21 Thread Pierre-Louis Bossart
On 8/21/19 4:07 AM, Vinod Koul wrote: On 05-08-19, 19:55, Pierre-Louis Bossart wrote: This series provides an update on the initial RFC. Debugfs and Intel updates will be provided in follow-up patches. The order of patches was changed since the RFC so detailed change logs are provided below

[PATCH v2 0/3] ASoC: SOF: initial support for i.MX8

2019-08-21 Thread Pierre-Louis Bossart
The reviews for these patches took place already on mailing lists and GitHub, and the code is already integrated in the SOF tree (along with dependencies already accepted in the i.MX tree) Changes since v1: As agreed with Daniel and Mark, this v2 series includes the DT bindings (Fixed 'compatible'

[PATCH v2 1/3] dt-bindings: dsp: fsl: Add DSP core binding support

2019-08-21 Thread Pierre-Louis Bossart
From: Daniel Baluta This describes the DSP device tree node. Signed-off-by: Daniel Baluta Reviewed-by: Rob Herring Signed-off-by: Pierre-Louis Bossart --- .../devicetree/bindings/dsp/fsl,dsp.yaml | 88 +++ 1 file changed, 88 insertions(+) create mode 100644

[PATCH v2 3/3] ASoC: SOF: imx: Add i.MX8 HW support

2019-08-21 Thread Pierre-Louis Bossart
From: Daniel Baluta Add support for the audio DSP hardware found on NXP i.MX8 platform. Signed-off-by: Daniel Baluta Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/Kconfig | 1 + sound/soc/sof/Makefile | 1 + sound/soc/sof/imx/Kconfig | 22 +++ sound/soc/sof/imx

[PATCH v2 2/3] ASoC: SOF: Add OF DSP device support

2019-08-21 Thread Pierre-Louis Bossart
From: Daniel Baluta Add support for device tree based SOF DSP devices. Signed-off-by: Daniel Baluta Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/Kconfig | 10 +++ sound/soc/sof/Makefile | 3 + sound/soc/sof/sof-of-dev.c | 143 + 3

[PATCH v3 1/4] soundwire: add debugfs support

2019-08-21 Thread Pierre-Louis Bossart
Vinod Koul, Sanyog Kale, Shreyas Nc and Hardik Shah. Reviewed-by: Greg Kroah-Hartman Acked-by: Sanyog Kale Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/Makefile| 4 + drivers/soundwire/bus.c | 6 ++ drivers/soundwire/bus.h | 16 drivers/soundwire/bus_typ

[PATCH v3 3/4] soundwire: intel: add debugfs register dump

2019-08-21 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. Reviewed-by: Greg Kroah-Hartman Acked-by: Sanyog Kale Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire

[PATCH v3 0/4] soundwire: debugfs support for 5.4

2019-08-21 Thread Pierre-Louis Bossart
ts and hardware capabilities) squashed patch 3 Pierre-Louis Bossart (4): soundwire: add debugfs support soundwire: cadence_master: add debugfs register dump soundwire: intel: add debugfs register dump soundwire: intel: handle disabled links drivers/soundwire/Makefile | 4 + drivers/

[PATCH v3 4/4] soundwire: intel: handle disabled links

2019-08-21 Thread Pierre-Louis Bossart
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

[PATCH v3 2/4] soundwire: cadence_master: add debugfs register dump

2019-08-21 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. Reviewed-by: Greg Kroah-Hartman Acked-by: Sanyog Kale Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire

Re: [alsa-devel] [PATCH 0/6] soundwire: inits and PM additions for 5.4

2019-08-21 Thread Pierre-Louis Bossart
On 8/13/19 4:32 PM, Pierre-Louis Bossart wrote: This is an update on the RFC, to be applied after the '[PATCH v2 0/3] soundwire: debugfs support for 5.4' and '[PATCH 00/17] soundwire: fixes for 5.4' series. Total that makes 28 patches submitted for review, broken i

[RFC PATCH 07/11] soundwire: intel: improve .config_stream callback, add .free_stream

2019-08-21 Thread Pierre-Louis Bossart
From: Rander Wang We need the link_id as a parameter for the config callback, and we also need a matching free callback in case any resources need to be released. Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 19

[RFC PATCH 02/11] soundwire: remove DAI_ID_RANGE definitions

2019-08-21 Thread Pierre-Louis Bossart
There is no reason to reserve a range of DAI IDs for SoundWire. This is not scalable and it's better to let the ASoC core allocate the dai->id when registering a component. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 2 -- include/linux/soundwire/sdw.h |

[RFC PATCH 10/11] soundwire: intel: do sdw stream setup in setup function

2019-08-21 Thread Pierre-Louis Bossart
From: Rander Wang The sdw stream is allocated and stored in dai to share the sdw runtime information. Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 57 ++- 1 file changed, 56 insertions(+), 1 deletion

[RFC PATCH 01/11] soundwire: intel: fix intel_register_dai PDI offsets and numbers

2019-08-21 Thread Pierre-Louis Bossart
DIs. Again this was not detected since PDM was not supported earlier. Reported-by: Ranjani Sridharan Signed-off-by: Bard Liao 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/driv

[RFC PATCH 05/11] soundwire: intel: don't filter out PDI0/1

2019-08-21 Thread Pierre-Louis Bossart
smart unless we have to remove the smarts. This patch requires a topology change to use PDIs starting at offset 2 explicitly. Note that there is a known discrepancy between hardware documentation and what ALH stream works in practice, future fixes are likely. Signed-off-by: Pierre-Louis Bo

[RFC PATCH 00/11] soundwire: intel: simplify DAI/PDI handling

2019-08-21 Thread Pierre-Louis Bossart
rts in the code that can be improved, hence the RFC state. Bard Liao (3): soundwire: intel: fix intel_register_dai PDI offsets and numbers soundwire: intel: remove playback/capture stream_name soundwire: cadence_master: improve PDI allocation Pierre-Louis Bossart (3): soundwire: remove DA

[RFC PATCH 11/11] soundwire: intel: free all resources on hw_free()

2019-08-21 Thread Pierre-Louis Bossart
From: Rander Wang Make sure all calls to the SoundWire stream API are done and involve callback Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/drivers

[RFC PATCH 09/11] soundwire: intel: add trigger support in sdw dai driver

2019-08-21 Thread Pierre-Louis Bossart
From: Rander Wang Sdw stream is enabled and disabled in trigger function. Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/drivers/soundwire/intel.c b

[RFC PATCH 08/11] soundwire: intel: add prepare support in sdw dai driver

2019-08-21 Thread Pierre-Louis Bossart
From: Rander Wang It gets sdw runtime information from dai to prepare stream. Signed-off-by: Rander Wang Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire

[RFC PATCH 03/11] soundwire: intel: remove playback/capture stream_name

2019-08-21 Thread Pierre-Louis Bossart
From: Bard Liao We will create dai widget in SOF. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/intel.c | 17 - 1 file changed, 17 deletions(-) diff --git a/drivers/soundwire/intel.c b/drivers/soundwire/intel.c index d5563cfc6549

[RFC PATCH 06/11] soundwire: cadence_master: improve PDI allocation

2019-08-21 Thread Pierre-Louis Bossart
From: Bard Liao PDI number should match dai->id, there is no need to track if a PDI is allocated or not. Signed-off-by: Bard Liao Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 27 ++- drivers/soundwire/cadence_master.h | 4 +--- driv

[RFC PATCH 04/11] soundwire: cadence/intel: simplify PDI/port mapping

2019-08-21 Thread Pierre-Louis Bossart
allow for further simplifications where the PDIs are not dynamically allocated but instead described in a topology file. Signed-off-by: Pierre-Louis Bossart --- drivers/soundwire/cadence_master.c | 110 drivers/soundwire/cadence_master.h | 32 ++- drivers/soundwire/in

[RFC PATCH 4/5] ASoC: SOF: Intel: hda: add SoundWire stream config/free callbacks

2019-08-21 Thread Pierre-Louis Bossart
These callbacks are invoked when a matching hw_params/hw_free() DAI operation takes place, and will result in IPC operations with the SOF firmware. Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/hda.c | 66 +++ 1 file changed, 66 insertions

[RFC PATCH 3/5] ASoC: SOF: Intel: hda: add SoundWire IP support

2019-08-21 Thread Pierre-Louis Bossart
The Core0 needs to be powered before the SoundWire IP is initialized. Call sdw_intel_init/exit and store the context. We only have one context, but depending on the hardware capabilities and BIOS settings may enable multiple SoundWire links. Signed-off-by: Pierre-Louis Bossart --- sound/soc

[RFC PATCH 1/5] ASoC: SOF: IPC: dai-intel: move ALH declarations in header file

2019-08-21 Thread Pierre-Louis Bossart
ALH was inserted in the wrong place during integration, add after DMIC to mirror the file used by SOF firmware. No functional change, just text move in the same file to better track changes, if any. Signed-off-by: Pierre-Louis Bossart --- include/sound/sof/dai-intel.h | 18

[RFC PATCH 2/5] ASoC: SOF: Intel: hda: add helper to initialize SoundWire IP

2019-08-21 Thread Pierre-Louis Bossart
.SNDW field Signed-off-by: Pierre-Louis Bossart --- sound/soc/sof/intel/hda.c | 63 +++ sound/soc/sof/intel/hda.h | 1 + 2 files changed, 64 insertions(+) diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c index c72e9a09eee1..a968890d0754

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