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

Merge tag 'sound-fix-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
"Here is a collection of fixes that have been gathered since the
previous pull request.

All about device-specific fixes and quirks, and most of them are
pretty small and trivial"

* tag 'sound-fix-6.14-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits)
ALSA: hda/realtek: Workaround for resume on Dell Venue 11 Pro 7130
ALSA: hda: Fix headset detection failure due to unstable sort
ALSA: pcm: use new array-copying-wrapper
ASoC: codec: es8316: "DAC Soft Ramp Rate" is just a 2 bit control
ASoC: amd: acp: Fix possible deadlock
firmware: cs_dsp: FW_CS_DSP_KUNIT_TEST should not select REGMAP
ALSA: usb-audio: Add delay quirk for iBasso DC07 Pro
ALSA: hda/realtek: Fix quirk matching for Legion Pro 7
ASoC: renesas: SND_SIU_MIGOR should depend on DMADEVICES
ASoC: Intel: bytcr_rt5640: Add DMI quirk for Vexia Edu Atla 10 tablet 5V
ASoC: da7213: Initialize the mutex
ASoC: use to_platform_device() instead of container_of()
ASoC: acp: Support microphone from Lenovo Go S
ASoC: SOF: imx8m: Add entry for new 8M Plus revision
ASoC: SOF: imx8: Add entries for new 8QM and 8QXP revisions
ASoC: SOF: imx: Add mach entry to select cs42888 topology
dt-bindings: arm: imx: Add board revisions for i.MX8MP, i.MX8QM and i.MX8QXP
ASoC: fsl_asrc_m2m: select CONFIG_DMA_SHARED_BUFFER
ASoC: audio-graph-card2: use correct endpoint when getting link parameters
ASoC: SOF: imx8m: add SAI2,5,6,7
...

