aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2022-07-08ASoC: SOF: ipc4-topology: free memories allocated in sof_ipc4_get_audio_fmtLibin Yang1-4/+44
Free the memories allocated in sof_ipc4_get_audio_fmt in error handling and ipc_free() Fixes: 2cabd02b6090 ("ASoC: SOF: ipc4-topology: Add support for parsing AIF_IN/AIF_OUT widgets") Fixes: abfb536bd116 ("ASoC: SOF: ipc4-topology: Add support for parsing DAI_IN/DAI_OUT widgets") Fixes: 4f838ab20812 ("ASoC: SOF: ipc4-topology: Add support for parsing and preparing pga widgets") Fixes: 4d4ba014ac4b ("ASoC: SOF: ipc4-topology: Add support for parsing mixer widgets") Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Libin Yang <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: SOF: ipc4-topology: check dai->private in ipc_free()Libin Yang1-0/+11
Set the swidget->private or dai->private to NULL after kfree in the error handling in ipc_setup(). The private needs to be set NULL because if ipc_setup() returns error, ipc_free() will be called later. ipc_free() will judge the private is NULL or not to do the clearing. For dai widget, dai->private is allocated and set in dai widget ipc_setup(). So we need to check dai->private is NULL or not in the ipc_free(). Fixes: 2cabd02b6090 ("ASoC: SOF: ipc4-topology: Add support for parsing AIF_IN/AIF_OUT widgets") Fixes: abfb536bd116 ("ASoC: SOF: ipc4-topology: Add support for parsing DAI_IN/DAI_OUT widgets") Fixes: 4f838ab20812 ("ASoC: SOF: ipc4-topology: Add support for parsing and preparing pga widgets") Fixes: 4d4ba014ac4b ("ASoC: SOF: ipc4-topology: Add support for parsing mixer widgets") Reviewed-by: Péter Ujfalusi <[email protected]> Signed-off-by: Libin Yang <[email protected]> Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Update AVS_FW_INIT_TIMEOUT_US declarationCezary Rojewski1-1/+1
To reduce the number of places to update if timeouts would have to change, modify the constant declaration. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Lower UNLOAD_MULTIPLE_MODULES IPC timeoutCezary Rojewski1-1/+1
Module unloading operation performs memory unmapping and the weight of the opration does not different from any other standard IPC. There is no dependency on secondary task like in module loading scenario where larger message timeout is recommended. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Replace hardcodes with SD_CTL_STREAM_RESETCezary Rojewski1-6/+6
Improve readability of CLDMA reset operation by making use of already defined SD_CTL_STREAM_RESET. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Recognize FW_CFG_RESERVEDCezary Rojewski1-0/+1
If exposed by firmware, count RESERVED parameter as known one to avoid dumping noise in kernel logs. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Use helper function to set up DMAAmadeusz Sławiński1-6/+2
dma_set_mask() and dma_set_coherent_mask() can be performed with one call to dma_set_mask_and_coherent(), which slightly reduces amount of code on our side. Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Set max DMA segment sizeAmadeusz Sławiński1-0/+1
Apparently it is possible for code to allocate large buffers which may cause warnings as reported in [1]. This was fixed for HDA, SOF and skylake in patchset [2], fix it also for avs driver. [1] https://github.com/thesofproject/linux/issues/3430 [2] https://lore.kernel.org/all/[email protected]/ Signed-off-by: Amadeusz Sławiński <[email protected]> Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Block IPC channel on suspendCezary Rojewski1-0/+1
To allow for driver's filesystem interfaces e.g.: debugfs, to be touched even when the device is asleep, mark IPC-channel as blocked when the device is suspended. This causes any invocation of said interfaces that do not toggle PM themselves to gracefully fail with "Operation not permitted" message. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Shield LARGE_CONFIG_GETs against zero payload_sizeCezary Rojewski1-0/+9
Some LARGE_CONFIG_GETs are never expected to return payload of size 0. Check for such situation and collapse if met. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Copy only as many RX bytes as necessaryCezary Rojewski2-4/+3
There is no need to copy number of bytes specified by IPC message caller if DSP firmware returned lower number. In consequence, LARGE_CONFIG_GET handler is simplified. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Relax DSP core transition timingsCezary Rojewski1-2/+9
To avoid any false positives when checking CPA after setting SPA, do a short wait. For stall operation, give HW more time to propagate the change before moving on. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Assign I2S gateway when parsing topologyCezary Rojewski1-0/+27
For formatted port - ssp%d - descriptions to have an effect, copier module templates need to be updated with specified port value. This value is later propagated to the firmware when module instances are being instantiated. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: avs: Register HDAudio ext-bus operationsCezary Rojewski2-2/+3
With ASoC representation of HDAudio codec added, update bus initiazation to complete it. Signed-off-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: amd: acp: Add legacy audio driver support for Rembrandt platformV sujith kumar Reddy11-6/+781
Add i2s and dmic support for Rembrandt platform, Add machine support for nau8825, max98360 and rt5682s,rt1019 codec in legacy driver for rembrandt platform. Here codec is in a slave mode. Signed-off-by: V sujith kumar Reddy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: amd: acp: ACP code generic to support newer platformsV sujith kumar Reddy6-46/+86
ADD Generic code to support to newer platforms, add control threshold, irq control macros ,added structure for register offset differences. Signed-off-by: V sujith kumar Reddy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: amd: acp: Remove rt1019_1 codec conf from machine driverV sujith kumar Reddy1-18/+0
Remove rt1019_1 codec configuration which has i2c-10EC1019:01 and i2c-10EC1019:02 codec components, Now Using default i2c-10EC1019:00 and i2c-10EC1019:01 codec components. Signed-off-by: V sujith kumar Reddy <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: sof_cs42l42: add adl_mx98360a_cs4242 board configBrent Lu2-0/+18
This patch adds driver data for adl_mx98360a_cs4242 which supports two max98360a speaker amplifiers on SSP1 and cs42l42 headphone codec on SSP0 running on ADL platform. Signed-off-by: Brent Lu <[email protected]> Acked-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: Intel: sof_cs42l42: support BT offload audioBrent Lu1-4/+71
Add the capability to machine driver of creating DAI Link for BT offload. Although BT offload always uses SSP2 port but we reserve the flexibility to assign the port number in macro. Signed-off-by: Brent Lu <[email protected]> Acked-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: nau8825: Declare 2 channels for DAI of capture streamDavid Lin1-1/+1
The patch is to make driver with flexibility for more platforms support even if the internal design is just one ADC. Besides, many I2S controllers only support 2 channels. Signed-off-by: David Lin <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: amd: Remove duplicated include in acp-es8336.cYang Li1-1/+0
Fix following includecheck warning: ./sound/soc/amd/acp-es8336.c: linux/module.h is included more than once. Signed-off-by: Yang Li <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: add tas2780 DT bindingRaphael-Xu1-0/+72
add tas2780.yaml Signed-off-by: Raphael-Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: add tas2780 driverRaphael-Xu4-0/+774
1.update Kconfig and Makefile 2.add tas2780.c and tas2780.h Signed-off-by: Raphael-Xu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: amd: fix for variable set but not used warningVijendar Mukunda1-0/+3
Fix below kernel warning. >>> sound/soc/amd/acp-es8336.c:200:13: warning: variable 'ret' set but >>> not used [-Wunused-but-set-variable] Signed-off-by: Vijendar Mukunda <[email protected]> Reported-by: kernel test robot <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: amd: drop machine driver remove functionVijendar Mukunda1-6/+0
Drop machine driver remove() function. Signed-off-by: Vijendar Mukunda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: amd: remove unused header file inclusionVijendar Mukunda1-1/+0
Removed unused header file inclusion from Jadeite platform machine driver. Signed-off-by: Vijendar Mukunda <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: amd: acp-es8336: use static variablesPierre-Louis Bossart1-2/+2
Sparse warnings: sound/soc/amd/acp-es8336.c:36:15: error: symbol 'codec_dev' was not declared. Should it be static? sound/soc/amd/acp-es8336.c:37:18: error: symbol 'gpio_pa' was not declared. Should it be static? Signed-off-by: Pierre-Louis Bossart <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: simple-card-utils.c: care Codec2Codec vs DPCM:BEKuninori Morimoto1-0/+4
Current asoc_simple_init_for_codec2codec() adds default Codec2Codec settings if rtd was Codec only. But DPCM:BE also judged as Codec only, because dummy-DAI doesn't have "endianness" (which is key parameter to judge as Codec). This patch ignores setup Codec2Codec settings if it was DPCM:BE case. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: simple-card-utils.c: ignore Codec2Codec setting if it already haveKuninori Morimoto1-0/+4
Audio Graph Card2 setups own Codec2Codec settings, but current simple-card-utils.c will try to setup Codec2Codec default settings if needed, it will overwirtes the settings. This patch ignores default Codec2Codec settings if it already have. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: audio-graph-card2-custom-sample.dtsi: add verbose explanationKuninori Morimoto1-8/+90
audio-graph-card2-custom-sample.dtsi will be used to test Audio-Graph-Card2 behavior. But it is difficult to say that it is easy to understand, because the comment/explanation are not so many. This patch add verbose explanation to it. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: audio-graph-card2.c: remove pre-alloced Codec2Codec spaceKuninori Morimoto3-23/+8
Because Codec2Codec settings becomes optional, we don't need to keep its parameter space when init time. This patch removes its default memory allocation from simple-card-utils.c, and allocate it at audio-graph-card2 ondemand. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: audio-graph-card2.c: make Codec2Codec settings optionalKuninori Morimoto2-16/+23
Current audio-graph-card2 can use Codec2Codec, and having its original parameter (= rate) on DT is mandatory for now. But simple-card-utils.c has asoc_simple_init_for_codec2codec() to setup *default* Codec2Codec settings. This patch makes Audio Graph Card2 Codec2Codec rate settings optional. Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-08ASoC: audio-graph-card2.c: use of_property_read_u32() for rateKuninori Morimoto1-2/+3
Audio Graph Card2 is using of_get_property(), but it should use of_property_read_u32() to getting rate. Otherwise the setting will be strange value. This patch fixup it. Fixes: c3a15c92a67b701 ("ASoC: audio-graph-card2: add Codec2Codec support") Signed-off-by: Kuninori Morimoto <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: Intel: Skylake: Correct the handling of fmt_config flexible arrayPeter Ujfalusi1-12/+25
The struct nhlt_format's fmt_config is a flexible array, it must not be used as normal array. When moving to the next nhlt_fmt_cfg we need to take into account the data behind the ->config.caps (indicated by ->config.size). The logic of the code also changed: it is no longer saves the _last_ fmt_cfg for all found rates. Fixes: bc2bd45b1f7f3 ("ASoC: Intel: Skylake: Parse nhlt and register clock device") Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: Intel: Skylake: Correct the ssp rate discovery in skl_get_ssp_clks()Peter Ujfalusi1-1/+2
The present flag is only set once when one rate has been found to be saved. This will effectively going to ignore any rate discovered at later time and based on the code, this is not the intention. Fixes: bc2bd45b1f7f3 ("ASoC: Intel: Skylake: Parse nhlt and register clock device") Signed-off-by: Peter Ujfalusi <[email protected]> Reviewed-by: Cezary Rojewski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: rt5640: Fix the wrong state of JD1 and JD2Oder Chiou1-8/+22
The patch fixes the wrong state of JD1 and JD2 while the bst1 or bst2 is power on in the HDA JD using. Signed-off-by: Oder Chiou <[email protected]> Reported-by: Sameer Pujar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: Intel: sof_rt5682: fix out-of-bounds array accessBrent Lu1-7/+3
Starting from ADL platform we have four HDMI PCM devices which exceeds the size of sof_hdmi array. Since each sof_hdmi_pcm structure represents one HDMI PCM device, we remove the sof_hdmi array and add a new member hdmi_jack to the sof_hdmi_pcm structure to fix the out-of-bounds problem. Signed-off-by: Brent Lu <[email protected]> Reviewed-by: Peter Ujfalusi <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: qdsp6: fix potential memory leak in q6apm_get_audioreach_graph()Jianglei Nie1-0/+1
q6apm_get_audioreach_graph() allocates a memory chunk for graph->graph with audioreach_alloc_graph_pkt(). When idr_alloc() fails, graph->graph is not released, which will lead to a memory leak. We can release the graph->graph with kfree() when idr_alloc() fails to fix the memory leak. Signed-off-by: Jianglei Nie <[email protected]> Reviewed-by: Srinivas Kandagatla <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: tas2764: Fix amp gain register offset & defaultHector Martin1-2/+2
The register default is 0x28 per the datasheet, and the amp gain field is supposed to be shifted left by one. With the wrong default, the ALSA controls lie about the power-up state. With the wrong shift, we get only half the gain we expect. Signed-off-by: Hector Martin <[email protected]> Fixes: 827ed8a0fa50 ("ASoC: tas2764: Add the driver for the TAS2764") Signed-off-by: Martin Povišer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: tas2764: Correct playback volume rangeHector Martin1-1/+1
DVC value 0xc8 is -100dB and 0xc9 is mute; this needs to map to -100.5dB as far as the dB scale is concerned. Fix that and enable the mute flag, so alsamixer correctly shows the control as <0 dB .. -100 dB, mute>. Signed-off-by: Hector Martin <[email protected]> Fixes: 827ed8a0fa50 ("ASoC: tas2764: Add the driver for the TAS2764") Signed-off-by: Martin Povišer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: tas2764: Fix and extend FSYNC polarity handlingMartin Povišer2-17/+19
Fix setting of FSYNC polarity in case of LEFT_J and DSP_A/B formats. Do NOT set the SCFG field as was previously done, because that is not correct and is also in conflict with the "ASI1 Source" control which sets the same SCFG field! Also add support for explicit polarity inversion. Fixes: 827ed8a0fa50 ("ASoC: tas2764: Add the driver for the TAS2764") Signed-off-by: Martin Povišer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: tas2764: Add post reset delaysMartin Povišer1-2/+8
Make sure there is at least 1 ms delay from reset to first command as is specified in the datasheet. This is a fix similar to commit 307f31452078 ("ASoC: tas2770: Insert post reset delay"). Fixes: 827ed8a0fa50 ("ASoC: tas2764: Add the driver for the TAS2764") Signed-off-by: Martin Povišer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: dt-bindings: Fix description for msm8916Bryan O'Donoghue1-4/+4
For the existing msm8916 bindings the minimum reg/reg-names is 1 not 2. Similarly the minimum interrupt/interrupt-names is 1 not 2. Fixes: f3fc4fbfa2d2 ("ASoC: dt-bindings: Add SC7280 lpass cpu bindings") Signed-off-by: Bryan O'Donoghue <[email protected]> Reviewed-by: Krzysztof Kozlowski <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: doc: Capitalize RESET line nameMarek Vasut1-1/+1
Make sure all AC97 interface lines are spelled in capitals, to avoid confusing readers about where the 5th line is. Signed-off-by: Marek Vasut <[email protected]> Cc: Mark Brown <[email protected]> Cc: Takashi Iwai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: arizona: Update arizona_aif_cfg_changed to use RX_BCLK_RATECharles Keepax1-2/+2
Currently the function arizona_aif_cfg_changed uses the TX_BCLK_RATE, however this register is not used on wm8998. This was not noticed as previously snd_soc_component_read did not print an error message. However, now the log gets filled with error messages, further more the test for if the LRCLK changed will return spurious results. Update the code to use the RX_BCLK_RATE register, the LRCLK parameters are written to both registers and the RX_BCLK_RATE register is used across all Arizona devices. Signed-off-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: cs47l92: Fix event generation for OUT1 demuxCharles Keepax1-1/+7
cs47l92_put_demux returns the value of snd_soc_dapm_mux_update_power, which returns a 1 if a path was found for the kcontrol. This is obviously different to the expected return a 1 if the control was updated value. This results in spurious notifications to user-space. Update the handling to only return a 1 when the value is changed. Signed-off-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: wm8998: Fix event generation for input muxCharles Keepax1-7/+14
wm8998_inmux_put returns the value of snd_soc_dapm_mux_update_power, which returns a 1 if a path was found for the kcontrol. This is obviously different to the expected return a 1 if the control was updated value. This results in spurious notifications to user-space. Update the handling to only return a 1 when the value is changed. Signed-off-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: wm5102: Fix event generation for output compensationCharles Keepax1-4/+17
The output compensation controls always returns zero regardless of if the control value was updated. This results in missing notifications to user-space of the control change. Update the handling to return 1 when the value is changed. Signed-off-by: Charles Keepax <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: wcd9335: Use int array instead of bitmask for TX mixersYassine Oudjana1-6/+11
Currently slim_tx_mixer_get reports all TX mixers as enabled when at least one is, due to it reading the entire tx_port_value bitmask without testing the specific bit corresponding to a TX port. Furthermore, using the same bitmask for all capture DAIs makes setting one mixer affect them all. To prevent this, and since the SLIM TX muxes effectively only connect to one of the mixers at a time, turn tx_port_value into an int array storing the DAI index each of the ports is connected to. Signed-off-by: Yassine Oudjana <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>
2022-07-07ASoC: tlv320adcx140: Fix tx_mask checkSascha Hauer1-7/+6
The tx_mask check doesn't reflect what the driver and the chip support. The check currently checks for exactly two slots being enabled. The tlv320adcx140 supports anything between one and eight channels, so relax the check accordingly. The tlv320adcx140 supports arbitrary tx_mask settings, but the driver currently only supports adjacent slots beginning with the first slot, so extend the check to check that the first slot is being used and that there are no holes in the tx_mask. Leave a comment to make it's the driver that limits the tx_mask settings, not the chip itself. While at it remove the set-but-unused struct adcx140p_priv::tdm_delay field. Signed-off-by: Sascha Hauer <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mark Brown <[email protected]>