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

Merge tag 'asoc-v5.6-2' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Fixes for v5.6

A collection of updates for bugs fixed since the initial pull
request, the most important one being the addition of COMMON_CLK
for wcd934x which is needed for MFD to be merged.

+118 -123
-1
MAINTAINERS
··· 13947 13947 F: tools/testing/selftests/rtc/ 13948 13948 13949 13949 REALTEK AUDIO CODECS 13950 - M: Bard Liao <bardliao@realtek.com> 13951 13950 M: Oder Chiou <oder_chiou@realtek.com> 13952 13951 S: Maintained 13953 13952 F: sound/soc/codecs/rt*
+7 -5
sound/soc/amd/raven/acp3x-i2s.c
··· 234 234 switch (rtd->i2s_instance) { 235 235 case I2S_BT_INSTANCE: 236 236 reg_val = mmACP_BTTDM_ITER; 237 - ier_val = mmACP_BTTDM_IER; 238 237 break; 239 238 case I2S_SP_INSTANCE: 240 239 default: 241 240 reg_val = mmACP_I2STDM_ITER; 242 - ier_val = mmACP_I2STDM_IER; 243 241 } 244 242 245 243 } else { 246 244 switch (rtd->i2s_instance) { 247 245 case I2S_BT_INSTANCE: 248 246 reg_val = mmACP_BTTDM_IRER; 249 - ier_val = mmACP_BTTDM_IER; 250 247 break; 251 248 case I2S_SP_INSTANCE: 252 249 default: 253 250 reg_val = mmACP_I2STDM_IRER; 254 - ier_val = mmACP_I2STDM_IER; 255 251 } 256 252 } 257 253 val = rv_readl(rtd->acp3x_base + reg_val); 258 254 val = val & ~BIT(0); 259 255 rv_writel(val, rtd->acp3x_base + reg_val); 260 - rv_writel(0, rtd->acp3x_base + ier_val); 256 + 257 + if (!(rv_readl(rtd->acp3x_base + mmACP_BTTDM_ITER) & BIT(0)) && 258 + !(rv_readl(rtd->acp3x_base + mmACP_BTTDM_IRER) & BIT(0))) 259 + rv_writel(0, rtd->acp3x_base + mmACP_BTTDM_IER); 260 + if (!(rv_readl(rtd->acp3x_base + mmACP_I2STDM_ITER) & BIT(0)) && 261 + !(rv_readl(rtd->acp3x_base + mmACP_I2STDM_IRER) & BIT(0))) 262 + rv_writel(0, rtd->acp3x_base + mmACP_I2STDM_IER); 261 263 ret = 0; 262 264 break; 263 265 default:
+7 -7
sound/soc/amd/raven/acp3x-pcm-dma.c
··· 349 349 component = snd_soc_rtdcom_lookup(prtd, DRV_NAME); 350 350 adata = dev_get_drvdata(component->dev); 351 351 352 - if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 353 - adata->play_stream = NULL; 354 - adata->i2ssp_play_stream = NULL; 355 - } else { 356 - adata->capture_stream = NULL; 357 - adata->i2ssp_capture_stream = NULL; 358 - } 359 352 360 353 /* Disable ACP irq, when the current stream is being closed and 361 354 * another stream is also not active. ··· 356 363 if (!adata->play_stream && !adata->capture_stream && 357 364 !adata->i2ssp_play_stream && !adata->i2ssp_capture_stream) 358 365 rv_writel(0, adata->acp3x_base + mmACP_EXTERNAL_INTR_ENB); 366 + if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { 367 + adata->play_stream = NULL; 368 + adata->i2ssp_play_stream = NULL; 369 + } else { 370 + adata->capture_stream = NULL; 371 + adata->i2ssp_capture_stream = NULL; 372 + } 359 373 return 0; 360 374 } 361 375
+1
sound/soc/codecs/Kconfig
··· 1334 1334 1335 1335 config SND_SOC_WCD934X 1336 1336 tristate "WCD9340/WCD9341 Codec" 1337 + depends on COMMON_CLK 1337 1338 depends on MFD_WCD934X 1338 1339 help 1339 1340 The WCD9340/9341 is a audio codec IC Integrated in
+2 -1
sound/soc/codecs/max98090.c
··· 52 52 53 53 static void max98090_shdn_save(struct max98090_priv *max98090) 54 54 { 55 - mutex_lock(&max98090->component->card->dapm_mutex); 55 + mutex_lock_nested(&max98090->component->card->dapm_mutex, 56 + SND_SOC_DAPM_CLASS_RUNTIME); 56 57 max98090_shdn_save_locked(max98090); 57 58 } 58 59
+1 -1
sound/soc/codecs/rt1015.c
··· 389 389 "Bypass", "Adaptive", "Fixed Adaptive" 390 390 }; 391 391 392 - static const SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0, 392 + static SOC_ENUM_SINGLE_DECL(rt1015_boost_mode_enum, 0, 0, 393 393 rt1015_boost_mode); 394 394 395 395 static int rt1015_boost_mode_get(struct snd_kcontrol *kcontrol,
+2 -2
sound/soc/codecs/rt1308-sdw.c
··· 673 673 }; 674 674 MODULE_DEVICE_TABLE(sdw, rt1308_id); 675 675 676 - static int rt1308_dev_suspend(struct device *dev) 676 + static int __maybe_unused rt1308_dev_suspend(struct device *dev) 677 677 { 678 678 struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(dev); 679 679 ··· 687 687 688 688 #define RT1308_PROBE_TIMEOUT 2000 689 689 690 - static int rt1308_dev_resume(struct device *dev) 690 + static int __maybe_unused rt1308_dev_resume(struct device *dev) 691 691 { 692 692 struct sdw_slave *slave = dev_to_sdw_dev(dev); 693 693 struct rt1308_sdw_priv *rt1308 = dev_get_drvdata(dev);
+2 -2
sound/soc/codecs/rt700-sdw.c
··· 486 486 }; 487 487 MODULE_DEVICE_TABLE(sdw, rt700_id); 488 488 489 - static int rt700_dev_suspend(struct device *dev) 489 + static int __maybe_unused rt700_dev_suspend(struct device *dev) 490 490 { 491 491 struct rt700_priv *rt700 = dev_get_drvdata(dev); 492 492 ··· 500 500 501 501 #define RT700_PROBE_TIMEOUT 2000 502 502 503 - static int rt700_dev_resume(struct device *dev) 503 + static int __maybe_unused rt700_dev_resume(struct device *dev) 504 504 { 505 505 struct sdw_slave *slave = dev_to_sdw_dev(dev); 506 506 struct rt700_priv *rt700 = dev_get_drvdata(dev);
+2 -2
sound/soc/codecs/rt711-sdw.c
··· 487 487 }; 488 488 MODULE_DEVICE_TABLE(sdw, rt711_id); 489 489 490 - static int rt711_dev_suspend(struct device *dev) 490 + static int __maybe_unused rt711_dev_suspend(struct device *dev) 491 491 { 492 492 struct rt711_priv *rt711 = dev_get_drvdata(dev); 493 493 ··· 501 501 502 502 #define RT711_PROBE_TIMEOUT 2000 503 503 504 - static int rt711_dev_resume(struct device *dev) 504 + static int __maybe_unused rt711_dev_resume(struct device *dev) 505 505 { 506 506 struct sdw_slave *slave = dev_to_sdw_dev(dev); 507 507 struct rt711_priv *rt711 = dev_get_drvdata(dev);
+2 -2
sound/soc/codecs/rt715-sdw.c
··· 549 549 }; 550 550 MODULE_DEVICE_TABLE(sdw, rt715_id); 551 551 552 - static int rt715_dev_suspend(struct device *dev) 552 + static int __maybe_unused rt715_dev_suspend(struct device *dev) 553 553 { 554 554 struct rt715_priv *rt715 = dev_get_drvdata(dev); 555 555 ··· 563 563 564 564 #define RT715_PROBE_TIMEOUT 2000 565 565 566 - static int rt715_dev_resume(struct device *dev) 566 + static int __maybe_unused rt715_dev_resume(struct device *dev) 567 567 { 568 568 struct sdw_slave *slave = dev_to_sdw_dev(dev); 569 569 struct rt715_priv *rt715 = dev_get_drvdata(dev);
+7 -7
sound/soc/intel/boards/bxt_da7219_max98357a.c
··· 617 617 snd_soc_dapm_add_routes(&card->dapm, broxton_map, 618 618 ARRAY_SIZE(broxton_map)); 619 619 620 - pcm = list_first_entry(&ctx->hdmi_pcm_list, struct bxt_hdmi_pcm, 621 - head); 622 - component = pcm->codec_dai->component; 620 + if (list_empty(&ctx->hdmi_pcm_list)) 621 + return -EINVAL; 623 622 624 - if (ctx->common_hdmi_codec_drv) 623 + if (ctx->common_hdmi_codec_drv) { 624 + pcm = list_first_entry(&ctx->hdmi_pcm_list, struct bxt_hdmi_pcm, 625 + head); 626 + component = pcm->codec_dai->component; 625 627 return hda_dsp_hdmi_build_controls(card, component); 628 + } 626 629 627 630 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { 628 631 component = pcm->codec_dai->component; ··· 645 642 646 643 i++; 647 644 } 648 - 649 - if (!component) 650 - return -EINVAL; 651 645 652 646 return hdac_hdmi_jack_port_init(component, &card->dapm); 653 647 }
+7 -7
sound/soc/intel/boards/bxt_rt298.c
··· 529 529 int err, i = 0; 530 530 char jack_name[NAME_SIZE]; 531 531 532 - pcm = list_first_entry(&ctx->hdmi_pcm_list, struct bxt_hdmi_pcm, 533 - head); 534 - component = pcm->codec_dai->component; 532 + if (list_empty(&ctx->hdmi_pcm_list)) 533 + return -EINVAL; 535 534 536 - if (ctx->common_hdmi_codec_drv) 535 + if (ctx->common_hdmi_codec_drv) { 536 + pcm = list_first_entry(&ctx->hdmi_pcm_list, struct bxt_hdmi_pcm, 537 + head); 538 + component = pcm->codec_dai->component; 537 539 return hda_dsp_hdmi_build_controls(card, component); 540 + } 538 541 539 542 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { 540 543 component = pcm->codec_dai->component; ··· 557 554 558 555 i++; 559 556 } 560 - 561 - if (!component) 562 - return -EINVAL; 563 557 564 558 return hdac_hdmi_jack_port_init(component, &card->dapm); 565 559 }
+7 -6
sound/soc/intel/boards/cml_rt1011_rt5682.c
··· 241 241 struct hdmi_pcm *pcm; 242 242 int ret, i = 0; 243 243 244 - pcm = list_first_entry(&ctx->hdmi_pcm_list, struct hdmi_pcm, 245 - head); 246 - component = pcm->codec_dai->component; 244 + if (list_empty(&ctx->hdmi_pcm_list)) 245 + return -EINVAL; 247 246 248 - if (ctx->common_hdmi_codec_drv) 247 + if (ctx->common_hdmi_codec_drv) { 248 + pcm = list_first_entry(&ctx->hdmi_pcm_list, struct hdmi_pcm, 249 + head); 250 + component = pcm->codec_dai->component; 249 251 return hda_dsp_hdmi_build_controls(card, component); 252 + } 250 253 251 254 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { 252 255 component = pcm->codec_dai->component; ··· 268 265 269 266 i++; 270 267 } 271 - if (!component) 272 - return -EINVAL; 273 268 274 269 return hdac_hdmi_jack_port_init(component, &card->dapm); 275 270 }
+8 -8
sound/soc/intel/boards/glk_rt5682_max98357a.c
··· 534 534 struct snd_soc_component *component = NULL; 535 535 char jack_name[NAME_SIZE]; 536 536 struct glk_hdmi_pcm *pcm; 537 - int err = 0; 537 + int err; 538 538 int i = 0; 539 539 540 - pcm = list_first_entry(&ctx->hdmi_pcm_list, struct glk_hdmi_pcm, 541 - head); 542 - component = pcm->codec_dai->component; 540 + if (list_empty(&ctx->hdmi_pcm_list)) 541 + return -EINVAL; 543 542 544 - if (ctx->common_hdmi_codec_drv) 543 + if (ctx->common_hdmi_codec_drv) { 544 + pcm = list_first_entry(&ctx->hdmi_pcm_list, struct glk_hdmi_pcm, 545 + head); 546 + component = pcm->codec_dai->component; 545 547 return hda_dsp_hdmi_build_controls(card, component); 548 + } 546 549 547 550 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { 548 551 component = pcm->codec_dai->component; ··· 565 562 566 563 i++; 567 564 } 568 - 569 - if (!component) 570 - return -EINVAL; 571 565 572 566 return hdac_hdmi_jack_port_init(component, &card->dapm); 573 567 }
+8 -7
sound/soc/intel/boards/sof_rt5682.c
··· 273 273 struct snd_soc_component *component = NULL; 274 274 char jack_name[NAME_SIZE]; 275 275 struct sof_hdmi_pcm *pcm; 276 - int err = 0; 276 + int err; 277 277 int i = 0; 278 278 279 279 /* HDMI is not supported by SOF on Baytrail/CherryTrail */ 280 280 if (is_legacy_cpu) 281 281 return 0; 282 282 283 - pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm, 284 - head); 285 - component = pcm->codec_dai->component; 283 + if (list_empty(&ctx->hdmi_pcm_list)) 284 + return -EINVAL; 286 285 287 - if (ctx->common_hdmi_codec_drv) 286 + if (ctx->common_hdmi_codec_drv) { 287 + pcm = list_first_entry(&ctx->hdmi_pcm_list, struct sof_hdmi_pcm, 288 + head); 289 + component = pcm->codec_dai->component; 288 290 return hda_dsp_hdmi_build_controls(card, component); 291 + } 289 292 290 293 list_for_each_entry(pcm, &ctx->hdmi_pcm_list, head) { 291 294 component = pcm->codec_dai->component; ··· 308 305 309 306 i++; 310 307 } 311 - if (!component) 312 - return -EINVAL; 313 308 314 309 return hdac_hdmi_jack_port_init(component, &card->dapm); 315 310 }
+1 -1
sound/soc/intel/common/soc-acpi-intel-icl-match.c
··· 59 59 }; 60 60 61 61 static const u64 rt715_3_adr[] = { 62 - 0x000310025D715000 62 + 0x000310025D071500 63 63 }; 64 64 65 65 static const struct snd_soc_acpi_link_adr icl_3_in_1_default[] = {
+16 -22
sound/soc/sof/core.c
··· 224 224 if (ret < 0) { 225 225 dev_err(sdev->dev, 226 226 "error: failed to register DSP DAI driver %d\n", ret); 227 - goto fw_run_err; 227 + goto fw_trace_err; 228 228 } 229 229 230 230 ret = snd_sof_machine_register(sdev, plat_data); 231 231 if (ret < 0) 232 - goto fw_run_err; 232 + goto fw_trace_err; 233 233 234 234 /* 235 235 * Some platforms in SOF, ex: BYT, may not have their platform PM ··· 244 244 245 245 return 0; 246 246 247 - #if !IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE) 247 + fw_trace_err: 248 + snd_sof_free_trace(sdev); 248 249 fw_run_err: 249 250 snd_sof_fw_unload(sdev); 250 251 fw_load_err: ··· 254 253 snd_sof_free_debug(sdev); 255 254 dbg_err: 256 255 snd_sof_remove(sdev); 257 - #else 258 256 259 - /* 260 - * when the probe_continue is handled in a work queue, the 261 - * probe does not fail so we don't release resources here. 262 - * They will be released with an explicit call to 263 - * snd_sof_device_remove() when the PCI/ACPI device is removed 264 - */ 265 - 266 - fw_run_err: 267 - fw_load_err: 268 - ipc_err: 269 - dbg_err: 270 - 271 - #endif 257 + /* all resources freed, update state to match */ 258 + sdev->fw_state = SOF_FW_BOOT_NOT_STARTED; 259 + sdev->first_boot = true; 272 260 273 261 return ret; 274 262 } ··· 340 350 if (IS_ENABLED(CONFIG_SND_SOC_SOF_PROBE_WORK_QUEUE)) 341 351 cancel_work_sync(&sdev->probe_work); 342 352 343 - snd_sof_fw_unload(sdev); 344 - snd_sof_ipc_free(sdev); 345 - snd_sof_free_debug(sdev); 346 - snd_sof_free_trace(sdev); 353 + if (sdev->fw_state > SOF_FW_BOOT_NOT_STARTED) { 354 + snd_sof_fw_unload(sdev); 355 + snd_sof_ipc_free(sdev); 356 + snd_sof_free_debug(sdev); 357 + snd_sof_free_trace(sdev); 358 + } 347 359 348 360 /* 349 361 * Unregister machine driver. This will unbind the snd_card which ··· 353 361 * before freeing the snd_card. 354 362 */ 355 363 snd_sof_machine_unregister(sdev, pdata); 364 + 356 365 /* 357 366 * Unregistering the machine driver results in unloading the topology. 358 367 * Some widgets, ex: scheduler, attempt to power down the core they are 359 368 * scheduled on, when they are unloaded. Therefore, the DSP must be 360 369 * removed only after the topology has been unloaded. 361 370 */ 362 - snd_sof_remove(sdev); 371 + if (sdev->fw_state > SOF_FW_BOOT_NOT_STARTED) 372 + snd_sof_remove(sdev); 363 373 364 374 /* release firmware */ 365 375 release_firmware(pdata->fw);
+6 -15
sound/soc/sof/intel/hda-codec.c
··· 170 170 #if IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI) || \ 171 171 IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI) 172 172 173 - void hda_codec_i915_get(struct snd_sof_dev *sdev) 173 + void hda_codec_i915_display_power(struct snd_sof_dev *sdev, bool enable) 174 174 { 175 175 struct hdac_bus *bus = sof_to_bus(sdev); 176 176 177 - dev_dbg(bus->dev, "Turning i915 HDAC power on\n"); 178 - snd_hdac_display_power(bus, HDA_CODEC_IDX_CONTROLLER, true); 177 + dev_dbg(bus->dev, "Turning i915 HDAC power %d\n", enable); 178 + snd_hdac_display_power(bus, HDA_CODEC_IDX_CONTROLLER, enable); 179 179 } 180 - EXPORT_SYMBOL_NS(hda_codec_i915_get, SND_SOC_SOF_HDA_AUDIO_CODEC_I915); 181 - 182 - void hda_codec_i915_put(struct snd_sof_dev *sdev) 183 - { 184 - struct hdac_bus *bus = sof_to_bus(sdev); 185 - 186 - dev_dbg(bus->dev, "Turning i915 HDAC power off\n"); 187 - snd_hdac_display_power(bus, HDA_CODEC_IDX_CONTROLLER, false); 188 - } 189 - EXPORT_SYMBOL_NS(hda_codec_i915_put, SND_SOC_SOF_HDA_AUDIO_CODEC_I915); 180 + EXPORT_SYMBOL_NS(hda_codec_i915_display_power, SND_SOC_SOF_HDA_AUDIO_CODEC_I915); 190 181 191 182 int hda_codec_i915_init(struct snd_sof_dev *sdev) 192 183 { ··· 189 198 if (ret < 0) 190 199 return ret; 191 200 192 - hda_codec_i915_get(sdev); 201 + hda_codec_i915_display_power(sdev, true); 193 202 194 203 return 0; 195 204 } ··· 200 209 struct hdac_bus *bus = sof_to_bus(sdev); 201 210 int ret; 202 211 203 - hda_codec_i915_put(sdev); 212 + hda_codec_i915_display_power(sdev, false); 204 213 205 214 ret = snd_hdac_i915_exit(bus); 206 215
+2 -1
sound/soc/sof/intel/hda.c
··· 380 380 /* create codec instances */ 381 381 hda_codec_probe_bus(sdev, hda_codec_use_common_hdmi); 382 382 383 - hda_codec_i915_put(sdev); 383 + if (!HDA_IDISP_CODEC(bus->codec_mask)) 384 + hda_codec_i915_display_power(sdev, false); 384 385 385 386 /* 386 387 * we are done probing so decrement link counts
+3 -4
sound/soc/sof/intel/hda.h
··· 586 586 (IS_ENABLED(CONFIG_SND_HDA_CODEC_HDMI) || \ 587 587 IS_ENABLED(CONFIG_SND_SOC_HDAC_HDMI)) 588 588 589 - void hda_codec_i915_get(struct snd_sof_dev *sdev); 590 - void hda_codec_i915_put(struct snd_sof_dev *sdev); 589 + void hda_codec_i915_display_power(struct snd_sof_dev *sdev, bool enable); 591 590 int hda_codec_i915_init(struct snd_sof_dev *sdev); 592 591 int hda_codec_i915_exit(struct snd_sof_dev *sdev); 593 592 594 593 #else 595 594 596 - static inline void hda_codec_i915_get(struct snd_sof_dev *sdev) { } 597 - static inline void hda_codec_i915_put(struct snd_sof_dev *sdev) { } 595 + static inline void hda_codec_i915_display_power(struct snd_sof_dev *sdev, 596 + bool enable) { } 598 597 static inline int hda_codec_i915_init(struct snd_sof_dev *sdev) { return 0; } 599 598 static inline int hda_codec_i915_exit(struct snd_sof_dev *sdev) { return 0; } 600 599
+10
sound/soc/sof/pcm.c
··· 591 591 "spcm: allocate %s playback DMA buffer size 0x%x max 0x%x\n", 592 592 caps->name, caps->buffer_size_min, caps->buffer_size_max); 593 593 594 + if (!pcm->streams[stream].substream) { 595 + dev_err(component->dev, "error: NULL playback substream!\n"); 596 + return -EINVAL; 597 + } 598 + 594 599 snd_pcm_set_managed_buffer(pcm->streams[stream].substream, 595 600 SNDRV_DMA_TYPE_DEV_SG, sdev->dev, 596 601 le32_to_cpu(caps->buffer_size_min), ··· 613 608 dev_dbg(component->dev, 614 609 "spcm: allocate %s capture DMA buffer size 0x%x max 0x%x\n", 615 610 caps->name, caps->buffer_size_min, caps->buffer_size_max); 611 + 612 + if (!pcm->streams[stream].substream) { 613 + dev_err(component->dev, "error: NULL capture substream!\n"); 614 + return -EINVAL; 615 + } 616 616 617 617 snd_pcm_set_managed_buffer(pcm->streams[stream].substream, 618 618 SNDRV_DMA_TYPE_DEV_SG, sdev->dev,
+4
sound/soc/sof/pm.c
··· 56 56 if (!sof_ops(sdev)->resume || !sof_ops(sdev)->runtime_resume) 57 57 return 0; 58 58 59 + /* DSP was never successfully started, nothing to resume */ 60 + if (sdev->first_boot) 61 + return 0; 62 + 59 63 /* 60 64 * if the runtime_resume flag is set, call the runtime_resume routine 61 65 * or else call the system resume routine
+3
sound/soc/sof/sof-pci-dev.c
··· 235 235 .chip_info = &jsl_chip_info, 236 236 .default_fw_path = "intel/sof", 237 237 .default_tplg_path = "intel/sof-tplg", 238 + .default_fw_filename = "sof-jsl.ri", 238 239 .nocodec_tplg_filename = "sof-jsl-nocodec.tplg", 239 240 .ops = &sof_cnl_ops, 240 241 }; ··· 416 415 #endif 417 416 #if IS_ENABLED(CONFIG_SND_SOC_SOF_JASPERLAKE) 418 417 { PCI_DEVICE(0x8086, 0x38c8), 418 + .driver_data = (unsigned long)&jsl_desc}, 419 + { PCI_DEVICE(0x8086, 0x4dc8), 419 420 .driver_data = (unsigned long)&jsl_desc}, 420 421 #endif 421 422 #if IS_ENABLED(CONFIG_SND_SOC_SOF_COMETLAKE_LP)
+5 -2
sound/soc/sof/trace.c
··· 343 343 344 344 snd_sof_release_trace(sdev); 345 345 346 - snd_dma_free_pages(&sdev->dmatb); 347 - snd_dma_free_pages(&sdev->dmatp); 346 + if (sdev->dma_trace_pages) { 347 + snd_dma_free_pages(&sdev->dmatb); 348 + snd_dma_free_pages(&sdev->dmatp); 349 + sdev->dma_trace_pages = 0; 350 + } 348 351 } 349 352 EXPORT_SYMBOL(snd_sof_free_trace);
+5 -20
sound/soc/tegra/tegra30_i2s.c
··· 127 127 struct device *dev = dai->dev; 128 128 struct tegra30_i2s *i2s = snd_soc_dai_get_drvdata(dai); 129 129 unsigned int mask, val, reg; 130 - int ret, sample_size, srate, i2sclock, bitcnt, audio_bits; 130 + int ret, sample_size, srate, i2sclock, bitcnt; 131 131 struct tegra30_ahub_cif_conf cif_conf; 132 132 133 133 if (params_channels(params) != 2) ··· 137 137 switch (params_format(params)) { 138 138 case SNDRV_PCM_FORMAT_S16_LE: 139 139 val = TEGRA30_I2S_CTRL_BIT_SIZE_16; 140 - audio_bits = TEGRA30_AUDIOCIF_BITS_16; 141 140 sample_size = 16; 142 - break; 143 - case SNDRV_PCM_FORMAT_S24_LE: 144 - val = TEGRA30_I2S_CTRL_BIT_SIZE_24; 145 - audio_bits = TEGRA30_AUDIOCIF_BITS_24; 146 - sample_size = 24; 147 - break; 148 - case SNDRV_PCM_FORMAT_S32_LE: 149 - val = TEGRA30_I2S_CTRL_BIT_SIZE_32; 150 - audio_bits = TEGRA30_AUDIOCIF_BITS_32; 151 - sample_size = 32; 152 141 break; 153 142 default: 154 143 return -EINVAL; ··· 170 181 cif_conf.threshold = 0; 171 182 cif_conf.audio_channels = 2; 172 183 cif_conf.client_channels = 2; 173 - cif_conf.audio_bits = audio_bits; 174 - cif_conf.client_bits = audio_bits; 184 + cif_conf.audio_bits = TEGRA30_AUDIOCIF_BITS_16; 185 + cif_conf.client_bits = TEGRA30_AUDIOCIF_BITS_16; 175 186 cif_conf.expand = 0; 176 187 cif_conf.stereo_conv = 0; 177 188 cif_conf.replicate = 0; ··· 306 317 .channels_min = 2, 307 318 .channels_max = 2, 308 319 .rates = SNDRV_PCM_RATE_8000_96000, 309 - .formats = SNDRV_PCM_FMTBIT_S32_LE | 310 - SNDRV_PCM_FMTBIT_S24_LE | 311 - SNDRV_PCM_FMTBIT_S16_LE, 320 + .formats = SNDRV_PCM_FMTBIT_S16_LE, 312 321 }, 313 322 .capture = { 314 323 .stream_name = "Capture", 315 324 .channels_min = 2, 316 325 .channels_max = 2, 317 326 .rates = SNDRV_PCM_RATE_8000_96000, 318 - .formats = SNDRV_PCM_FMTBIT_S32_LE | 319 - SNDRV_PCM_FMTBIT_S24_LE | 320 - SNDRV_PCM_FMTBIT_S16_LE, 327 + .formats = SNDRV_PCM_FMTBIT_S16_LE, 321 328 }, 322 329 .ops = &tegra30_i2s_dai_ops, 323 330 .symmetric_rates = 1,