+233 -71
+3
Documentation/devicetree/bindings/arm/fsl.yaml
··· 1091 1091 - dmo,imx8mp-data-modul-edm-sbc # i.MX8MP eDM SBC 1092 1092 - emcraft,imx8mp-navqp # i.MX8MP Emcraft Systems NavQ+ Kit 1093 1093 - fsl,imx8mp-evk # i.MX8MP EVK Board 1094 + - fsl,imx8mp-evk-revb4 # i.MX8MP EVK Rev B4 Board 1094 1095 - gateworks,imx8mp-gw71xx-2x # i.MX8MP Gateworks Board 1095 1096 - gateworks,imx8mp-gw72xx-2x # i.MX8MP Gateworks Board 1096 1097 - gateworks,imx8mp-gw73xx-2x # i.MX8MP Gateworks Board ··· 1272 1271 items: 1273 1272 - enum: 1274 1273 - fsl,imx8qm-mek # i.MX8QM MEK Board 1274 + - fsl,imx8qm-mek-revd # i.MX8QM MEK Rev D Board 1275 1275 - toradex,apalis-imx8 # Apalis iMX8 Modules 1276 1276 - toradex,apalis-imx8-v1.1 # Apalis iMX8 V1.1 Modules 1277 1277 - const: fsl,imx8qm ··· 1301 1299 - enum: 1302 1300 - einfochips,imx8qxp-ai_ml # i.MX8QXP AI_ML Board 1303 1301 - fsl,imx8qxp-mek # i.MX8QXP MEK Board 1302 + - fsl,imx8qxp-mek-wcpu # i.MX8QXP MEK WCPU Board 1304 1303 - const: fsl,imx8qxp 1305 1304 1306 1305 - description: i.MX8DXL based Boards
+1 -1
Documentation/devicetree/bindings/sound/ti,pcm1681.yaml
··· 4 4 $id: http://devicetree.org/schemas/sound/ti,pcm1681.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Texas Instruments PCM1681 8-channel PWM Processor 7 + title: Texas Instruments PCM1681 8-channel Digital-to-Analog Converter 8 8 9 9 maintainers: 10 10 - Shenghao Ding <shenghao-ding@ti.com>
+2 -4
drivers/firmware/cirrus/Kconfig
··· 6 6 7 7 config FW_CS_DSP_KUNIT_TEST_UTILS 8 8 tristate 9 - depends on KUNIT 10 - select REGMAP 9 + depends on KUNIT && REGMAP 11 10 select FW_CS_DSP 12 11 13 12 config FW_CS_DSP_KUNIT_TEST 14 13 tristate "KUnit tests for Cirrus Logic cs_dsp" if !KUNIT_ALL_TESTS 15 - depends on KUNIT 14 + depends on KUNIT && REGMAP 16 15 default KUNIT_ALL_TESTS 17 - select REGMAP 18 16 select FW_CS_DSP 19 17 select FW_CS_DSP_KUNIT_TEST_UTILS 20 18 help
+1 -1
sound/core/pcm_native.c
··· 3245 3245 if (copy_from_user(&xfern, _xfern, sizeof(xfern))) 3246 3246 return -EFAULT; 3247 3247 3248 - bufs = memdup_user(xfern.bufs, sizeof(void *) * runtime->channels); 3248 + bufs = memdup_array_user(xfern.bufs, runtime->channels, sizeof(void *)); 3249 3249 if (IS_ERR(bufs)) 3250 3250 return PTR_ERR(bufs); 3251 3251 if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK)
+7 -1
sound/pci/hda/hda_auto_parser.c
··· 80 80 81 81 /* In case one has boost and the other one has not, 82 82 pick the one with boost first. */ 83 - return (int)(b->has_boost_on_pin - a->has_boost_on_pin); 83 + if (a->has_boost_on_pin != b->has_boost_on_pin) 84 + return (int)(b->has_boost_on_pin - a->has_boost_on_pin); 85 + 86 + /* Keep the original order */ 87 + return a->order - b->order; 84 88 } 85 89 86 90 /* Reorder the surround channels ··· 404 400 reorder_outputs(cfg->speaker_outs, cfg->speaker_pins); 405 401 406 402 /* sort inputs in the order of AUTO_PIN_* type */ 403 + for (i = 0; i < cfg->num_inputs; i++) 404 + cfg->inputs[i].order = i; 407 405 sort(cfg->inputs, cfg->num_inputs, sizeof(cfg->inputs[0]), 408 406 compare_input_type, NULL); 409 407
+1
sound/pci/hda/hda_auto_parser.h
··· 37 37 unsigned int is_headset_mic:1; 38 38 unsigned int is_headphone_mic:1; /* Mic-only in headphone jack */ 39 39 unsigned int has_boost_on_pin:1; 40 + int order; 40 41 }; 41 42 42 43 struct auto_pin_cfg;
+17 -1
sound/pci/hda/patch_realtek.c
··· 7497 7497 spec->gen.pcm_playback_hook = alc287_alc1318_playback_pcm_hook; 7498 7498 } 7499 7499 7500 + /* 7501 + * Clear COEF 0x0d (PCBEEP passthrough) bit 0x40 where BIOS sets it wrongly 7502 + * at PM resume 7503 + */ 7504 + static void alc283_fixup_dell_hp_resume(struct hda_codec *codec, 7505 + const struct hda_fixup *fix, int action) 7506 + { 7507 + if (action == HDA_FIXUP_ACT_INIT) 7508 + alc_write_coef_idx(codec, 0xd, 0x2800); 7509 + } 7500 7510 7501 7511 enum { 7502 7512 ALC269_FIXUP_GPIO2, ··· 7809 7799 ALC269_FIXUP_VAIO_VJFH52_MIC_NO_PRESENCE, 7810 7800 ALC233_FIXUP_MEDION_MTL_SPK, 7811 7801 ALC294_FIXUP_BASS_SPEAKER_15, 7802 + ALC283_FIXUP_DELL_HP_RESUME, 7812 7803 }; 7813 7804 7814 7805 /* A special fixup for Lenovo C940 and Yoga Duet 7; ··· 10154 10143 .type = HDA_FIXUP_FUNC, 10155 10144 .v.func = alc294_fixup_bass_speaker_15, 10156 10145 }, 10146 + [ALC283_FIXUP_DELL_HP_RESUME] = { 10147 + .type = HDA_FIXUP_FUNC, 10148 + .v.func = alc283_fixup_dell_hp_resume, 10149 + }, 10157 10150 }; 10158 10151 10159 10152 static const struct hda_quirk alc269_fixup_tbl[] = { ··· 10218 10203 SND_PCI_QUIRK(0x1028, 0x05f4, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 10219 10204 SND_PCI_QUIRK(0x1028, 0x05f5, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 10220 10205 SND_PCI_QUIRK(0x1028, 0x05f6, "Dell", ALC269_FIXUP_DELL1_MIC_NO_PRESENCE), 10206 + SND_PCI_QUIRK(0x1028, 0x0604, "Dell Venue 11 Pro 7130", ALC283_FIXUP_DELL_HP_RESUME), 10221 10207 SND_PCI_QUIRK(0x1028, 0x0615, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 10222 10208 SND_PCI_QUIRK(0x1028, 0x0616, "Dell Vostro 5470", ALC290_FIXUP_SUBWOOFER_HSJACK), 10223 10209 SND_PCI_QUIRK(0x1028, 0x062c, "Dell Latitude E5550", ALC292_FIXUP_DELL_E7X), ··· 10934 10918 SND_PCI_QUIRK(0x17aa, 0x3869, "Lenovo Yoga7 14IAL7", ALC287_FIXUP_YOGA9_14IAP7_BASS_SPK_PIN), 10935 10919 HDA_CODEC_QUIRK(0x17aa, 0x386e, "Legion Y9000X 2022 IAH7", ALC287_FIXUP_CS35L41_I2C_2), 10936 10920 SND_PCI_QUIRK(0x17aa, 0x386e, "Yoga Pro 7 14ARP8", ALC285_FIXUP_SPEAKER2_TO_DAC1), 10937 - HDA_CODEC_QUIRK(0x17aa, 0x386f, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), 10921 + HDA_CODEC_QUIRK(0x17aa, 0x38a8, "Legion Pro 7 16ARX8H", ALC287_FIXUP_TAS2781_I2C), /* this must match before PCI SSID 17aa:386f below */ 10938 10922 SND_PCI_QUIRK(0x17aa, 0x386f, "Legion Pro 7i 16IAX7", ALC287_FIXUP_CS35L41_I2C_2), 10939 10923 SND_PCI_QUIRK(0x17aa, 0x3870, "Lenovo Yoga 7 14ARB7", ALC287_FIXUP_YOGA7_14ARB7_I2C), 10940 10924 SND_PCI_QUIRK(0x17aa, 0x3877, "Lenovo Legion 7 Slim 16ARHA7", ALC287_FIXUP_CS35L41_I2C_2),
+1
sound/soc/amd/acp/acp-i2s.c
··· 181 181 break; 182 182 default: 183 183 dev_err(dev, "Unknown chip revision %d\n", chip->acp_rev); 184 + spin_unlock_irq(&adata->acp_lock); 184 185 return -EINVAL; 185 186 } 186 187 }
+28
sound/soc/amd/yc/acp6x-mach.c
··· 307 307 { 308 308 .driver_data = &acp6x_card, 309 309 .matches = { 310 + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 311 + DMI_MATCH(DMI_PRODUCT_NAME, "83L3"), 312 + } 313 + }, 314 + { 315 + .driver_data = &acp6x_card, 316 + .matches = { 317 + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 318 + DMI_MATCH(DMI_PRODUCT_NAME, "83N6"), 319 + } 320 + }, 321 + { 322 + .driver_data = &acp6x_card, 323 + .matches = { 324 + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 325 + DMI_MATCH(DMI_PRODUCT_NAME, "83Q2"), 326 + } 327 + }, 328 + { 329 + .driver_data = &acp6x_card, 330 + .matches = { 331 + DMI_MATCH(DMI_BOARD_VENDOR, "LENOVO"), 332 + DMI_MATCH(DMI_PRODUCT_NAME, "83Q3"), 333 + } 334 + }, 335 + { 336 + .driver_data = &acp6x_card, 337 + .matches = { 310 338 DMI_MATCH(DMI_BOARD_VENDOR, "ASUSTeK COMPUTER INC."), 311 339 DMI_MATCH(DMI_PRODUCT_NAME, "UM5302TA"), 312 340 }
+2
sound/soc/codecs/da7213.c
··· 2203 2203 return ret; 2204 2204 } 2205 2205 2206 + mutex_init(&da7213->ctrl_lock); 2207 + 2206 2208 pm_runtime_set_autosuspend_delay(&i2c->dev, 100); 2207 2209 pm_runtime_use_autosuspend(&i2c->dev); 2208 2210 pm_runtime_set_active(&i2c->dev);
+1 -1
sound/soc/codecs/es8316.c
··· 101 101 SOC_DOUBLE_R_TLV("DAC Playback Volume", ES8316_DAC_VOLL, 102 102 ES8316_DAC_VOLR, 0, 0xc0, 1, dac_vol_tlv), 103 103 SOC_SINGLE("DAC Soft Ramp Switch", ES8316_DAC_SET1, 4, 1, 1), 104 - SOC_SINGLE("DAC Soft Ramp Rate", ES8316_DAC_SET1, 2, 4, 0), 104 + SOC_SINGLE("DAC Soft Ramp Rate", ES8316_DAC_SET1, 2, 3, 0), 105 105 SOC_SINGLE("DAC Notch Filter Switch", ES8316_DAC_SET2, 6, 1, 0), 106 106 SOC_SINGLE("DAC Double Fs Switch", ES8316_DAC_SET2, 7, 1, 0), 107 107 SOC_SINGLE("DAC Stereo Enhancement", ES8316_DAC_SET3, 0, 7, 0),
+2 -2
sound/soc/codecs/es8326.c
··· 911 911 regmap_write(es8326->regmap, ES8326_INT_SOURCE, 912 912 (ES8326_INT_SRC_PIN9 | ES8326_INT_SRC_BUTTON)); 913 913 regmap_write(es8326->regmap, ES8326_SYS_BIAS, 0x1f); 914 - regmap_update_bits(es8326->regmap, ES8326_HP_DRIVER_REF, 0x0f, 0x08); 914 + regmap_update_bits(es8326->regmap, ES8326_HP_DRIVER_REF, 0x0f, 0x0d); 915 915 queue_delayed_work(system_wq, &es8326->jack_detect_work, 916 916 msecs_to_jiffies(400)); 917 917 es8326->hp = 1; ··· 1023 1023 struct es8326_priv *es8326 = snd_soc_component_get_drvdata(component); 1024 1024 1025 1025 regmap_write(es8326->regmap, ES8326_RESET, 0x1f); 1026 - regmap_write(es8326->regmap, ES8326_VMIDSEL, 0x0E); 1026 + regmap_write(es8326->regmap, ES8326_VMIDSEL, 0x3E); 1027 1027 regmap_write(es8326->regmap, ES8326_ANA_LP, 0xf0); 1028 1028 usleep_range(10000, 15000); 1029 1029 regmap_write(es8326->regmap, ES8326_HPJACK_TIMER, 0xd9);
+1 -2
sound/soc/codecs/rt5514.c
··· 1091 1091 static int rt5514_probe(struct snd_soc_component *component) 1092 1092 { 1093 1093 struct rt5514_priv *rt5514 = snd_soc_component_get_drvdata(component); 1094 - struct platform_device *pdev = container_of(component->dev, 1095 - struct platform_device, dev); 1094 + struct platform_device *pdev = to_platform_device(component->dev); 1096 1095 1097 1096 rt5514->mclk = devm_clk_get_optional(component->dev, "mclk"); 1098 1097 if (IS_ERR(rt5514->mclk))
+1
sound/soc/fsl/Kconfig
··· 6 6 config SND_SOC_FSL_ASRC 7 7 tristate "Asynchronous Sample Rate Converter (ASRC) module support" 8 8 depends on HAS_DMA 9 + select DMA_SHARED_BUFFER 9 10 select REGMAP_MMIO 10 11 select SND_SOC_GENERIC_DMAENGINE_PCM 11 12 select SND_COMPRESS_ACCEL
+9 -7
sound/soc/fsl/fsl_asrc_m2m.c
··· 183 183 } 184 184 185 185 /* main function of converter */ 186 - static void asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_task_runtime *task) 186 + static int asrc_m2m_device_run(struct fsl_asrc_pair *pair, struct snd_compr_task_runtime *task) 187 187 { 188 188 struct fsl_asrc *asrc = pair->asrc; 189 189 struct device *dev = &asrc->pdev->dev; ··· 193 193 unsigned int out_dma_len; 194 194 unsigned int width; 195 195 u32 fifo_addr; 196 - int ret; 196 + int ret = 0; 197 197 198 198 /* set ratio mod */ 199 199 if (asrc->m2m_set_ratio_mod) { ··· 215 215 in_buf_len > ASRC_M2M_BUFFER_SIZE || 216 216 in_buf_len % (width * pair->channels / 8)) { 217 217 dev_err(dev, "out buffer size is error: [%d]\n", in_buf_len); 218 + ret = -EINVAL; 218 219 goto end; 219 220 } 220 221 ··· 246 245 } 247 246 } else if (out_dma_len > ASRC_M2M_BUFFER_SIZE) { 248 247 dev_err(dev, "cap buffer size error\n"); 248 + ret = -EINVAL; 249 249 goto end; 250 250 } 251 251 ··· 265 263 266 264 if (!wait_for_completion_interruptible_timeout(&pair->complete[IN], 10 * HZ)) { 267 265 dev_err(dev, "out DMA task timeout\n"); 266 + ret = -ETIMEDOUT; 268 267 goto end; 269 268 } 270 269 271 270 if (out_dma_len > 0) { 272 271 if (!wait_for_completion_interruptible_timeout(&pair->complete[OUT], 10 * HZ)) { 273 272 dev_err(dev, "cap DMA task timeout\n"); 273 + ret = -ETIMEDOUT; 274 274 goto end; 275 275 } 276 276 } ··· 282 278 /* update payload length for capture */ 283 279 task->output_size = out_dma_len; 284 280 end: 285 - return; 281 + return ret; 286 282 } 287 283 288 284 static int fsl_asrc_m2m_comp_open(struct snd_compr_stream *stream) ··· 529 525 struct snd_compr_runtime *runtime = stream->runtime; 530 526 struct fsl_asrc_pair *pair = runtime->private_data; 531 527 532 - asrc_m2m_device_run(pair, task); 533 - 534 - return 0; 528 + return asrc_m2m_device_run(pair, task); 535 529 } 536 530 537 531 static int fsl_asrc_m2m_comp_task_stop(struct snd_compr_stream *stream, ··· 635 633 636 634 for (i = 0; i < PAIR_CTX_NUM; i++) { 637 635 pair = asrc->pair[i]; 638 - if (!pair) 636 + if (!pair || !pair->dma_buffer[IN].area || !pair->dma_buffer[OUT].area) 639 637 continue; 640 638 if (!completion_done(&pair->complete[IN])) { 641 639 if (pair->dma_chan[IN])
+29 -33
sound/soc/generic/audio-graph-card2.c
··· 648 648 649 649 static int graph_parse_node_single(struct simple_util_priv *priv, 650 650 enum graph_type gtype, 651 - struct device_node *port, 651 + struct device_node *ep, 652 652 struct link_info *li, int is_cpu) 653 653 { 654 - struct device_node *ep __free(device_node) = of_graph_get_next_port_endpoint(port, NULL); 655 - 656 654 return __graph_parse_node(priv, gtype, ep, li, is_cpu, 0); 657 655 } 658 656 659 657 static int graph_parse_node(struct simple_util_priv *priv, 660 658 enum graph_type gtype, 661 - struct device_node *port, 659 + struct device_node *ep, 662 660 struct link_info *li, int is_cpu) 663 661 { 662 + struct device_node *port __free(device_node) = ep_to_port(ep); 663 + 664 664 if (graph_lnk_is_multi(port)) 665 665 return graph_parse_node_multi(priv, gtype, port, li, is_cpu); 666 666 else 667 - return graph_parse_node_single(priv, gtype, port, li, is_cpu); 667 + return graph_parse_node_single(priv, gtype, ep, li, is_cpu); 668 668 } 669 669 670 670 static void graph_parse_daifmt(struct device_node *node, unsigned int *daifmt) ··· 722 722 723 723 static void graph_link_init(struct simple_util_priv *priv, 724 724 struct device_node *lnk, 725 - struct device_node *port_cpu, 726 - struct device_node *port_codec, 725 + struct device_node *ep_cpu, 726 + struct device_node *ep_codec, 727 727 struct link_info *li, 728 728 int is_cpu_node) 729 729 { 730 730 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 731 731 struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link); 732 - struct device_node *ep_cpu, *ep_codec; 732 + struct device_node *port_cpu = ep_to_port(ep_cpu); 733 + struct device_node *port_codec = ep_to_port(ep_codec); 733 734 struct device_node *multi_cpu_port = NULL, *multi_codec_port = NULL; 734 735 struct snd_soc_dai_link_component *dlc; 735 736 unsigned int daifmt = 0; ··· 740 739 int multi_cpu_port_idx = 1, multi_codec_port_idx = 1; 741 740 int i; 742 741 743 - of_node_get(port_cpu); 744 742 if (graph_lnk_is_multi(port_cpu)) { 745 743 multi_cpu_port = port_cpu; 746 744 ep_cpu = graph_get_next_multi_ep(&multi_cpu_port, multi_cpu_port_idx++); 747 745 of_node_put(port_cpu); 748 746 port_cpu = ep_to_port(ep_cpu); 749 747 } else { 750 - ep_cpu = of_graph_get_next_port_endpoint(port_cpu, NULL); 748 + of_node_get(ep_cpu); 751 749 } 752 750 struct device_node *ports_cpu __free(device_node) = port_to_ports(port_cpu); 753 751 754 - of_node_get(port_codec); 755 752 if (graph_lnk_is_multi(port_codec)) { 756 753 multi_codec_port = port_codec; 757 754 ep_codec = graph_get_next_multi_ep(&multi_codec_port, multi_codec_port_idx++); 758 755 of_node_put(port_codec); 759 756 port_codec = ep_to_port(ep_codec); 760 757 } else { 761 - ep_codec = of_graph_get_next_port_endpoint(port_codec, NULL); 758 + of_node_get(ep_codec); 762 759 } 763 760 struct device_node *ports_codec __free(device_node) = port_to_ports(port_codec); 764 761 ··· 832 833 { 833 834 struct device_node *cpu_port = lnk; 834 835 struct device_node *cpu_ep __free(device_node) = of_graph_get_next_port_endpoint(cpu_port, NULL); 835 - struct device_node *codec_port __free(device_node) = of_graph_get_remote_port(cpu_ep); 836 + struct device_node *codec_ep __free(device_node) = of_graph_get_remote_endpoint(cpu_ep); 836 837 int ret; 837 838 838 839 /* ··· 840 841 * see 841 842 * __graph_parse_node() :: DAI Naming 842 843 */ 843 - ret = graph_parse_node(priv, GRAPH_NORMAL, codec_port, li, 0); 844 + ret = graph_parse_node(priv, GRAPH_NORMAL, codec_ep, li, 0); 844 845 if (ret < 0) 845 846 return ret; 846 847 847 848 /* 848 849 * call CPU, and set DAI Name 849 850 */ 850 - ret = graph_parse_node(priv, GRAPH_NORMAL, cpu_port, li, 1); 851 + ret = graph_parse_node(priv, GRAPH_NORMAL, cpu_ep, li, 1); 851 852 if (ret < 0) 852 853 return ret; 853 854 854 - graph_link_init(priv, lnk, cpu_port, codec_port, li, 1); 855 + graph_link_init(priv, lnk, cpu_ep, codec_ep, li, 1); 855 856 856 857 return ret; 857 858 } ··· 863 864 { 864 865 struct device_node *ep __free(device_node) = of_graph_get_next_port_endpoint(lnk, NULL); 865 866 struct device_node *rep __free(device_node) = of_graph_get_remote_endpoint(ep); 866 - struct device_node *cpu_port = NULL; 867 - struct device_node *codec_port = NULL; 867 + struct device_node *cpu_ep = NULL; 868 + struct device_node *codec_ep = NULL; 868 869 struct snd_soc_dai_link *dai_link = simple_priv_to_link(priv, li->link); 869 870 struct simple_dai_props *dai_props = simple_priv_to_props(priv, li->link); 870 871 int is_cpu = graph_util_is_ports0(lnk); 871 872 int ret; 872 873 873 874 if (is_cpu) { 874 - cpu_port = of_graph_get_remote_port(ep); /* rport */ 875 + cpu_ep = rep; 875 876 876 877 /* 877 878 * dpcm { ··· 900 901 dai_link->dynamic = 1; 901 902 dai_link->dpcm_merged_format = 1; 902 903 903 - ret = graph_parse_node(priv, GRAPH_DPCM, cpu_port, li, 1); 904 + ret = graph_parse_node(priv, GRAPH_DPCM, cpu_ep, li, 1); 904 905 if (ret) 905 - goto err; 906 + return ret; 906 907 907 908 } else { 908 - codec_port = of_graph_get_remote_port(ep); /* rport */ 909 + codec_ep = rep; 909 910 910 911 /* 911 912 * dpcm { ··· 936 937 dai_link->no_pcm = 1; 937 938 dai_link->be_hw_params_fixup = simple_util_be_hw_params_fixup; 938 939 939 - ret = graph_parse_node(priv, GRAPH_DPCM, codec_port, li, 0); 940 + ret = graph_parse_node(priv, GRAPH_DPCM, codec_ep, li, 0); 940 941 if (ret < 0) 941 - goto err; 942 + return ret; 942 943 } 943 944 944 945 graph_parse_convert(ep, dai_props); /* at node of <dpcm> */ 945 946 graph_parse_convert(rep, dai_props); /* at node of <CPU/Codec> */ 946 947 947 - graph_link_init(priv, lnk, cpu_port, codec_port, li, is_cpu); 948 - err: 949 - of_node_put(cpu_port); 950 - of_node_put(codec_port); 948 + graph_link_init(priv, lnk, cpu_ep, codec_ep, li, is_cpu); 951 949 952 950 return ret; 953 951 } ··· 1009 1013 struct device_node *ep0 __free(device_node) = of_graph_get_next_port_endpoint(port0, NULL); 1010 1014 struct device_node *ep1 __free(device_node) = of_graph_get_next_port_endpoint(port1, NULL); 1011 1015 1012 - struct device_node *codec0_port __free(device_node) = of_graph_get_remote_port(ep0); 1013 - struct device_node *codec1_port __free(device_node) = of_graph_get_remote_port(ep1); 1016 + struct device_node *codec0_ep __free(device_node) = of_graph_get_remote_endpoint(ep0); 1017 + struct device_node *codec1_ep __free(device_node) = of_graph_get_remote_endpoint(ep1); 1014 1018 1015 1019 /* 1016 1020 * call Codec first. 1017 1021 * see 1018 1022 * __graph_parse_node() :: DAI Naming 1019 1023 */ 1020 - ret = graph_parse_node(priv, GRAPH_C2C, codec1_port, li, 0); 1024 + ret = graph_parse_node(priv, GRAPH_C2C, codec1_ep, li, 0); 1021 1025 if (ret < 0) 1022 1026 return ret; 1023 1027 1024 1028 /* 1025 1029 * call CPU, and set DAI Name 1026 1030 */ 1027 - ret = graph_parse_node(priv, GRAPH_C2C, codec0_port, li, 1); 1031 + ret = graph_parse_node(priv, GRAPH_C2C, codec0_ep, li, 1); 1028 1032 if (ret < 0) 1029 1033 return ret; 1030 1034 1031 - graph_link_init(priv, lnk, codec0_port, codec1_port, li, 1); 1035 + graph_link_init(priv, lnk, codec0_ep, codec1_ep, li, 1); 1032 1036 1033 1037 return ret; 1034 1038 }
+16 -1
sound/soc/intel/boards/bytcr_rt5640.c
··· 1132 1132 BYT_RT5640_SSP0_AIF2 | 1133 1133 BYT_RT5640_MCLK_EN), 1134 1134 }, 1135 - { /* Vexia Edu Atla 10 tablet */ 1135 + { 1136 + /* Vexia Edu Atla 10 tablet 5V version */ 1137 + .matches = { 1138 + /* Having all 3 of these not set is somewhat unique */ 1139 + DMI_MATCH(DMI_SYS_VENDOR, "To be filled by O.E.M."), 1140 + DMI_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."), 1141 + DMI_MATCH(DMI_BOARD_NAME, "To be filled by O.E.M."), 1142 + /* Above strings are too generic, also match on BIOS date */ 1143 + DMI_MATCH(DMI_BIOS_DATE, "05/14/2015"), 1144 + }, 1145 + .driver_data = (void *)(BYTCR_INPUT_DEFAULTS | 1146 + BYT_RT5640_JD_NOT_INV | 1147 + BYT_RT5640_SSP0_AIF1 | 1148 + BYT_RT5640_MCLK_EN), 1149 + }, 1150 + { /* Vexia Edu Atla 10 tablet 9V version */ 1136 1151 .matches = { 1137 1152 DMI_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), 1138 1153 DMI_MATCH(DMI_BOARD_NAME, "Aptio CRB"),
+1 -1
sound/soc/renesas/Kconfig
··· 67 67 68 68 config SND_SIU_MIGOR 69 69 tristate "SIU sound support on Migo-R" 70 - depends on SH_MIGOR && I2C 70 + depends on SH_MIGOR && I2C && DMADEVICES 71 71 select SND_SOC_SH4_SIU 72 72 select SND_SOC_WM8978 73 73 help
+29 -2
sound/soc/rockchip/rockchip_i2s_tdm.c
··· 22 22 23 23 #define DRV_NAME "rockchip-i2s-tdm" 24 24 25 - #define DEFAULT_MCLK_FS 256 26 25 #define CH_GRP_MAX 4 /* The max channel 8 / 2 */ 27 26 #define MULTIPLEX_CH_MAX 10 28 27 ··· 69 70 bool has_playback; 70 71 bool has_capture; 71 72 struct snd_soc_dai_driver *dai; 73 + unsigned int mclk_rx_freq; 74 + unsigned int mclk_tx_freq; 72 75 }; 73 76 74 77 static int to_ch_num(unsigned int val) ··· 618 617 return 0; 619 618 } 620 619 620 + static int rockchip_i2s_tdm_set_sysclk(struct snd_soc_dai *cpu_dai, int stream, 621 + unsigned int freq, int dir) 622 + { 623 + struct rk_i2s_tdm_dev *i2s_tdm = to_info(cpu_dai); 624 + 625 + if (i2s_tdm->clk_trcm) { 626 + i2s_tdm->mclk_tx_freq = freq; 627 + i2s_tdm->mclk_rx_freq = freq; 628 + } else { 629 + if (stream == SNDRV_PCM_STREAM_PLAYBACK) 630 + i2s_tdm->mclk_tx_freq = freq; 631 + else 632 + i2s_tdm->mclk_rx_freq = freq; 633 + } 634 + 635 + dev_dbg(i2s_tdm->dev, "The target mclk_%s freq is: %d\n", 636 + stream ? "rx" : "tx", freq); 637 + 638 + return 0; 639 + } 640 + 621 641 static int rockchip_i2s_tdm_hw_params(struct snd_pcm_substream *substream, 622 642 struct snd_pcm_hw_params *params, 623 643 struct snd_soc_dai *dai) ··· 653 631 654 632 if (i2s_tdm->clk_trcm == TRCM_TX) { 655 633 mclk = i2s_tdm->mclk_tx; 634 + mclk_rate = i2s_tdm->mclk_tx_freq; 656 635 } else if (i2s_tdm->clk_trcm == TRCM_RX) { 657 636 mclk = i2s_tdm->mclk_rx; 637 + mclk_rate = i2s_tdm->mclk_rx_freq; 658 638 } else if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 659 639 mclk = i2s_tdm->mclk_tx; 640 + mclk_rate = i2s_tdm->mclk_tx_freq; 660 641 } else { 661 642 mclk = i2s_tdm->mclk_rx; 643 + mclk_rate = i2s_tdm->mclk_rx_freq; 662 644 } 663 645 664 - err = clk_set_rate(mclk, DEFAULT_MCLK_FS * params_rate(params)); 646 + err = clk_set_rate(mclk, mclk_rate); 665 647 if (err) 666 648 return err; 667 649 ··· 825 799 .hw_params = rockchip_i2s_tdm_hw_params, 826 800 .set_bclk_ratio = rockchip_i2s_tdm_set_bclk_ratio, 827 801 .set_fmt = rockchip_i2s_tdm_set_fmt, 802 + .set_sysclk = rockchip_i2s_tdm_set_sysclk, 828 803 .set_tdm_slot = rockchip_dai_tdm_slot, 829 804 .trigger = rockchip_i2s_tdm_trigger, 830 805 };
+22 -2
sound/soc/sof/imx/imx8.c
··· 175 175 176 176 static int imx8_probe(struct snd_sof_dev *sdev) 177 177 { 178 - struct platform_device *pdev = 179 - container_of(sdev->dev, struct platform_device, dev); 178 + struct platform_device *pdev = to_platform_device(sdev->dev); 180 179 struct device_node *np = pdev->dev.of_node; 181 180 struct device_node *res_node; 182 181 struct resource *mmio; ··· 606 607 .drv_name = "asoc-audio-graph-card2", 607 608 }, 608 609 { 610 + .compatible = "fsl,imx8qxp-mek-wcpu", 611 + .sof_tplg_filename = "sof-imx8-wm8962.tplg", 612 + .drv_name = "asoc-audio-graph-card2", 613 + }, 614 + { 609 615 .compatible = "fsl,imx8qm-mek", 610 616 .sof_tplg_filename = "sof-imx8-wm8960.tplg", 611 617 .drv_name = "asoc-audio-graph-card2", 612 618 }, 619 + { 620 + .compatible = "fsl,imx8qm-mek-revd", 621 + .sof_tplg_filename = "sof-imx8-wm8962.tplg", 622 + .drv_name = "asoc-audio-graph-card2", 623 + }, 624 + { 625 + .compatible = "fsl,imx8qxp-mek-bb", 626 + .sof_tplg_filename = "sof-imx8-cs42888.tplg", 627 + .drv_name = "asoc-audio-graph-card2", 628 + }, 629 + { 630 + .compatible = "fsl,imx8qm-mek-bb", 631 + .sof_tplg_filename = "sof-imx8-cs42888.tplg", 632 + .drv_name = "asoc-audio-graph-card2", 633 + }, 634 + 613 635 {} 614 636 }; 615 637
+50 -2
sound/soc/sof/imx/imx8m.c
··· 144 144 145 145 static int imx8m_probe(struct snd_sof_dev *sdev) 146 146 { 147 - struct platform_device *pdev = 148 - container_of(sdev->dev, struct platform_device, dev); 147 + struct platform_device *pdev = to_platform_device(sdev->dev); 149 148 struct device_node *np = pdev->dev.of_node; 150 149 struct device_node *res_node; 151 150 struct resource *mmio; ··· 294 295 }, 295 296 }, 296 297 { 298 + .name = "sai2", 299 + .playback = { 300 + .channels_min = 1, 301 + .channels_max = 32, 302 + }, 303 + .capture = { 304 + .channels_min = 1, 305 + .channels_max = 32, 306 + }, 307 + }, 308 + { 297 309 .name = "sai3", 310 + .playback = { 311 + .channels_min = 1, 312 + .channels_max = 32, 313 + }, 314 + .capture = { 315 + .channels_min = 1, 316 + .channels_max = 32, 317 + }, 318 + }, 319 + { 320 + .name = "sai5", 321 + .playback = { 322 + .channels_min = 1, 323 + .channels_max = 32, 324 + }, 325 + .capture = { 326 + .channels_min = 1, 327 + .channels_max = 32, 328 + }, 329 + }, 330 + { 331 + .name = "sai6", 332 + .playback = { 333 + .channels_min = 1, 334 + .channels_max = 32, 335 + }, 336 + .capture = { 337 + .channels_min = 1, 338 + .channels_max = 32, 339 + }, 340 + }, 341 + { 342 + .name = "sai7", 298 343 .playback = { 299 344 .channels_min = 1, 300 345 .channels_max = 32, ··· 514 471 }; 515 472 516 473 static struct snd_sof_of_mach sof_imx8mp_machs[] = { 474 + { 475 + .compatible = "fsl,imx8mp-evk-revb4", 476 + .sof_tplg_filename = "sof-imx8mp-wm8962.tplg", 477 + .drv_name = "asoc-audio-graph-card2", 478 + }, 517 479 { 518 480 .compatible = "fsl,imx8mp-evk", 519 481 .sof_tplg_filename = "sof-imx8mp-wm8960.tplg",
+1 -2
sound/soc/sof/imx/imx8ulp.c
··· 155 155 156 156 static int imx8ulp_probe(struct snd_sof_dev *sdev) 157 157 { 158 - struct platform_device *pdev = 159 - container_of(sdev->dev, struct platform_device, dev); 158 + struct platform_device *pdev = to_platform_device(sdev->dev); 160 159 struct device_node *np = pdev->dev.of_node; 161 160 struct device_node *res_node; 162 161 struct resource *mmio;
+1 -2
sound/soc/sof/intel/bdw.c
··· 410 410 { 411 411 struct snd_sof_pdata *pdata = sdev->pdata; 412 412 const struct sof_dev_desc *desc = pdata->desc; 413 - struct platform_device *pdev = 414 - container_of(sdev->dev, struct platform_device, dev); 413 + struct platform_device *pdev = to_platform_device(sdev->dev); 415 414 const struct sof_intel_dsp_desc *chip; 416 415 struct resource *mmio; 417 416 u32 base, size;
+1 -2
sound/soc/sof/intel/byt.c
··· 109 109 { 110 110 struct snd_sof_pdata *pdata = sdev->pdata; 111 111 const struct sof_dev_desc *desc = pdata->desc; 112 - struct platform_device *pdev = 113 - container_of(sdev->dev, struct platform_device, dev); 112 + struct platform_device *pdev = to_platform_device(sdev->dev); 114 113 const struct sof_intel_dsp_desc *chip; 115 114 struct resource *mmio; 116 115 u32 base, size;
+1 -1
sound/soc/sof/mediatek/mt8186/mt8186.c
··· 238 238 239 239 static int mt8186_dsp_probe(struct snd_sof_dev *sdev) 240 240 { 241 - struct platform_device *pdev = container_of(sdev->dev, struct platform_device, dev); 241 + struct platform_device *pdev = to_platform_device(sdev->dev); 242 242 struct adsp_priv *priv; 243 243 int ret; 244 244
+3 -3
sound/soc/sof/mediatek/mt8195/mt8195.c
··· 228 228 229 229 static int mt8195_dsp_probe(struct snd_sof_dev *sdev) 230 230 { 231 - struct platform_device *pdev = container_of(sdev->dev, struct platform_device, dev); 231 + struct platform_device *pdev = to_platform_device(sdev->dev); 232 232 struct adsp_priv *priv; 233 233 int ret; 234 234 ··· 341 341 342 342 static void mt8195_dsp_remove(struct snd_sof_dev *sdev) 343 343 { 344 - struct platform_device *pdev = container_of(sdev->dev, struct platform_device, dev); 344 + struct platform_device *pdev = to_platform_device(sdev->dev); 345 345 struct adsp_priv *priv = sdev->pdata->hw_pdata; 346 346 347 347 platform_device_unregister(priv->ipc_dev); ··· 351 351 352 352 static int mt8195_dsp_suspend(struct snd_sof_dev *sdev, u32 target_state) 353 353 { 354 - struct platform_device *pdev = container_of(sdev->dev, struct platform_device, dev); 354 + struct platform_device *pdev = to_platform_device(sdev->dev); 355 355 int ret; 356 356 u32 reset_sw, dbg_pc; 357 357
+2
sound/usb/quirks.c
··· 2343 2343 QUIRK_FLAG_CTL_MSG_DELAY_1M), 2344 2344 DEVICE_FLG(0x2d95, 0x8021, /* VIVO USB-C-XE710 HEADSET */ 2345 2345 QUIRK_FLAG_CTL_MSG_DELAY_1M), 2346 + DEVICE_FLG(0x2fc6, 0xf0b7, /* iBasso DC07 Pro */ 2347 + QUIRK_FLAG_CTL_MSG_DELAY_1M), 2346 2348 DEVICE_FLG(0x30be, 0x0101, /* Schiit Hel */ 2347 2349 QUIRK_FLAG_IGNORE_CTL_ERROR), 2348 2350 DEVICE_FLG(0x413c, 0xa506, /* Dell AE515 sound bar */