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

Configure Feed

Select the types of activity you want to include in your feed.

ASoC: Merge up fixes

Needed for new Intel board file changes.

+415 -86
+4
Documentation/devicetree/bindings/sound/rockchip,rk3308-codec.yaml
··· 48 48 - const: mclk_rx 49 49 - const: hclk 50 50 51 + port: 52 + $ref: audio-graph-port.yaml# 53 + unevaluatedProperties: false 54 + 51 55 resets: 52 56 maxItems: 1 53 57
+10 -1
MAINTAINERS
··· 21720 21720 W: https://github.com/thesofproject/linux/ 21721 21721 F: sound/soc/sof/ 21722 21722 21723 + SOUND - GENERIC SOUND CARD (Simple-Audio-Card, Audio-Graph-Card) 21724 + M: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> 21725 + S: Supported 21726 + L: linux-sound@vger.kernel.org 21727 + F: sound/soc/generic/ 21728 + F: include/sound/simple_card* 21729 + F: Documentation/devicetree/bindings/sound/simple-card.yaml 21730 + F: Documentation/devicetree/bindings/sound/audio-graph*.yaml 21731 + 21723 21732 SOUNDWIRE SUBSYSTEM 21724 21733 M: Vinod Koul <vkoul@kernel.org> 21725 21734 M: Bard Liao <yung-chuan.liao@linux.intel.com> ··· 23322 23313 F: drivers/iio/adc/ti-lmp92064.c 23323 23314 23324 23315 TI PCM3060 ASoC CODEC DRIVER 23325 - M: Kirill Marinushkin <kmarinushkin@birdec.com> 23316 + M: Kirill Marinushkin <k.marinushkin@gmail.com> 23326 23317 L: linux-sound@vger.kernel.org 23327 23318 S: Maintained 23328 23319 F: Documentation/devicetree/bindings/sound/pcm3060.txt
+6 -13
drivers/soundwire/intel_ace2x.c
··· 383 383 static int intel_prepare(struct snd_pcm_substream *substream, 384 384 struct snd_soc_dai *dai) 385 385 { 386 + struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 386 387 struct sdw_cdns *cdns = snd_soc_dai_get_drvdata(dai); 387 388 struct sdw_intel *sdw = cdns_to_intel(cdns); 388 389 struct sdw_cdns_dai_runtime *dai_runtime; 390 + struct snd_pcm_hw_params *hw_params; 389 391 int ch, dir; 390 - int ret = 0; 391 392 392 393 dai_runtime = cdns->dai_runtime_array[dai->id]; 393 394 if (!dai_runtime) { ··· 397 396 return -EIO; 398 397 } 399 398 399 + hw_params = &rtd->dpcm[substream->stream].hw_params; 400 400 if (dai_runtime->suspended) { 401 - struct snd_soc_pcm_runtime *rtd = snd_soc_substream_to_rtd(substream); 402 - struct snd_pcm_hw_params *hw_params; 403 - 404 - hw_params = &rtd->dpcm[substream->stream].hw_params; 405 - 406 401 dai_runtime->suspended = false; 407 402 408 403 /* ··· 419 422 /* the SHIM will be configured in the callback functions */ 420 423 421 424 sdw_cdns_config_stream(cdns, ch, dir, dai_runtime->pdi); 422 - 423 - /* Inform DSP about PDI stream number */ 424 - ret = intel_params_stream(sdw, substream, dai, 425 - hw_params, 426 - sdw->instance, 427 - dai_runtime->pdi->intel_alh_id); 428 425 } 429 426 430 - return ret; 427 + /* Inform DSP about PDI stream number */ 428 + return intel_params_stream(sdw, substream, dai, hw_params, sdw->instance, 429 + dai_runtime->pdi->intel_alh_id); 431 430 } 432 431 433 432 static int
+4
sound/hda/intel-dsp-config.c
··· 723 723 /* BayTrail */ 724 724 { 725 725 .flags = FLAG_SST_OR_SOF_BYT, 726 + .acpi_hid = "LPE0F28", 727 + }, 728 + { 729 + .flags = FLAG_SST_OR_SOF_BYT, 726 730 .acpi_hid = "80860F28", 727 731 }, 728 732 /* CherryTrail */
+21
sound/soc/amd/yc/acp6x-mach.c
··· 231 231 .driver_data = &acp6x_card, 232 232 .matches = { 233 233 DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 234 + DMI_MATCH(DMI_PRODUCT_NAME, "21M4"), 235 + } 236 + }, 237 + { 238 + .driver_data = &acp6x_card, 239 + .matches = { 240 + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 234 241 DMI_MATCH(DMI_PRODUCT_NAME, "21M5"), 235 242 } 236 243 }, ··· 336 329 .driver_data = &acp6x_card, 337 330 .matches = { 338 331 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 332 + DMI_MATCH(DMI_PRODUCT_NAME, "E1404FA"), 333 + } 334 + }, 335 + { 336 + .driver_data = &acp6x_card, 337 + .matches = { 338 + DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 339 339 DMI_MATCH(DMI_PRODUCT_NAME, "E1504FA"), 340 340 } 341 341 }, ··· 400 386 .matches = { 401 387 DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"), 402 388 DMI_MATCH(DMI_PRODUCT_NAME, "Redmi Book Pro 15 2022"), 389 + } 390 + }, 391 + { 392 + .driver_data = &acp6x_card, 393 + .matches = { 394 + DMI_MATCH(DMI_BOARD_VENDOR, "TIMI"), 395 + DMI_MATCH(DMI_PRODUCT_NAME, "Xiaomi Book Pro 14 2022"), 403 396 } 404 397 }, 405 398 {
+5 -2
sound/soc/codecs/cs42l51.c
··· 747 747 748 748 cs42l51->reset_gpio = devm_gpiod_get_optional(dev, "reset", 749 749 GPIOD_OUT_LOW); 750 - if (IS_ERR(cs42l51->reset_gpio)) 751 - return PTR_ERR(cs42l51->reset_gpio); 750 + if (IS_ERR(cs42l51->reset_gpio)) { 751 + ret = PTR_ERR(cs42l51->reset_gpio); 752 + goto error; 753 + } 752 754 753 755 if (cs42l51->reset_gpio) { 754 756 dev_dbg(dev, "Release reset gpio\n"); ··· 782 780 return 0; 783 781 784 782 error: 783 + gpiod_set_value_cansleep(cs42l51->reset_gpio, 1); 785 784 regulator_bulk_disable(ARRAY_SIZE(cs42l51->supplies), 786 785 cs42l51->supplies); 787 786 return ret;
+7 -8
sound/soc/codecs/lpass-rx-macro.c
··· 202 202 #define CDC_RX_RXn_RX_PATH_SEC3(rx, n) (0x042c + rx->rxn_reg_stride * n) 203 203 #define CDC_RX_RX0_RX_PATH_SEC4 (0x0430) 204 204 #define CDC_RX_RX0_RX_PATH_SEC7 (0x0434) 205 - #define CDC_RX_RXn_RX_PATH_SEC7(rx, n) (0x0434 + rx->rxn_reg_stride * n) 205 + #define CDC_RX_RXn_RX_PATH_SEC7(rx, n) \ 206 + (0x0434 + (rx->rxn_reg_stride * n) + ((n > 1) ? rx->rxn_reg_stride2 : 0)) 206 207 #define CDC_RX_DSM_OUT_DELAY_SEL_MASK GENMASK(2, 0) 207 208 #define CDC_RX_DSM_OUT_DELAY_TWO_SAMPLE 0x2 208 209 #define CDC_RX_RX0_RX_PATH_MIX_SEC0 (0x0438) 209 210 #define CDC_RX_RX0_RX_PATH_MIX_SEC1 (0x043C) 210 - #define CDC_RX_RXn_RX_PATH_DSM_CTL(rx, n) (0x0440 + rx->rxn_reg_stride * n) 211 + #define CDC_RX_RXn_RX_PATH_DSM_CTL(rx, n) \ 212 + (0x0440 + (rx->rxn_reg_stride * n) + ((n > 1) ? rx->rxn_reg_stride2 : 0)) 211 213 #define CDC_RX_RXn_DSM_CLK_EN_MASK BIT(0) 212 214 #define CDC_RX_RX0_RX_PATH_DSM_CTL (0x0440) 213 215 #define CDC_RX_RX0_RX_PATH_DSM_DATA1 (0x0444) ··· 647 645 int rx_mclk_cnt; 648 646 enum lpass_codec_version codec_version; 649 647 int rxn_reg_stride; 648 + int rxn_reg_stride2; 650 649 bool is_ear_mode_on; 651 650 bool hph_pwr_mode; 652 651 bool hph_hd2_mode; ··· 1932 1929 CDC_RX_PATH_PGA_MUTE_MASK, 0x0); 1933 1930 } 1934 1931 1935 - if (j == INTERP_AUX) 1936 - dsm_reg = CDC_RX_RXn_RX_PATH_DSM_CTL(rx, 2); 1937 - 1938 1932 int_mux_cfg0 = CDC_RX_INP_MUX_RX_INT0_CFG0 + j * 8; 1939 1933 int_mux_cfg1 = int_mux_cfg0 + 4; 1940 1934 int_mux_cfg0_val = snd_soc_component_read(component, int_mux_cfg0); ··· 2702 2702 2703 2703 main_reg = CDC_RX_RXn_RX_PATH_CTL(rx, interp_idx); 2704 2704 dsm_reg = CDC_RX_RXn_RX_PATH_DSM_CTL(rx, interp_idx); 2705 - if (interp_idx == INTERP_AUX) 2706 - dsm_reg = CDC_RX_RXn_RX_PATH_DSM_CTL(rx, 2); 2707 - 2708 2705 rx_cfg2_reg = CDC_RX_RXn_RX_PATH_CFG2(rx, interp_idx); 2709 2706 2710 2707 if (SND_SOC_DAPM_EVENT_ON(event)) { ··· 3818 3821 case LPASS_CODEC_VERSION_2_0: 3819 3822 case LPASS_CODEC_VERSION_2_1: 3820 3823 rx->rxn_reg_stride = 0x80; 3824 + rx->rxn_reg_stride2 = 0xc; 3821 3825 def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_pre_2_5_defaults); 3822 3826 reg_defaults = kmalloc_array(def_count, sizeof(struct reg_default), GFP_KERNEL); 3823 3827 if (!reg_defaults) ··· 3832 3834 case LPASS_CODEC_VERSION_2_7: 3833 3835 case LPASS_CODEC_VERSION_2_8: 3834 3836 rx->rxn_reg_stride = 0xc0; 3837 + rx->rxn_reg_stride2 = 0x0; 3835 3838 def_count = ARRAY_SIZE(rx_defaults) + ARRAY_SIZE(rx_2_5_defaults); 3836 3839 reg_defaults = kmalloc_array(def_count, sizeof(struct reg_default), GFP_KERNEL); 3837 3840 if (!reg_defaults)
+9 -2
sound/soc/codecs/max9768.c
··· 54 54 { 55 55 struct snd_soc_component *c = snd_soc_kcontrol_component(kcontrol); 56 56 struct max9768 *max9768 = snd_soc_component_get_drvdata(c); 57 + bool val = !ucontrol->value.integer.value[0]; 58 + int ret; 57 59 58 - gpiod_set_value_cansleep(max9768->mute, !ucontrol->value.integer.value[0]); 60 + if (val != gpiod_get_value_cansleep(max9768->mute)) 61 + ret = 1; 62 + else 63 + ret = 0; 59 64 60 - return 0; 65 + gpiod_set_value_cansleep(max9768->mute, val); 66 + 67 + return ret; 61 68 } 62 69 63 70 static const DECLARE_TLV_DB_RANGE(volume_tlv,
+2 -2
sound/soc/codecs/pcm3060-i2c.c
··· 2 2 // 3 3 // PCM3060 I2C driver 4 4 // 5 - // Copyright (C) 2018 Kirill Marinushkin <kmarinushkin@birdec.com> 5 + // Copyright (C) 2018 Kirill Marinushkin <k.marinushkin@gmail.com> 6 6 7 7 #include <linux/i2c.h> 8 8 #include <linux/module.h> ··· 55 55 module_i2c_driver(pcm3060_i2c_driver); 56 56 57 57 MODULE_DESCRIPTION("PCM3060 I2C driver"); 58 - MODULE_AUTHOR("Kirill Marinushkin <kmarinushkin@birdec.com>"); 58 + MODULE_AUTHOR("Kirill Marinushkin <k.marinushkin@gmail.com>"); 59 59 MODULE_LICENSE("GPL v2");
+2 -2
sound/soc/codecs/pcm3060-spi.c
··· 2 2 // 3 3 // PCM3060 SPI driver 4 4 // 5 - // Copyright (C) 2018 Kirill Marinushkin <kmarinushkin@birdec.com> 5 + // Copyright (C) 2018 Kirill Marinushkin <k.marinushkin@gmail.com> 6 6 7 7 #include <linux/module.h> 8 8 #include <linux/spi/spi.h> ··· 55 55 module_spi_driver(pcm3060_spi_driver); 56 56 57 57 MODULE_DESCRIPTION("PCM3060 SPI driver"); 58 - MODULE_AUTHOR("Kirill Marinushkin <kmarinushkin@birdec.com>"); 58 + MODULE_AUTHOR("Kirill Marinushkin <k.marinushkin@gmail.com>"); 59 59 MODULE_LICENSE("GPL v2");
+2 -2
sound/soc/codecs/pcm3060.c
··· 2 2 // 3 3 // PCM3060 codec driver 4 4 // 5 - // Copyright (C) 2018 Kirill Marinushkin <kmarinushkin@birdec.com> 5 + // Copyright (C) 2018 Kirill Marinushkin <k.marinushkin@gmail.com> 6 6 7 7 #include <linux/module.h> 8 8 #include <sound/pcm_params.h> ··· 343 343 EXPORT_SYMBOL(pcm3060_probe); 344 344 345 345 MODULE_DESCRIPTION("PCM3060 codec driver"); 346 - MODULE_AUTHOR("Kirill Marinushkin <kmarinushkin@birdec.com>"); 346 + MODULE_AUTHOR("Kirill Marinushkin <k.marinushkin@gmail.com>"); 347 347 MODULE_LICENSE("GPL v2");
+1 -1
sound/soc/codecs/pcm3060.h
··· 2 2 /* 3 3 * PCM3060 codec driver 4 4 * 5 - * Copyright (C) 2018 Kirill Marinushkin <kmarinushkin@birdec.com> 5 + * Copyright (C) 2018 Kirill Marinushkin <k.marinushkin@gmail.com> 6 6 */ 7 7 8 8 #ifndef _SND_SOC_PCM3060_H
+15 -12
sound/soc/codecs/rt5640.c
··· 2419 2419 return IRQ_HANDLED; 2420 2420 } 2421 2421 2422 - static void rt5640_cancel_work(void *data) 2422 + static void rt5640_disable_irq_and_cancel_work(void *data) 2423 2423 { 2424 2424 struct rt5640_priv *rt5640 = data; 2425 + 2426 + if (rt5640->jd_gpio_irq_requested) { 2427 + free_irq(rt5640->jd_gpio_irq, rt5640); 2428 + rt5640->jd_gpio_irq_requested = false; 2429 + } 2430 + 2431 + if (rt5640->irq_requested) { 2432 + free_irq(rt5640->irq, rt5640); 2433 + rt5640->irq_requested = false; 2434 + } 2425 2435 2426 2436 cancel_delayed_work_sync(&rt5640->jack_work); 2427 2437 cancel_delayed_work_sync(&rt5640->bp_work); ··· 2473 2463 if (!rt5640->jack) 2474 2464 return; 2475 2465 2476 - if (rt5640->jd_gpio_irq_requested) 2477 - free_irq(rt5640->jd_gpio_irq, rt5640); 2478 - 2479 - if (rt5640->irq_requested) 2480 - free_irq(rt5640->irq, rt5640); 2481 - 2482 - rt5640_cancel_work(rt5640); 2466 + rt5640_disable_irq_and_cancel_work(rt5640); 2483 2467 2484 2468 if (rt5640->jack->status & SND_JACK_MICROPHONE) { 2485 2469 rt5640_disable_micbias1_ovcd_irq(component); ··· 2481 2477 snd_soc_jack_report(rt5640->jack, 0, SND_JACK_BTN_0); 2482 2478 } 2483 2479 2484 - rt5640->jd_gpio_irq_requested = false; 2485 - rt5640->irq_requested = false; 2486 2480 rt5640->jd_gpio = NULL; 2487 2481 rt5640->jack = NULL; 2488 2482 } ··· 2800 2798 if (rt5640->jack) { 2801 2799 /* disable jack interrupts during system suspend */ 2802 2800 disable_irq(rt5640->irq); 2803 - rt5640_cancel_work(rt5640); 2801 + cancel_delayed_work_sync(&rt5640->jack_work); 2802 + cancel_delayed_work_sync(&rt5640->bp_work); 2804 2803 } 2805 2804 2806 2805 snd_soc_component_force_bias_level(component, SND_SOC_BIAS_OFF); ··· 3035 3032 INIT_DELAYED_WORK(&rt5640->jack_work, rt5640_jack_work); 3036 3033 3037 3034 /* Make sure work is stopped on probe-error / remove */ 3038 - ret = devm_add_action_or_reset(&i2c->dev, rt5640_cancel_work, rt5640); 3035 + ret = devm_add_action_or_reset(&i2c->dev, rt5640_disable_irq_and_cancel_work, rt5640); 3039 3036 if (ret) 3040 3037 return ret; 3041 3038
+1 -1
sound/soc/codecs/rt722-sdca-sdw.c
··· 253 253 } 254 254 255 255 /* set the timeout values */ 256 - prop->clk_stop_timeout = 200; 256 + prop->clk_stop_timeout = 900; 257 257 258 258 /* wake-up event */ 259 259 prop->wake_capable = 1;
+1
sound/soc/codecs/tas2781-fmwlib.c
··· 1992 1992 break; 1993 1993 case 0x202: 1994 1994 case 0x400: 1995 + case 0x401: 1995 1996 tas_priv->fw_parse_variable_header = 1996 1997 fw_parse_variable_header_git; 1997 1998 tas_priv->fw_parse_program_data =
+10 -2
sound/soc/codecs/wcd937x.c
··· 714 714 struct snd_soc_component *component = snd_soc_dapm_to_component(w->dapm); 715 715 struct wcd937x_priv *wcd937x = snd_soc_component_get_drvdata(component); 716 716 int hph_mode = wcd937x->hph_mode; 717 + u8 val; 717 718 718 719 switch (event) { 719 720 case SND_SOC_DAPM_PRE_PMU: 721 + val = WCD937X_DIGITAL_PDM_WD_CTL2_EN | 722 + WCD937X_DIGITAL_PDM_WD_CTL2_TIMEOUT_SEL | 723 + WCD937X_DIGITAL_PDM_WD_CTL2_HOLD_OFF; 720 724 snd_soc_component_update_bits(component, 721 725 WCD937X_DIGITAL_PDM_WD_CTL2, 722 - BIT(0), BIT(0)); 726 + WCD937X_DIGITAL_PDM_WD_CTL2_MASK, 727 + val); 723 728 break; 724 729 case SND_SOC_DAPM_POST_PMU: 725 730 usleep_range(1000, 1010); ··· 745 740 hph_mode); 746 741 snd_soc_component_update_bits(component, 747 742 WCD937X_DIGITAL_PDM_WD_CTL2, 748 - BIT(0), 0x00); 743 + WCD937X_DIGITAL_PDM_WD_CTL2_MASK, 744 + 0x00); 749 745 break; 750 746 } 751 747 ··· 2053 2047 SOC_SINGLE_EXT("HPHL Switch", WCD937X_HPH_L, 0, 1, 0, 2054 2048 wcd937x_get_swr_port, wcd937x_set_swr_port), 2055 2049 SOC_SINGLE_EXT("HPHR Switch", WCD937X_HPH_R, 0, 1, 0, 2050 + wcd937x_get_swr_port, wcd937x_set_swr_port), 2051 + SOC_SINGLE_EXT("LO Switch", WCD937X_LO, 0, 1, 0, 2056 2052 wcd937x_get_swr_port, wcd937x_set_swr_port), 2057 2053 2058 2054 SOC_SINGLE_EXT("ADC1 Switch", WCD937X_ADC1, 1, 1, 0,
+4
sound/soc/codecs/wcd937x.h
··· 391 391 #define WCD937X_DIGITAL_PDM_WD_CTL0 0x3465 392 392 #define WCD937X_DIGITAL_PDM_WD_CTL1 0x3466 393 393 #define WCD937X_DIGITAL_PDM_WD_CTL2 0x3467 394 + #define WCD937X_DIGITAL_PDM_WD_CTL2_HOLD_OFF BIT(2) 395 + #define WCD937X_DIGITAL_PDM_WD_CTL2_TIMEOUT_SEL BIT(1) 396 + #define WCD937X_DIGITAL_PDM_WD_CTL2_EN BIT(0) 397 + #define WCD937X_DIGITAL_PDM_WD_CTL2_MASK GENMASK(2, 0) 394 398 #define WCD937X_DIGITAL_INTR_MODE 0x346A 395 399 #define WCD937X_DIGITAL_INTR_MASK_0 0x346B 396 400 #define WCD937X_DIGITAL_INTR_MASK_1 0x346C
+80 -1
sound/soc/fsl/fsl_micfil.c
··· 28 28 29 29 #define MICFIL_OSR_DEFAULT 16 30 30 31 + #define MICFIL_NUM_RATES 7 32 + #define MICFIL_CLK_SRC_NUM 3 33 + /* clock source ids */ 34 + #define MICFIL_AUDIO_PLL1 0 35 + #define MICFIL_AUDIO_PLL2 1 36 + #define MICFIL_CLK_EXT3 2 37 + 31 38 enum quality { 32 39 QUALITY_HIGH, 33 40 QUALITY_MEDIUM, ··· 52 45 struct clk *mclk; 53 46 struct clk *pll8k_clk; 54 47 struct clk *pll11k_clk; 48 + struct clk *clk_src[MICFIL_CLK_SRC_NUM]; 55 49 struct snd_dmaengine_dai_dma_data dma_params_rx; 56 50 struct sdma_peripheral_config sdmacfg; 57 51 struct snd_soc_card *card; 52 + struct snd_pcm_hw_constraint_list constraint_rates; 53 + unsigned int constraint_rates_list[MICFIL_NUM_RATES]; 58 54 unsigned int dataline; 59 55 char name[32]; 60 56 int irq[MICFIL_IRQ_LINES]; ··· 78 68 bool imx; 79 69 bool use_edma; 80 70 bool use_verid; 71 + bool volume_sx; 81 72 u64 formats; 82 73 }; 83 74 ··· 88 77 .fifo_depth = 8, 89 78 .dataline = 0xf, 90 79 .formats = SNDRV_PCM_FMTBIT_S16_LE, 80 + .volume_sx = true, 91 81 }; 92 82 93 83 static struct fsl_micfil_soc_data fsl_micfil_imx8mp = { ··· 97 85 .fifo_depth = 32, 98 86 .dataline = 0xf, 99 87 .formats = SNDRV_PCM_FMTBIT_S32_LE, 88 + .volume_sx = false, 100 89 }; 101 90 102 91 static struct fsl_micfil_soc_data fsl_micfil_imx93 = { ··· 108 95 .formats = SNDRV_PCM_FMTBIT_S32_LE, 109 96 .use_edma = true, 110 97 .use_verid = true, 98 + .volume_sx = false, 111 99 }; 112 100 113 101 static const struct of_device_id fsl_micfil_dt_ids[] = { ··· 332 318 return 0; 333 319 } 334 320 335 - static const struct snd_kcontrol_new fsl_micfil_snd_controls[] = { 321 + static const struct snd_kcontrol_new fsl_micfil_volume_controls[] = { 322 + SOC_SINGLE_TLV("CH0 Volume", REG_MICFIL_OUT_CTRL, 323 + MICFIL_OUTGAIN_CHX_SHIFT(0), 0xF, 0, gain_tlv), 324 + SOC_SINGLE_TLV("CH1 Volume", REG_MICFIL_OUT_CTRL, 325 + MICFIL_OUTGAIN_CHX_SHIFT(1), 0xF, 0, gain_tlv), 326 + SOC_SINGLE_TLV("CH2 Volume", REG_MICFIL_OUT_CTRL, 327 + MICFIL_OUTGAIN_CHX_SHIFT(2), 0xF, 0, gain_tlv), 328 + SOC_SINGLE_TLV("CH3 Volume", REG_MICFIL_OUT_CTRL, 329 + MICFIL_OUTGAIN_CHX_SHIFT(3), 0xF, 0, gain_tlv), 330 + SOC_SINGLE_TLV("CH4 Volume", REG_MICFIL_OUT_CTRL, 331 + MICFIL_OUTGAIN_CHX_SHIFT(4), 0xF, 0, gain_tlv), 332 + SOC_SINGLE_TLV("CH5 Volume", REG_MICFIL_OUT_CTRL, 333 + MICFIL_OUTGAIN_CHX_SHIFT(5), 0xF, 0, gain_tlv), 334 + SOC_SINGLE_TLV("CH6 Volume", REG_MICFIL_OUT_CTRL, 335 + MICFIL_OUTGAIN_CHX_SHIFT(6), 0xF, 0, gain_tlv), 336 + SOC_SINGLE_TLV("CH7 Volume", REG_MICFIL_OUT_CTRL, 337 + MICFIL_OUTGAIN_CHX_SHIFT(7), 0xF, 0, gain_tlv), 338 + }; 339 + 340 + static const struct snd_kcontrol_new fsl_micfil_volume_sx_controls[] = { 336 341 SOC_SINGLE_SX_TLV("CH0 Volume", REG_MICFIL_OUT_CTRL, 337 342 MICFIL_OUTGAIN_CHX_SHIFT(0), 0x8, 0xF, gain_tlv), 338 343 SOC_SINGLE_SX_TLV("CH1 Volume", REG_MICFIL_OUT_CTRL, ··· 368 335 MICFIL_OUTGAIN_CHX_SHIFT(6), 0x8, 0xF, gain_tlv), 369 336 SOC_SINGLE_SX_TLV("CH7 Volume", REG_MICFIL_OUT_CTRL, 370 337 MICFIL_OUTGAIN_CHX_SHIFT(7), 0x8, 0xF, gain_tlv), 338 + }; 339 + 340 + static const struct snd_kcontrol_new fsl_micfil_snd_controls[] = { 371 341 SOC_ENUM_EXT("MICFIL Quality Select", 372 342 fsl_micfil_quality_enum, 373 343 micfil_quality_get, micfil_quality_set), ··· 486 450 struct snd_soc_dai *dai) 487 451 { 488 452 struct fsl_micfil *micfil = snd_soc_dai_get_drvdata(dai); 453 + unsigned int rates[MICFIL_NUM_RATES] = {8000, 11025, 16000, 22050, 32000, 44100, 48000}; 454 + int i, j, k = 0; 455 + u64 clk_rate; 489 456 490 457 if (!micfil) { 491 458 dev_err(dai->dev, "micfil dai priv_data not set\n"); 492 459 return -EINVAL; 493 460 } 461 + 462 + micfil->constraint_rates.list = micfil->constraint_rates_list; 463 + micfil->constraint_rates.count = 0; 464 + 465 + for (j = 0; j < MICFIL_NUM_RATES; j++) { 466 + for (i = 0; i < MICFIL_CLK_SRC_NUM; i++) { 467 + clk_rate = clk_get_rate(micfil->clk_src[i]); 468 + if (clk_rate != 0 && do_div(clk_rate, rates[j]) == 0) { 469 + micfil->constraint_rates_list[k++] = rates[j]; 470 + micfil->constraint_rates.count++; 471 + break; 472 + } 473 + } 474 + } 475 + 476 + if (micfil->constraint_rates.count > 0) 477 + snd_pcm_hw_constraint_list(substream->runtime, 0, 478 + SNDRV_PCM_HW_PARAM_RATE, 479 + &micfil->constraint_rates); 494 480 495 481 return 0; 496 482 } ··· 872 814 return 0; 873 815 } 874 816 817 + static int fsl_micfil_component_probe(struct snd_soc_component *component) 818 + { 819 + struct fsl_micfil *micfil = snd_soc_component_get_drvdata(component); 820 + 821 + if (micfil->soc->volume_sx) 822 + snd_soc_add_component_controls(component, fsl_micfil_volume_sx_controls, 823 + ARRAY_SIZE(fsl_micfil_volume_sx_controls)); 824 + else 825 + snd_soc_add_component_controls(component, fsl_micfil_volume_controls, 826 + ARRAY_SIZE(fsl_micfil_volume_controls)); 827 + 828 + return 0; 829 + } 830 + 875 831 static const struct snd_soc_dai_ops fsl_micfil_dai_ops = { 876 832 .probe = fsl_micfil_dai_probe, 877 833 .startup = fsl_micfil_startup, ··· 907 835 908 836 static const struct snd_soc_component_driver fsl_micfil_component = { 909 837 .name = "fsl-micfil-dai", 838 + .probe = fsl_micfil_component_probe, 910 839 .controls = fsl_micfil_snd_controls, 911 840 .num_controls = ARRAY_SIZE(fsl_micfil_snd_controls), 912 841 .legacy_dai_naming = 1, ··· 1232 1159 1233 1160 fsl_asoc_get_pll_clocks(&pdev->dev, &micfil->pll8k_clk, 1234 1161 &micfil->pll11k_clk); 1162 + 1163 + micfil->clk_src[MICFIL_AUDIO_PLL1] = micfil->pll8k_clk; 1164 + micfil->clk_src[MICFIL_AUDIO_PLL2] = micfil->pll11k_clk; 1165 + micfil->clk_src[MICFIL_CLK_EXT3] = devm_clk_get(&pdev->dev, "clkext3"); 1166 + if (IS_ERR(micfil->clk_src[MICFIL_CLK_EXT3])) 1167 + micfil->clk_src[MICFIL_CLK_EXT3] = NULL; 1235 1168 1236 1169 /* init regmap */ 1237 1170 regs = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
+3
sound/soc/generic/audio-graph-card2.c
··· 270 270 271 271 if (of_node_name_eq(np, GRAPH_NODENAME_MULTI)) { 272 272 ret = GRAPH_MULTI; 273 + fw_devlink_purge_absent_suppliers(&np->fwnode); 273 274 goto out_put; 274 275 } 275 276 276 277 if (of_node_name_eq(np, GRAPH_NODENAME_DPCM)) { 277 278 ret = GRAPH_DPCM; 279 + fw_devlink_purge_absent_suppliers(&np->fwnode); 278 280 goto out_put; 279 281 } 280 282 281 283 if (of_node_name_eq(np, GRAPH_NODENAME_C2C)) { 282 284 ret = GRAPH_C2C; 285 + fw_devlink_purge_absent_suppliers(&np->fwnode); 283 286 goto out_put; 284 287 } 285 288
+55 -9
sound/soc/intel/atom/sst/sst_acpi.c
··· 125 125 .acpi_ipc_irq_index = 0 126 126 }; 127 127 128 + /* For "LPE0F28" ACPI device found on some Android factory OS models */ 129 + static const struct sst_res_info lpe8086_res_info = { 130 + .shim_offset = 0x140000, 131 + .shim_size = 0x000100, 132 + .shim_phy_addr = SST_BYT_SHIM_PHY_ADDR, 133 + .ssp0_offset = 0xa0000, 134 + .ssp0_size = 0x1000, 135 + .dma0_offset = 0x98000, 136 + .dma0_size = 0x4000, 137 + .dma1_offset = 0x9c000, 138 + .dma1_size = 0x4000, 139 + .iram_offset = 0x0c0000, 140 + .iram_size = 0x14000, 141 + .dram_offset = 0x100000, 142 + .dram_size = 0x28000, 143 + .mbox_offset = 0x144000, 144 + .mbox_size = 0x1000, 145 + .acpi_lpe_res_index = 1, 146 + .acpi_ddr_index = 0, 147 + .acpi_ipc_irq_index = 0 148 + }; 149 + 128 150 static struct sst_platform_info byt_rvp_platform_data = { 129 151 .probe_data = &byt_fwparse_info, 130 152 .ipc_info = &byt_ipc_info, ··· 290 268 mach->pdata = &chv_platform_data; 291 269 pdata = mach->pdata; 292 270 293 - ret = kstrtouint(id->id, 16, &dev_id); 294 - if (ret < 0) { 295 - dev_err(dev, "Unique device id conversion error: %d\n", ret); 296 - return ret; 271 + if (!strcmp(id->id, "LPE0F28")) { 272 + struct resource *rsrc; 273 + 274 + /* Use regular BYT SST PCI VID:PID */ 275 + dev_id = 0x80860F28; 276 + byt_rvp_platform_data.res_info = &lpe8086_res_info; 277 + 278 + /* 279 + * The "LPE0F28" ACPI device has separate IO-mem resources for: 280 + * DDR, SHIM, MBOX, IRAM, DRAM, CFG 281 + * None of which covers the entire LPE base address range. 282 + * lpe8086_res_info.acpi_lpe_res_index points to the SHIM. 283 + * Patch this to cover the entire base address range as expected 284 + * by sst_platform_get_resources(). 285 + */ 286 + rsrc = platform_get_resource(pdev, IORESOURCE_MEM, 287 + pdata->res_info->acpi_lpe_res_index); 288 + if (!rsrc) { 289 + dev_err(dev, "Invalid SHIM base\n"); 290 + return -EIO; 291 + } 292 + rsrc->start -= pdata->res_info->shim_offset; 293 + rsrc->end = rsrc->start + 0x200000 - 1; 294 + } else { 295 + ret = kstrtouint(id->id, 16, &dev_id); 296 + if (ret < 0) { 297 + dev_err(dev, "Unique device id conversion error: %d\n", ret); 298 + return ret; 299 + } 300 + 301 + if (soc_intel_is_byt_cr(pdev)) 302 + byt_rvp_platform_data.res_info = &bytcr_res_info; 297 303 } 298 304 299 305 dev_dbg(dev, "ACPI device id: %x\n", dev_id); ··· 329 279 ret = sst_alloc_drv_context(&ctx, dev, dev_id); 330 280 if (ret < 0) 331 281 return ret; 332 - 333 - if (soc_intel_is_byt_cr(pdev)) { 334 - /* override resource info */ 335 - byt_rvp_platform_data.res_info = &bytcr_res_info; 336 - } 337 282 338 283 /* update machine parameters */ 339 284 mach->mach_params.acpi_ipc_irq_index = ··· 389 344 } 390 345 391 346 static const struct acpi_device_id sst_acpi_ids[] = { 347 + { "LPE0F28", (unsigned long)&snd_soc_acpi_intel_baytrail_machines}, 392 348 { "80860F28", (unsigned long)&snd_soc_acpi_intel_baytrail_machines}, 393 349 { "808622A8", (unsigned long)&snd_soc_acpi_intel_cherrytrail_machines}, 394 350 { },
+45 -3
sound/soc/intel/boards/bytcr_rt5640.c
··· 17 17 #include <linux/acpi.h> 18 18 #include <linux/clk.h> 19 19 #include <linux/device.h> 20 + #include <linux/device/bus.h> 20 21 #include <linux/dmi.h> 21 22 #include <linux/gpio/consumer.h> 22 23 #include <linux/gpio/machine.h> ··· 32 31 #include "../../codecs/rt5640.h" 33 32 #include "../atom/sst-atom-controls.h" 34 33 #include "../common/soc-intel-quirks.h" 34 + 35 + #define BYT_RT5640_FALLBACK_CODEC_DEV_NAME "i2c-rt5640" 35 36 36 37 enum { 37 38 BYT_RT5640_DMIC1_MAP, ··· 1132 1129 BYT_RT5640_SSP0_AIF2 | 1133 1130 BYT_RT5640_MCLK_EN), 1134 1131 }, 1132 + { /* Vexia Edu Atla 10 tablet */ 1133 + .matches = { 1134 + DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), 1135 + DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"), 1136 + /* Above strings are too generic, also match on BIOS date */ 1137 + DMI_MATCH(DMI_BIOS_DATE, "08/25/2014"), 1138 + }, 1139 + .driver_data = (void *)(BYT_RT5640_IN1_MAP | 1140 + BYT_RT5640_JD_SRC_JD2_IN4N | 1141 + BYT_RT5640_OVCD_TH_2000UA | 1142 + BYT_RT5640_OVCD_SF_0P75 | 1143 + BYT_RT5640_DIFF_MIC | 1144 + BYT_RT5640_SSP0_AIF2 | 1145 + BYT_RT5640_MCLK_EN), 1146 + }, 1135 1147 { /* Voyo Winpad A15 */ 1136 1148 .matches = { 1137 1149 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), ··· 1712 1694 1713 1695 codec_dev = acpi_get_first_physical_node(adev); 1714 1696 acpi_dev_put(adev); 1715 - if (!codec_dev) 1716 - return -EPROBE_DEFER; 1717 - priv->codec_dev = get_device(codec_dev); 1697 + 1698 + if (codec_dev) { 1699 + priv->codec_dev = get_device(codec_dev); 1700 + } else { 1701 + /* 1702 + * Special case for Android tablets where the codec i2c_client 1703 + * has been manually instantiated by x86_android_tablets.ko due 1704 + * to a broken DSDT. 1705 + */ 1706 + codec_dev = bus_find_device_by_name(&i2c_bus_type, NULL, 1707 + BYT_RT5640_FALLBACK_CODEC_DEV_NAME); 1708 + if (!codec_dev) 1709 + return -EPROBE_DEFER; 1710 + 1711 + if (!i2c_verify_client(codec_dev)) { 1712 + dev_err(dev, "Error '%s' is not an i2c_client\n", 1713 + BYT_RT5640_FALLBACK_CODEC_DEV_NAME); 1714 + put_device(codec_dev); 1715 + } 1716 + 1717 + /* fixup codec name */ 1718 + strscpy(byt_rt5640_codec_name, BYT_RT5640_FALLBACK_CODEC_DEV_NAME, 1719 + sizeof(byt_rt5640_codec_name)); 1720 + 1721 + /* bus_find_device() returns a reference no need to get() */ 1722 + priv->codec_dev = codec_dev; 1723 + } 1718 1724 1719 1725 /* 1720 1726 * swap SSP0 if bytcr is detected
+8
sound/soc/intel/boards/sof_sdw.c
··· 659 659 .callback = sof_sdw_quirk_cb, 660 660 .matches = { 661 661 DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), 662 + DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF1") 663 + }, 664 + .driver_data = (void *)(SOC_SDW_CODEC_SPKR), 665 + }, 666 + { 667 + .callback = sof_sdw_quirk_cb, 668 + .matches = { 669 + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc"), 662 670 DMI_EXACT_MATCH(DMI_PRODUCT_SKU, "0CF7") 663 671 }, 664 672 .driver_data = (void *)(SOC_SDW_CODEC_SPKR),
+38
sound/soc/intel/common/soc-acpi-intel-lnl-match.c
··· 225 225 } 226 226 }; 227 227 228 + static const struct snd_soc_acpi_adr_device rt1318_1_adr[] = { 229 + { 230 + .adr = 0x000133025D131801ull, 231 + .num_endpoints = 1, 232 + .endpoints = &single_endpoint, 233 + .name_prefix = "rt1318-1" 234 + } 235 + }; 236 + 228 237 static const struct snd_soc_acpi_adr_device rt1318_1_group1_adr[] = { 229 238 { 230 239 .adr = 0x000130025D131801ull, ··· 249 240 .num_endpoints = 1, 250 241 .endpoints = &spk_r_endpoint, 251 242 .name_prefix = "rt1318-2" 243 + } 244 + }; 245 + 246 + static const struct snd_soc_acpi_adr_device rt713_0_adr[] = { 247 + { 248 + .adr = 0x000031025D071301ull, 249 + .num_endpoints = 1, 250 + .endpoints = &single_endpoint, 251 + .name_prefix = "rt713" 252 252 } 253 253 }; 254 254 ··· 396 378 {} 397 379 }; 398 380 381 + static const struct snd_soc_acpi_link_adr lnl_sdw_rt713_l0_rt1318_l1[] = { 382 + { 383 + .mask = BIT(0), 384 + .num_adr = ARRAY_SIZE(rt713_0_adr), 385 + .adr_d = rt713_0_adr, 386 + }, 387 + { 388 + .mask = BIT(1), 389 + .num_adr = ARRAY_SIZE(rt1318_1_adr), 390 + .adr_d = rt1318_1_adr, 391 + }, 392 + {} 393 + }; 394 + 399 395 /* this table is used when there is no I2S codec present */ 400 396 struct snd_soc_acpi_mach snd_soc_acpi_intel_lnl_sdw_machines[] = { 401 397 /* mockup tests need to be first */ ··· 478 446 .links = lnl_sdw_rt1318_l12_rt714_l0, 479 447 .drv_name = "sof_sdw", 480 448 .sof_tplg_filename = "sof-lnl-rt1318-l12-rt714-l0.tplg" 449 + }, 450 + { 451 + .link_mask = BIT(0) | BIT(1), 452 + .links = lnl_sdw_rt713_l0_rt1318_l1, 453 + .drv_name = "sof_sdw", 454 + .sof_tplg_filename = "sof-lnl-rt713-l0-rt1318-l1.tplg" 481 455 }, 482 456 {}, 483 457 };
+1
sound/soc/qcom/Kconfig
··· 209 209 tristate "SoC Machine driver for SC7280 boards" 210 210 depends on I2C && SOUNDWIRE 211 211 select SND_SOC_QCOM_COMMON 212 + select SND_SOC_QCOM_SDW 212 213 select SND_SOC_LPASS_SC7280 213 214 select SND_SOC_MAX98357A 214 215 select SND_SOC_WCD938X_SDW
+9 -1
sound/soc/qcom/sc7280.c
··· 23 23 #include "common.h" 24 24 #include "lpass.h" 25 25 #include "qdsp6/q6afe.h" 26 + #include "sdw.h" 26 27 27 28 #define DEFAULT_MCLK_RATE 19200000 28 29 #define RT5682_PLL_FREQ (48000 * 512) ··· 317 316 struct snd_soc_card *card = rtd->card; 318 317 struct sc7280_snd_data *data = snd_soc_card_get_drvdata(card); 319 318 struct snd_soc_dai *cpu_dai = snd_soc_rtd_to_cpu(rtd, 0); 319 + struct sdw_stream_runtime *sruntime = data->sruntime[cpu_dai->id]; 320 320 321 321 switch (cpu_dai->id) { 322 322 case MI2S_PRIMARY: ··· 335 333 default: 336 334 break; 337 335 } 336 + 337 + data->sruntime[cpu_dai->id] = NULL; 338 + sdw_release_stream(sruntime); 338 339 } 339 340 340 341 static int sc7280_snd_startup(struct snd_pcm_substream *substream) ··· 352 347 switch (cpu_dai->id) { 353 348 case MI2S_PRIMARY: 354 349 ret = sc7280_rt5682_init(rtd); 350 + if (ret) 351 + return ret; 355 352 break; 356 353 case SECONDARY_MI2S_RX: 357 354 codec_dai_fmt |= SND_SOC_DAIFMT_NB_NF | SND_SOC_DAIFMT_I2S; ··· 367 360 default: 368 361 break; 369 362 } 370 - return ret; 363 + 364 + return qcom_snd_sdw_startup(substream); 371 365 } 372 366 373 367 static const struct snd_soc_ops sc7280_ops = {
+2
sound/soc/soc-dapm.c
··· 1147 1147 if (*list == NULL) 1148 1148 return -ENOMEM; 1149 1149 1150 + (*list)->num_widgets = size; 1151 + 1150 1152 list_for_each_entry(w, widgets, work_list) 1151 1153 (*list)->widgets[i++] = w; 1152 1154
+9 -1
sound/soc/sof/amd/acp.c
··· 342 342 { 343 343 struct snd_sof_dev *sdev = adata->dev; 344 344 unsigned int val; 345 + unsigned int acp_dma_ch_sts; 345 346 int ret = 0; 346 347 348 + switch (adata->pci_rev) { 349 + case ACP70_PCI_ID: 350 + acp_dma_ch_sts = ACP70_DMA_CH_STS; 351 + break; 352 + default: 353 + acp_dma_ch_sts = ACP_DMA_CH_STS; 354 + } 347 355 val = snd_sof_dsp_read(sdev, ACP_DSP_BAR, ACP_DMA_CNTL_0 + ch * sizeof(u32)); 348 356 if (val & ACP_DMA_CH_RUN) { 349 - ret = snd_sof_dsp_read_poll_timeout(sdev, ACP_DSP_BAR, ACP_DMA_CH_STS, val, !val, 357 + ret = snd_sof_dsp_read_poll_timeout(sdev, ACP_DSP_BAR, acp_dma_ch_sts, val, !val, 350 358 ACP_REG_POLL_INTERVAL, 351 359 ACP_DMA_COMPLETE_TIMEOUT_US); 352 360 if (ret < 0)
+10 -13
sound/soc/sof/intel/hda-dai-ops.c
··· 346 346 case SNDRV_PCM_TRIGGER_PAUSE_RELEASE: 347 347 snd_hdac_ext_stream_start(hext_stream); 348 348 break; 349 - case SNDRV_PCM_TRIGGER_SUSPEND: 350 - case SNDRV_PCM_TRIGGER_STOP: 351 349 case SNDRV_PCM_TRIGGER_PAUSE_PUSH: 352 - snd_hdac_ext_stream_clear(hext_stream); 353 - 354 350 /* 355 - * Save the LLP registers in case the stream is 356 - * restarting due PAUSE_RELEASE, or START without a pcm 357 - * close/open since in this case the LLP register is not reset 358 - * to 0 and the delay calculation will return with invalid 359 - * results. 351 + * Save the LLP registers since in case of PAUSE the LLP 352 + * register are not reset to 0, the delay calculation will use 353 + * the saved offsets for compensating the delay calculation. 360 354 */ 361 355 hext_stream->pplcllpl = readl(hext_stream->pplc_addr + AZX_REG_PPLCLLPL); 362 356 hext_stream->pplcllpu = readl(hext_stream->pplc_addr + AZX_REG_PPLCLLPU); 357 + snd_hdac_ext_stream_clear(hext_stream); 358 + break; 359 + case SNDRV_PCM_TRIGGER_SUSPEND: 360 + case SNDRV_PCM_TRIGGER_STOP: 361 + hext_stream->pplcllpl = 0; 362 + hext_stream->pplcllpu = 0; 363 + snd_hdac_ext_stream_clear(hext_stream); 363 364 break; 364 365 default: 365 366 dev_err(sdev->dev, "unknown trigger command %d\n", cmd); ··· 513 512 static int hda_ipc3_post_trigger(struct snd_sof_dev *sdev, struct snd_soc_dai *cpu_dai, 514 513 struct snd_pcm_substream *substream, int cmd) 515 514 { 516 - struct hdac_ext_stream *hext_stream = hda_get_hext_stream(sdev, cpu_dai, substream); 517 515 struct snd_soc_dapm_widget *w = snd_soc_dai_get_widget(cpu_dai, substream->stream); 518 516 519 517 switch (cmd) { ··· 526 526 ret = hda_dai_config(w, SOF_DAI_CONFIG_FLAGS_HW_FREE, &data); 527 527 if (ret < 0) 528 528 return ret; 529 - 530 - if (cmd == SNDRV_PCM_TRIGGER_STOP) 531 - return hda_link_dma_cleanup(substream, hext_stream, cpu_dai); 532 529 533 530 break; 534 531 }
+33 -4
sound/soc/sof/intel/hda-dai.c
··· 302 302 } 303 303 304 304 switch (cmd) { 305 + case SNDRV_PCM_TRIGGER_STOP: 305 306 case SNDRV_PCM_TRIGGER_SUSPEND: 306 307 ret = hda_link_dma_cleanup(substream, hext_stream, dai); 307 308 if (ret < 0) { ··· 371 370 return -EINVAL; 372 371 } 373 372 373 + sdev = widget_to_sdev(w); 374 + hext_stream = ops->get_hext_stream(sdev, cpu_dai, substream); 375 + 376 + /* nothing more to do if the link is already prepared */ 377 + if (hext_stream && hext_stream->link_prepared) 378 + return 0; 379 + 374 380 /* use HDaudio stream handling */ 375 381 ret = hda_dai_hw_params_data(substream, params, cpu_dai, data, flags); 376 382 if (ret < 0) { ··· 385 377 return ret; 386 378 } 387 379 388 - sdev = widget_to_sdev(w); 389 380 if (sdev->dspless_mode_selected) 390 381 return 0; 391 382 ··· 489 482 int ret; 490 483 int i; 491 484 485 + ops = hda_dai_get_ops(substream, cpu_dai); 486 + if (!ops) { 487 + dev_err(cpu_dai->dev, "DAI widget ops not set\n"); 488 + return -EINVAL; 489 + } 490 + 491 + sdev = widget_to_sdev(w); 492 + hext_stream = ops->get_hext_stream(sdev, cpu_dai, substream); 493 + 494 + /* nothing more to do if the link is already prepared */ 495 + if (hext_stream && hext_stream->link_prepared) 496 + return 0; 497 + 498 + /* 499 + * reset the PCMSyCM registers to handle a prepare callback when the PCM is restarted 500 + * due to xruns or after a call to snd_pcm_drain/drop() 501 + */ 502 + ret = hdac_bus_eml_sdw_map_stream_ch(sof_to_bus(sdev), link_id, cpu_dai->id, 503 + 0, 0, substream->stream); 504 + if (ret < 0) { 505 + dev_err(cpu_dai->dev, "%s: hdac_bus_eml_sdw_map_stream_ch failed %d\n", 506 + __func__, ret); 507 + return ret; 508 + } 509 + 492 510 data.dai_index = (link_id << 8) | cpu_dai->id; 493 511 data.dai_node_id = intel_alh_id; 494 512 ret = non_hda_dai_hw_params_data(substream, params, cpu_dai, &data, flags); ··· 522 490 return ret; 523 491 } 524 492 525 - ops = hda_dai_get_ops(substream, cpu_dai); 526 - sdev = widget_to_sdev(w); 527 493 hext_stream = ops->get_hext_stream(sdev, cpu_dai, substream); 528 - 529 494 if (!hext_stream) 530 495 return -ENODEV; 531 496
+13 -2
sound/soc/sof/ipc4-topology.c
··· 3249 3249 * group_id during copier's ipc_prepare op. 3250 3250 */ 3251 3251 if (flags & SOF_DAI_CONFIG_FLAGS_HW_PARAMS) { 3252 + struct sof_ipc4_alh_configuration_blob *blob; 3253 + 3254 + blob = (struct sof_ipc4_alh_configuration_blob *)ipc4_copier->copier_config; 3252 3255 ipc4_copier->dai_index = data->dai_node_id; 3253 - copier_data->gtw_cfg.node_id &= ~SOF_IPC4_NODE_INDEX_MASK; 3254 - copier_data->gtw_cfg.node_id |= SOF_IPC4_NODE_INDEX(data->dai_node_id); 3256 + 3257 + /* 3258 + * no need to set the node_id for aggregated DAI's. These will be assigned 3259 + * a group_id during widget ipc_prepare 3260 + */ 3261 + if (blob->alh_cfg.device_count == 1) { 3262 + copier_data->gtw_cfg.node_id &= ~SOF_IPC4_NODE_INDEX_MASK; 3263 + copier_data->gtw_cfg.node_id |= 3264 + SOF_IPC4_NODE_INDEX(data->dai_node_id); 3265 + } 3255 3266 } 3256 3267 3257 3268 break;
+1
sound/soc/sof/sof-client-probes-ipc4.c
··· 125 125 msg.primary |= SOF_IPC4_MSG_TARGET(SOF_IPC4_MODULE_MSG); 126 126 msg.extension = SOF_IPC4_MOD_EXT_DST_MOD_INSTANCE(INVALID_PIPELINE_ID); 127 127 msg.extension |= SOF_IPC4_MOD_EXT_CORE_ID(0); 128 + msg.extension |= SOF_IPC4_MOD_EXT_PARAM_SIZE(sizeof(cfg) / sizeof(uint32_t)); 128 129 129 130 msg.data_size = sizeof(cfg); 130 131 msg.data_ptr = &cfg;
+3 -3
sound/soc/stm/stm32_sai_sub.c
··· 326 326 int div; 327 327 328 328 div = DIV_ROUND_CLOSEST(input_rate, output_rate); 329 - if (div > SAI_XCR1_MCKDIV_MAX(version)) { 329 + if (div > SAI_XCR1_MCKDIV_MAX(version) || div <= 0) { 330 330 dev_err(&sai->pdev->dev, "Divider %d out of range\n", div); 331 331 return -EINVAL; 332 332 } ··· 491 491 int div; 492 492 493 493 div = stm32_sai_get_clk_div(sai, *prate, rate); 494 - if (div < 0) 495 - return div; 494 + if (div <= 0) 495 + return -EINVAL; 496 496 497 497 mclk->freq = *prate / div; 498 498
+1 -1
sound/soc/stm/stm32_spdifrx.c
··· 939 939 { 940 940 struct stm32_spdifrx_data *spdifrx = platform_get_drvdata(pdev); 941 941 942 - if (spdifrx->ctrl_chan) 942 + if (!IS_ERR(spdifrx->ctrl_chan)) 943 943 dma_release_channel(spdifrx->ctrl_chan); 944 944 945 945 if (spdifrx->dmab)