Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: Merge up fixes

Some refactoring opportunities for the rcard driver were noticed while
fixing a bug.

+84 -37
+9 -9
Documentation/devicetree/bindings/sound/davinci-mcasp-audio.yaml
··· 102 102 default: 2 103 103 104 104 interrupts: 105 - oneOf: 106 - - minItems: 1 107 - items: 108 - - description: TX interrupt 109 - - description: RX interrupt 110 - - items: 111 - - description: common/combined interrupt 105 + minItems: 1 106 + maxItems: 2 112 107 113 108 interrupt-names: 114 109 oneOf: 115 - - minItems: 1 110 + - description: TX interrupt 111 + const: tx 112 + - description: RX interrupt 113 + const: rx 114 + - description: TX and RX interrupts 116 115 items: 117 116 - const: tx 118 117 - const: rx 119 - - const: common 118 + - description: Common/combined interrupt 119 + const: common 120 120 121 121 fck_parent: 122 122 $ref: /schemas/types.yaml#/definitions/string
+3
MAINTAINERS
··· 15089 15089 15090 15090 MICROCHIP AUDIO ASOC DRIVERS 15091 15091 M: Claudiu Beznea <claudiu.beznea@tuxon.dev> 15092 + M: Andrei Simion <andrei.simion@microchip.com> 15092 15093 L: linux-sound@vger.kernel.org 15093 15094 S: Supported 15094 15095 F: Documentation/devicetree/bindings/sound/atmel* ··· 15198 15197 15199 15198 MICROCHIP MCP16502 PMIC DRIVER 15200 15199 M: Claudiu Beznea <claudiu.beznea@tuxon.dev> 15200 + M: Andrei Simion <andrei.simion@microchip.com> 15201 15201 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 15202 15202 S: Supported 15203 15203 F: Documentation/devicetree/bindings/regulator/microchip,mcp16502.yaml ··· 15330 15328 15331 15329 MICROCHIP SSC DRIVER 15332 15330 M: Claudiu Beznea <claudiu.beznea@tuxon.dev> 15331 + M: Andrei Simion <andrei.simion@microchip.com> 15333 15332 L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) 15334 15333 S: Supported 15335 15334 F: Documentation/devicetree/bindings/misc/atmel-ssc.txt
+1 -1
include/uapi/sound/asoc.h
··· 88 88 89 89 /* ABI version */ 90 90 #define SND_SOC_TPLG_ABI_VERSION 0x5 /* current version */ 91 - #define SND_SOC_TPLG_ABI_VERSION_MIN 0x4 /* oldest version supported */ 91 + #define SND_SOC_TPLG_ABI_VERSION_MIN 0x5 /* oldest version supported */ 92 92 93 93 /* Max size of TLV data */ 94 94 #define SND_SOC_TPLG_TLV_SIZE 32
+7
sound/soc/amd/yc/acp6x-mach.c
··· 342 342 { 343 343 .driver_data = &acp6x_card, 344 344 .matches = { 345 + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 346 + DMI_MATCH(DMI_PRODUCT_NAME, "M3502RA"), 347 + } 348 + }, 349 + { 350 + .driver_data = &acp6x_card, 351 + .matches = { 345 352 DMI_MATCH(DMI_BOARD_VENDOR, "Micro-Star International Co., Ltd."), 346 353 DMI_MATCH(DMI_PRODUCT_NAME, "Bravo 15 B7ED"), 347 354 }
+1
sound/soc/codecs/max98388.c
··· 763 763 addr = MAX98388_R2044_PCM_TX_CTRL1 + (cnt / 8); 764 764 bits = cnt % 8; 765 765 regmap_update_bits(max98388->regmap, addr, bits, bits); 766 + slot_found++; 766 767 if (slot_found >= MAX_NUM_CH) 767 768 break; 768 769 }
+2 -2
sound/soc/fsl/fsl_esai.c
··· 119 119 dev_dbg(&pdev->dev, "isr: Transmission Initialized\n"); 120 120 121 121 if (esr & ESAI_ESR_RFF_MASK) 122 - dev_warn(&pdev->dev, "isr: Receiving overrun\n"); 122 + dev_dbg(&pdev->dev, "isr: Receiving overrun\n"); 123 123 124 124 if (esr & ESAI_ESR_TFE_MASK) 125 - dev_warn(&pdev->dev, "isr: Transmission underrun\n"); 125 + dev_dbg(&pdev->dev, "isr: Transmission underrun\n"); 126 126 127 127 if (esr & ESAI_ESR_TLS_MASK) 128 128 dev_dbg(&pdev->dev, "isr: Just transmitted the last slot\n");
+2 -1
sound/soc/intel/avs/core.c
··· 28 28 #include "avs.h" 29 29 #include "cldma.h" 30 30 #include "messages.h" 31 + #include "pcm.h" 31 32 32 33 static u32 pgctl_mask = AZX_PGCTL_LSRMD_MASK; 33 34 module_param(pgctl_mask, uint, 0444); ··· 248 247 static void hdac_update_stream(struct hdac_bus *bus, struct hdac_stream *stream) 249 248 { 250 249 if (stream->substream) { 251 - snd_pcm_period_elapsed(stream->substream); 250 + avs_period_elapsed(stream->substream); 252 251 } else if (stream->cstream) { 253 252 u64 buffer_size = stream->cstream->runtime->buffer_size; 254 253
+19
sound/soc/intel/avs/pcm.c
··· 16 16 #include <sound/soc-component.h> 17 17 #include "avs.h" 18 18 #include "path.h" 19 + #include "pcm.h" 19 20 #include "topology.h" 20 21 #include "../../codecs/hda.h" 21 22 ··· 31 30 struct hdac_ext_stream *host_stream; 32 31 }; 33 32 33 + struct work_struct period_elapsed_work; 34 34 struct snd_pcm_substream *substream; 35 35 }; 36 36 ··· 58 56 return dw->priv; 59 57 } 60 58 59 + static void avs_period_elapsed_work(struct work_struct *work) 60 + { 61 + struct avs_dma_data *data = container_of(work, struct avs_dma_data, period_elapsed_work); 62 + 63 + snd_pcm_period_elapsed(data->substream); 64 + } 65 + 66 + void avs_period_elapsed(struct snd_pcm_substream *substream) 67 + { 68 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 69 + struct snd_soc_dai *dai = snd_soc_rtd_to_cpu(rtd, 0); 70 + struct avs_dma_data *data = snd_soc_dai_get_dma_data(dai, substream); 71 + 72 + schedule_work(&data->period_elapsed_work); 73 + } 74 + 61 75 static int avs_dai_startup(struct snd_pcm_substream *substream, struct snd_soc_dai *dai) 62 76 { 63 77 struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); ··· 95 77 data->substream = substream; 96 78 data->template = template; 97 79 data->adev = adev; 80 + INIT_WORK(&data->period_elapsed_work, avs_period_elapsed_work); 98 81 snd_soc_dai_set_dma_data(dai, substream, data); 99 82 100 83 if (rtd->dai_link->ignore_suspend)
+16
sound/soc/intel/avs/pcm.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0-only */ 2 + /* 3 + * Copyright(c) 2024 Intel Corporation 4 + * 5 + * Authors: Cezary Rojewski <cezary.rojewski@intel.com> 6 + * Amadeusz Slawinski <amadeuszx.slawinski@linux.intel.com> 7 + */ 8 + 9 + #ifndef __SOUND_SOC_INTEL_AVS_PCM_H 10 + #define __SOUND_SOC_INTEL_AVS_PCM_H 11 + 12 + #include <sound/pcm.h> 13 + 14 + void avs_period_elapsed(struct snd_pcm_substream *substream); 15 + 16 + #endif
+1
sound/soc/loongson/loongson_card.c
··· 144 144 dev_err(dev, "getting cpu dlc error (%d)\n", ret); 145 145 goto err; 146 146 } 147 + loongson_dai_links[i].platforms->of_node = loongson_dai_links[i].cpus->of_node; 147 148 148 149 ret = snd_soc_of_get_dlc(codec, NULL, loongson_dai_links[i].codecs, 0); 149 150 if (ret < 0) {
+1
sound/soc/qcom/Kconfig
··· 157 157 depends on COMMON_CLK 158 158 select SND_SOC_QDSP6 159 159 select SND_SOC_QCOM_COMMON 160 + select SND_SOC_QCOM_SDW 160 161 select SND_SOC_RT5663 161 162 select SND_SOC_MAX98927 162 163 imply SND_SOC_CROS_EC_CODEC
+2
sound/soc/qcom/lpass-cpu.c
··· 1242 1242 /* Allocation for i2sctl regmap fields */ 1243 1243 drvdata->i2sctl = devm_kzalloc(&pdev->dev, sizeof(struct lpaif_i2sctl), 1244 1244 GFP_KERNEL); 1245 + if (!drvdata->i2sctl) 1246 + return -ENOMEM; 1245 1247 1246 1248 /* Initialize bitfields for dai I2SCTL register */ 1247 1249 ret = lpass_cpu_init_i2sctl_bitfields(dev, drvdata->i2sctl,
+6 -1
sound/soc/qcom/sdm845.c
··· 15 15 #include <uapi/linux/input-event-codes.h> 16 16 #include "common.h" 17 17 #include "qdsp6/q6afe.h" 18 + #include "sdw.h" 18 19 #include "../codecs/rt5663.h" 19 20 20 21 #define DRIVER_NAME "sdm845" ··· 417 416 pr_err("%s: invalid dai id 0x%x\n", __func__, cpu_dai->id); 418 417 break; 419 418 } 420 - return 0; 419 + return qcom_snd_sdw_startup(substream); 421 420 } 422 421 423 422 static void sdm845_snd_shutdown(struct snd_pcm_substream *substream) ··· 426 425 struct snd_soc_card *card = rtd->card; 427 426 struct sdm845_snd_data *data = snd_soc_card_get_drvdata(card); 428 427 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 428 + struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; 429 429 430 430 switch (cpu_dai->id) { 431 431 case PRIMARY_MI2S_RX: ··· 465 463 pr_err("%s: invalid dai id 0x%x\n", __func__, cpu_dai->id); 466 464 break; 467 465 } 466 + 467 + data->sruntime[cpu_dai->id] = NULL; 468 + sdw_release_stream(sruntime); 468 469 } 469 470 470 471 static int sdm845_snd_prepare(struct snd_pcm_substream *substream)
+5 -2
sound/soc/sh/rcar/core.c
··· 1281 1281 if (!of_node_name_eq(ports, "ports") && 1282 1282 !of_node_name_eq(ports, "port")) 1283 1283 continue; 1284 - priv->component_dais[i] = of_graph_get_endpoint_count(ports); 1284 + priv->component_dais[i] = 1285 + of_graph_get_endpoint_count(of_node_name_eq(ports, "ports") ? 1286 + ports : np); 1285 1287 nr += priv->component_dais[i]; 1286 1288 i++; 1287 1289 if (i >= RSND_MAX_COMPONENT) { ··· 1495 1493 if (!of_node_name_eq(ports, "ports") && 1496 1494 !of_node_name_eq(ports, "port")) 1497 1495 continue; 1498 - for_each_endpoint_of_node(ports, dai_np) { 1496 + for_each_endpoint_of_node(of_node_name_eq(ports, "ports") ? 1497 + ports : np, dai_np) { 1499 1498 __rsnd_dai_probe(priv, dai_np, dai_np, 0, dai_i); 1500 1499 if (!rsnd_is_gen1(priv) && !rsnd_is_gen2(priv)) { 1501 1500 rdai = rsnd_rdai_get(priv, dai_i);
+2 -2
sound/soc/soc-dapm.c
··· 2785 2785 2786 2786 int snd_soc_dapm_widget_name_cmp(struct snd_soc_dapm_widget *widget, const char *s) 2787 2787 { 2788 - struct snd_soc_component *component = snd_soc_dapm_to_component(widget->dapm); 2788 + struct snd_soc_component *component = widget->dapm->component; 2789 2789 const char *wname = widget->name; 2790 2790 2791 - if (component->name_prefix) 2791 + if (component && component->name_prefix) 2792 2792 wname += strlen(component->name_prefix) + 1; /* plus space */ 2793 2793 2794 2794 return strcmp(wname, s);
+4 -1
sound/soc/sof/amd/acp-loader.c
··· 206 206 configure_pte_for_fw_loading(FW_SRAM_DATA_BIN, ACP_SRAM_PAGE_COUNT, adata); 207 207 src_addr = ACP_SYSTEM_MEMORY_WINDOW + ACP_DEFAULT_SRAM_LENGTH + 208 208 (page_count * ACP_PAGE_SIZE); 209 - dest_addr = ACP_SRAM_BASE_ADDRESS; 209 + if (adata->pci_rev > ACP63_PCI_ID) 210 + dest_addr = ACP7X_SRAM_BASE_ADDRESS; 211 + else 212 + dest_addr = ACP_SRAM_BASE_ADDRESS; 210 213 211 214 ret = configure_and_run_dma(adata, src_addr, dest_addr, 212 215 adata->fw_sram_data_bin_size);
+3 -1
sound/soc/sof/amd/acp.c
··· 329 329 fw_qualifier, fw_qualifier & DSP_FW_RUN_ENABLE, 330 330 ACP_REG_POLL_INTERVAL, ACP_DMA_COMPLETE_TIMEOUT_US); 331 331 if (ret < 0) { 332 - dev_err(sdev->dev, "PSP validation failed\n"); 332 + val = snd_sof_dsp_read(sdev, ACP_DSP_BAR, ACP_SHA_PSP_ACK); 333 + dev_err(sdev->dev, "PSP validation failed: fw_qualifier = %#x, ACP_SHA_PSP_ACK = %#x\n", 334 + fw_qualifier, val); 333 335 return ret; 334 336 } 335 337
-17
sound/soc/sof/intel/hda-loader.c
··· 294 294 { 295 295 struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; 296 296 const struct sof_intel_dsp_desc *chip = hda->desc; 297 - struct sof_intel_hda_stream *hda_stream; 298 - unsigned long time_left; 299 297 unsigned int reg; 300 298 int ret, status; 301 - 302 - hda_stream = container_of(hext_stream, struct sof_intel_hda_stream, 303 - hext_stream); 304 299 305 300 dev_dbg(sdev->dev, "Code loader DMA starting\n"); 306 301 ··· 303 308 if (ret < 0) { 304 309 dev_err(sdev->dev, "error: DMA trigger start failed\n"); 305 310 return ret; 306 - } 307 - 308 - if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) { 309 - /* Wait for completion of transfer */ 310 - time_left = wait_for_completion_timeout(&hda_stream->ioc, 311 - msecs_to_jiffies(HDA_CL_DMA_IOC_TIMEOUT_MS)); 312 - 313 - if (!time_left) { 314 - dev_err(sdev->dev, "Code loader DMA did not complete\n"); 315 - return -ETIMEDOUT; 316 - } 317 - dev_dbg(sdev->dev, "Code loader DMA done\n"); 318 311 } 319 312 320 313 dev_dbg(sdev->dev, "waiting for FW_ENTERED status\n");