Lines Matching full:sdev

84 	struct snd_sof_dev *sdev = widget_to_sdev(w);  in sdw_params_free()  local
86 if (sdev->pdata->ipc_type == SOF_IPC_TYPE_4) { in sdw_params_free()
137 static int hda_sdw_acpi_scan(struct snd_sof_dev *sdev) in hda_sdw_acpi_scan() argument
139 u32 interface_mask = hda_get_interface_mask(sdev); in hda_sdw_acpi_scan()
147 handle = ACPI_HANDLE(sdev->dev); in hda_sdw_acpi_scan()
150 hdev = sdev->pdata->hw_pdata; in hda_sdw_acpi_scan()
159 static int hda_sdw_probe(struct snd_sof_dev *sdev) in hda_sdw_probe() argument
166 hdev = sdev->pdata->hw_pdata; in hda_sdw_probe()
170 chip = get_chip_info(sdev->pdata); in hda_sdw_probe()
172 res.mmio_base = sdev->bar[HDA_DSP_BAR]; in hda_sdw_probe()
183 res.eml_lock = hdac_bus_eml_get_mutex(sof_to_bus(sdev), true, in hda_sdw_probe()
188 res.mmio_base = sdev->bar[HDA_DSP_HDA_BAR]; in hda_sdw_probe()
201 res.irq = sdev->ipc_irq; in hda_sdw_probe()
203 res.parent = sdev->dev; in hda_sdw_probe()
205 res.dev = sdev->dev; in hda_sdw_probe()
207 res.hbus = sof_to_bus(sdev); in hda_sdw_probe()
221 dev_err(sdev->dev, "error: SoundWire probe failed\n"); in hda_sdw_probe()
231 int hda_sdw_startup(struct snd_sof_dev *sdev) in hda_sdw_startup() argument
234 struct snd_sof_pdata *pdata = sdev->pdata; in hda_sdw_startup()
237 hdev = sdev->pdata->hw_pdata; in hda_sdw_startup()
245 ret = hda_sdw_check_lcount(sdev); in hda_sdw_startup()
253 static int hda_sdw_exit(struct snd_sof_dev *sdev) in hda_sdw_exit() argument
257 hdev = sdev->pdata->hw_pdata; in hda_sdw_exit()
263 hda_sdw_int_enable(sdev, false); in hda_sdw_exit()
268 bool hda_common_check_sdw_irq(struct snd_sof_dev *sdev) in hda_common_check_sdw_irq() argument
274 hdev = sdev->pdata->hw_pdata; in hda_common_check_sdw_irq()
280 irq_status = snd_sof_dsp_read(sdev, HDA_DSP_BAR, HDA_DSP_REG_ADSPIS2); in hda_common_check_sdw_irq()
295 static bool hda_dsp_check_sdw_irq(struct snd_sof_dev *sdev) in hda_dsp_check_sdw_irq() argument
297 u32 interface_mask = hda_get_interface_mask(sdev); in hda_dsp_check_sdw_irq()
303 chip = get_chip_info(sdev->pdata); in hda_dsp_check_sdw_irq()
305 return chip->check_sdw_irq(sdev); in hda_dsp_check_sdw_irq()
315 bool hda_sdw_check_wakeen_irq_common(struct snd_sof_dev *sdev) in hda_sdw_check_wakeen_irq_common() argument
319 hdev = sdev->pdata->hw_pdata; in hda_sdw_check_wakeen_irq_common()
321 snd_sof_dsp_read(sdev, HDA_DSP_BAR, in hda_sdw_check_wakeen_irq_common()
329 static bool hda_sdw_check_wakeen_irq(struct snd_sof_dev *sdev) in hda_sdw_check_wakeen_irq() argument
331 u32 interface_mask = hda_get_interface_mask(sdev); in hda_sdw_check_wakeen_irq()
337 chip = get_chip_info(sdev->pdata); in hda_sdw_check_wakeen_irq()
339 return chip->check_sdw_wakeen_irq(sdev); in hda_sdw_check_wakeen_irq()
344 void hda_sdw_process_wakeen_common(struct snd_sof_dev *sdev) in hda_sdw_process_wakeen_common() argument
346 u32 interface_mask = hda_get_interface_mask(sdev); in hda_sdw_process_wakeen_common()
352 hdev = sdev->pdata->hw_pdata; in hda_sdw_process_wakeen_common()
360 static bool hda_dsp_sdw_check_mic_privacy_irq(struct snd_sof_dev *sdev) in hda_dsp_sdw_check_mic_privacy_irq() argument
364 chip = get_chip_info(sdev->pdata); in hda_dsp_sdw_check_mic_privacy_irq()
366 return chip->check_mic_privacy_irq(sdev, true, in hda_dsp_sdw_check_mic_privacy_irq()
372 static void hda_dsp_sdw_process_mic_privacy(struct snd_sof_dev *sdev) in hda_dsp_sdw_process_mic_privacy() argument
376 chip = get_chip_info(sdev->pdata); in hda_dsp_sdw_process_mic_privacy()
378 chip->process_mic_privacy(sdev, true, AZX_REG_ML_LEPTR_ID_SDW); in hda_dsp_sdw_process_mic_privacy()
382 static inline int hda_sdw_acpi_scan(struct snd_sof_dev *sdev) in hda_sdw_acpi_scan() argument
387 static inline int hda_sdw_probe(struct snd_sof_dev *sdev) in hda_sdw_probe() argument
392 static inline int hda_sdw_exit(struct snd_sof_dev *sdev) in hda_sdw_exit() argument
397 static inline bool hda_dsp_check_sdw_irq(struct snd_sof_dev *sdev) in hda_dsp_check_sdw_irq() argument
407 static inline bool hda_sdw_check_wakeen_irq(struct snd_sof_dev *sdev) in hda_sdw_check_wakeen_irq() argument
412 static inline bool hda_dsp_sdw_check_mic_privacy_irq(struct snd_sof_dev *sdev) in hda_dsp_sdw_check_mic_privacy_irq() argument
417 static inline void hda_dsp_sdw_process_mic_privacy(struct snd_sof_dev *sdev) { } in hda_dsp_sdw_process_mic_privacy() argument
422 int hda_dsp_pre_fw_run(struct snd_sof_dev *sdev) in hda_dsp_pre_fw_run() argument
425 return hda_dsp_ctrl_clock_power_gating(sdev, false); in hda_dsp_pre_fw_run()
429 int hda_dsp_post_fw_run(struct snd_sof_dev *sdev) in hda_dsp_post_fw_run() argument
433 if (sdev->first_boot) { in hda_dsp_post_fw_run()
434 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in hda_dsp_post_fw_run()
436 ret = hda_sdw_startup(sdev); in hda_dsp_post_fw_run()
438 dev_err(sdev->dev, in hda_dsp_post_fw_run()
445 (sdev->fw_ready.flags & SOF_IPC_INFO_D3_PERSISTENT || in hda_dsp_post_fw_run()
446 sdev->pdata->ipc_type == SOF_IPC_TYPE_4)) { in hda_dsp_post_fw_run()
449 0644, sdev->debugfs_root, in hda_dsp_post_fw_run()
454 hda_sdw_int_enable(sdev, true); in hda_dsp_post_fw_run()
457 return hda_dsp_ctrl_clock_power_gating(sdev, true); in hda_dsp_post_fw_run()
489 static int hda_init(struct snd_sof_dev *sdev) in hda_init() argument
493 struct pci_dev *pci = to_pci_dev(sdev->dev); in hda_init()
496 hbus = sof_to_hbus(sdev); in hda_init()
497 bus = sof_to_bus(sdev); in hda_init()
500 sof_hda_bus_init(sdev, &pci->dev); in hda_init()
523 sdev->bar[HDA_DSP_HDA_BAR] = bus->remap_addr; in hda_init()
526 ret = hda_codec_i915_init(sdev); in hda_init()
528 dev_err_probe(sdev->dev, ret, "init of i915 and HDMI codec failed\n"); in hda_init()
533 ret = hda_dsp_ctrl_get_caps(sdev); in hda_init()
535 dev_err(sdev->dev, "error: get caps error\n"); in hda_init()
536 hda_codec_i915_exit(sdev); in hda_init()
541 iounmap(sof_to_bus(sdev)->remap_addr); in hda_init()
546 static int check_dmic_num(struct snd_sof_dev *sdev) in check_dmic_num() argument
548 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in check_dmic_num()
554 dmic_num = intel_nhlt_get_dmic_geo(sdev->dev, nhlt); in check_dmic_num()
556 dev_info(sdev->dev, "DMICs detected in NHLT tables: %d\n", dmic_num); in check_dmic_num()
560 dev_dbg(sdev->dev, in check_dmic_num()
567 dev_dbg(sdev->dev, "invalid dmic_number %d\n", dmic_num); in check_dmic_num()
574 static int check_nhlt_ssp_mask(struct snd_sof_dev *sdev, u8 device_type) in check_nhlt_ssp_mask() argument
576 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in check_nhlt_ssp_mask()
587 dev_info(sdev->dev, "NHLT device %s(%d) detected, ssp_mask %#x\n", in check_nhlt_ssp_mask()
595 static int check_nhlt_ssp_mclk_mask(struct snd_sof_dev *sdev, int ssp_num) in check_nhlt_ssp_mclk_mask() argument
597 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in check_nhlt_ssp_mclk_mask()
607 static int hda_init_caps(struct snd_sof_dev *sdev) in hda_init_caps() argument
609 u32 interface_mask = hda_get_interface_mask(sdev); in hda_init_caps()
610 struct hdac_bus *bus = sof_to_bus(sdev); in hda_init_caps()
611 struct snd_sof_pdata *pdata = sdev->pdata; in hda_init_caps()
618 dev_dbg(sdev->dev, "PP capability, will probe DSP later.\n"); in hda_init_caps()
621 ret = hda_dsp_ctrl_init_chip(sdev, true); in hda_init_caps()
640 ret = hda_sdw_acpi_scan(sdev); in hda_init_caps()
642 dev_dbg(sdev->dev, "skipping SoundWire, not detected with ACPI scan\n"); in hda_init_caps()
648 dev_dbg(sdev->dev, "skipping SoundWire, no links enabled\n"); in hda_init_caps()
659 ret = hda_sdw_probe(sdev); in hda_init_caps()
661 dev_err(sdev->dev, "error: SoundWire probe error\n"); in hda_init_caps()
668 hda_codec_probe_bus(sdev); in hda_init_caps()
671 hda_codec_i915_display_power(sdev, false); in hda_init_caps()
680 struct snd_sof_dev *sdev = context; in hda_dsp_interrupt_handler() local
686 if (snd_sof_dsp_read(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTSTS) & in hda_dsp_interrupt_handler()
690 snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, in hda_dsp_interrupt_handler()
703 struct snd_sof_dev *sdev = context; in hda_dsp_interrupt_thread() local
704 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in hda_dsp_interrupt_thread()
707 if (hda_dsp_check_stream_irq(sdev)) { in hda_dsp_interrupt_thread()
708 trace_sof_intel_hda_irq(sdev, "stream"); in hda_dsp_interrupt_thread()
709 hda_dsp_stream_threaded_handler(irq, sdev); in hda_dsp_interrupt_thread()
712 if (hda_check_ipc_irq(sdev)) { in hda_dsp_interrupt_thread()
713 trace_sof_intel_hda_irq(sdev, "ipc"); in hda_dsp_interrupt_thread()
714 sof_ops(sdev)->irq_thread(irq, sdev); in hda_dsp_interrupt_thread()
717 if (hda_dsp_check_sdw_irq(sdev)) { in hda_dsp_interrupt_thread()
718 trace_sof_intel_hda_irq(sdev, "sdw"); in hda_dsp_interrupt_thread()
722 if (hda_dsp_sdw_check_mic_privacy_irq(sdev)) { in hda_dsp_interrupt_thread()
723 trace_sof_intel_hda_irq(sdev, "mic privacy"); in hda_dsp_interrupt_thread()
724 hda_dsp_sdw_process_mic_privacy(sdev); in hda_dsp_interrupt_thread()
728 if (hda_sdw_check_wakeen_irq(sdev)) { in hda_dsp_interrupt_thread()
729 trace_sof_intel_hda_irq(sdev, "wakeen"); in hda_dsp_interrupt_thread()
730 hda_sdw_process_wakeen(sdev); in hda_dsp_interrupt_thread()
733 hda_codec_check_for_state_change(sdev); in hda_dsp_interrupt_thread()
736 snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, in hda_dsp_interrupt_thread()
744 int hda_dsp_probe_early(struct snd_sof_dev *sdev) in hda_dsp_probe_early() argument
746 struct pci_dev *pci = to_pci_dev(sdev->dev); in hda_dsp_probe_early()
751 if (!sdev->dspless_mode_selected) { in hda_dsp_probe_early()
760 dev_err(sdev->dev, "the DSP is not enabled on this platform, aborting probe\n"); in hda_dsp_probe_early()
763 dev_err(sdev->dev, "unknown PCI class/subclass/prog-if 0x%06x found, aborting probe\n", in hda_dsp_probe_early()
767 dev_info_once(sdev->dev, "DSP detected with PCI class/subclass/prog-if 0x%06x\n", in hda_dsp_probe_early()
771 chip = get_chip_info(sdev->pdata); in hda_dsp_probe_early()
773 dev_err(sdev->dev, "error: no such device supported, chip id:%x\n", in hda_dsp_probe_early()
779 sdev->num_cores = chip->cores_num; in hda_dsp_probe_early()
781 hdev = devm_kzalloc(sdev->dev, sizeof(*hdev), GFP_KERNEL); in hda_dsp_probe_early()
784 sdev->pdata->hw_pdata = hdev; in hda_dsp_probe_early()
786 ret = hda_init(sdev); in hda_dsp_probe_early()
793 int hda_dsp_probe(struct snd_sof_dev *sdev) in hda_dsp_probe() argument
795 struct pci_dev *pci = to_pci_dev(sdev->dev); in hda_dsp_probe()
796 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in hda_dsp_probe()
800 hdev->dmic_dev = platform_device_register_data(sdev->dev, "dmic-codec", in hda_dsp_probe()
804 dev_err(sdev->dev, "error: failed to create DMIC device\n"); in hda_dsp_probe()
815 hdev->no_ipc_position = sof_ops(sdev)->pcm_pointer ? 1 : 0; in hda_dsp_probe()
818 if (sdev->dspless_mode_selected) in hda_dsp_probe()
821 if (sdev->dspless_mode_selected) in hda_dsp_probe()
825 sdev->bar[HDA_DSP_BAR] = pci_ioremap_bar(pci, HDA_DSP_BAR); in hda_dsp_probe()
826 if (!sdev->bar[HDA_DSP_BAR]) { in hda_dsp_probe()
827 dev_err(sdev->dev, "error: ioremap error\n"); in hda_dsp_probe()
832 sdev->mmio_bar = HDA_DSP_BAR; in hda_dsp_probe()
833 sdev->mailbox_bar = HDA_DSP_BAR; in hda_dsp_probe()
838 dev_dbg(sdev->dev, "DMA mask is 32 bit\n"); in hda_dsp_probe()
844 ret = hda_dsp_stream_init(sdev); in hda_dsp_probe()
846 dev_err(sdev->dev, "error: failed to init streams\n"); in hda_dsp_probe()
861 dev_info(sdev->dev, "use msi interrupt mode\n"); in hda_dsp_probe()
862 sdev->ipc_irq = pci_irq_vector(pci, 0); in hda_dsp_probe()
864 sdev->msi_enabled = true; in hda_dsp_probe()
867 if (!sdev->msi_enabled) { in hda_dsp_probe()
868 dev_info(sdev->dev, "use legacy interrupt mode\n"); in hda_dsp_probe()
873 sdev->ipc_irq = pci->irq; in hda_dsp_probe()
876 dev_dbg(sdev->dev, "using IPC IRQ %d\n", sdev->ipc_irq); in hda_dsp_probe()
877 ret = request_threaded_irq(sdev->ipc_irq, hda_dsp_interrupt_handler, in hda_dsp_probe()
879 IRQF_SHARED, "AudioDSP", sdev); in hda_dsp_probe()
881 dev_err(sdev->dev, "error: failed to register IPC IRQ %d\n", in hda_dsp_probe()
882 sdev->ipc_irq); in hda_dsp_probe()
893 snd_sof_pci_update_bits(sdev, PCI_TCSEL, 0x07, 0); in hda_dsp_probe()
896 ret = hda_init_caps(sdev); in hda_dsp_probe()
900 if (!sdev->dspless_mode_selected) { in hda_dsp_probe()
902 hda_dsp_ctrl_ppcap_enable(sdev, true); in hda_dsp_probe()
903 hda_dsp_ctrl_ppcap_int_enable(sdev, true); in hda_dsp_probe()
906 sdev->dsp_box.offset = HDA_DSP_MBOX_UPLINK_OFFSET; in hda_dsp_probe()
911 chip = get_chip_info(sdev->pdata); in hda_dsp_probe()
913 ret = hda_sdw_startup(sdev); in hda_dsp_probe()
915 dev_err(sdev->dev, "could not startup SoundWire links\n"); in hda_dsp_probe()
922 hdev->nhlt = intel_nhlt_init(sdev->dev); in hda_dsp_probe()
927 if (!sdev->dspless_mode_selected) { in hda_dsp_probe()
928 hda_dsp_ctrl_ppcap_int_enable(sdev, false); in hda_dsp_probe()
929 hda_dsp_ctrl_ppcap_enable(sdev, false); in hda_dsp_probe()
932 free_irq(sdev->ipc_irq, sdev); in hda_dsp_probe()
934 if (sdev->msi_enabled) in hda_dsp_probe()
937 hda_dsp_stream_free(sdev); in hda_dsp_probe()
939 if (!sdev->dspless_mode_selected) in hda_dsp_probe()
940 iounmap(sdev->bar[HDA_DSP_BAR]); in hda_dsp_probe()
948 void hda_dsp_remove(struct snd_sof_dev *sdev) in hda_dsp_remove() argument
950 struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; in hda_dsp_remove()
952 struct pci_dev *pci = to_pci_dev(sdev->dev); in hda_dsp_remove()
958 if (!sdev->dspless_mode_selected) in hda_dsp_remove()
962 hda_codec_device_remove(sdev); in hda_dsp_remove()
964 hda_sdw_exit(sdev); in hda_dsp_remove()
969 if (!sdev->dspless_mode_selected) { in hda_dsp_remove()
971 hda_dsp_ctrl_ppcap_int_enable(sdev, false); in hda_dsp_remove()
975 snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL, in hda_dsp_remove()
978 if (sdev->dspless_mode_selected) in hda_dsp_remove()
987 chip->power_down_dsp(sdev); in hda_dsp_remove()
990 hda_dsp_ctrl_ppcap_enable(sdev, false); in hda_dsp_remove()
999 free_irq(sdev->ipc_irq, sdev); in hda_dsp_remove()
1000 if (sdev->msi_enabled) in hda_dsp_remove()
1003 hda_dsp_stream_free(sdev); in hda_dsp_remove()
1005 hda_bus_ml_free(sof_to_bus(sdev)); in hda_dsp_remove()
1007 if (!sdev->dspless_mode_selected) in hda_dsp_remove()
1008 iounmap(sdev->bar[HDA_DSP_BAR]); in hda_dsp_remove()
1012 void hda_dsp_remove_late(struct snd_sof_dev *sdev) in hda_dsp_remove_late() argument
1014 iounmap(sof_to_bus(sdev)->remap_addr); in hda_dsp_remove_late()
1015 sof_hda_bus_exit(sdev); in hda_dsp_remove_late()
1016 hda_codec_i915_exit(sdev); in hda_dsp_remove_late()
1019 int hda_power_down_dsp(struct snd_sof_dev *sdev) in hda_power_down_dsp() argument
1021 struct sof_intel_hda_dev *hda = sdev->pdata->hw_pdata; in hda_power_down_dsp()
1024 return hda_dsp_core_reset_power_down(sdev, chip->host_managed_cores_mask); in hda_power_down_dsp()
1029 static void hda_generic_machine_select(struct snd_sof_dev *sdev, in hda_generic_machine_select() argument
1032 struct hdac_bus *bus = sof_to_bus(sdev); in hda_generic_machine_select()
1035 struct snd_sof_pdata *pdata = sdev->pdata; in hda_generic_machine_select()
1066 hda_mach = devm_kmemdup_array(sdev->dev, in hda_generic_machine_select()
1090 tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, in hda_generic_machine_select()
1112 struct sof_intel_hda_dev *hdev = sdev->pdata->hw_pdata; in hda_generic_machine_select()
1128 static void hda_generic_machine_select(struct snd_sof_dev *sdev, in hda_generic_machine_select() argument
1292 static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev) in hda_sdw_machine_select() argument
1294 struct snd_sof_pdata *pdata = sdev->pdata; in hda_sdw_machine_select()
1310 dev_info(sdev->dev, "SoundWire links not enabled\n"); in hda_sdw_machine_select()
1315 dev_dbg(sdev->dev, "SoundWire context not allocated\n"); in hda_sdw_machine_select()
1320 dev_warn(sdev->dev, "No SoundWire peripheral detected in ACPI tables\n"); in hda_sdw_machine_select()
1354 if (!snd_soc_acpi_sdw_link_slaves_found(sdev->dev, link, in hda_sdw_machine_select()
1366 mach->mach_params.platform = dev_name(sdev->dev); in hda_sdw_machine_select()
1371 dev_info(sdev->dev, "No SoundWire machine driver found for the ACPI-reported configuration:\n"); in hda_sdw_machine_select()
1374 dev_info(sdev->dev, "link %d mfg_id 0x%04x part_id 0x%04x version %#x\n", in hda_sdw_machine_select()
1380 chip = get_chip_info(sdev->pdata); in hda_sdw_machine_select()
1390 mach = devm_kzalloc(sdev->dev, sizeof(*mach), GFP_KERNEL); in hda_sdw_machine_select()
1399 links = devm_kcalloc(sdev->dev, link_num, sizeof(*links), GFP_KERNEL); in hda_sdw_machine_select()
1407 links[link_index].adr_d = find_acpi_adr_device(sdev->dev, peripherals->array[i], in hda_sdw_machine_select()
1416 mach->mach_params.platform = dev_name(sdev->dev); in hda_sdw_machine_select()
1422 mach->sof_tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, in hda_sdw_machine_select()
1425 dev_info(sdev->dev, "Use SoundWire default machine driver with function topologies\n"); in hda_sdw_machine_select()
1429 static struct snd_soc_acpi_mach *hda_sdw_machine_select(struct snd_sof_dev *sdev) in hda_sdw_machine_select() argument
1436 struct snd_sof_dev *sdev) in hda_set_mach_params() argument
1438 struct snd_sof_pdata *pdata = sdev->pdata; in hda_set_mach_params()
1443 mach_params->platform = dev_name(sdev->dev); in hda_set_mach_params()
1486 struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev) in hda_machine_select() argument
1488 u32 interface_mask = hda_get_interface_mask(sdev); in hda_machine_select()
1489 struct snd_sof_pdata *sof_pdata = sdev->pdata; in hda_machine_select()
1491 struct hdac_bus *bus = sof_to_bus(sdev); in hda_machine_select()
1513 mach = hda_sdw_machine_select(sdev); in hda_machine_select()
1522 hda_generic_machine_select(sdev, &mach); in hda_machine_select()
1524 dev_warn(sdev->dev, "warning: No matching ASoC machine driver found\n"); in hda_machine_select()
1529 mach->mach_params.bt_link_mask = check_nhlt_ssp_mask(sdev, NHLT_DEVICE_BT); in hda_machine_select()
1531 dev_info(sdev->dev, "BT link detected in NHLT tables: %#x\n", in hda_machine_select()
1536 dev_dbg(sdev->dev, "overriding BT link detected in NHLT tables %#x by kernel param %#x\n", in hda_machine_select()
1542 dev_warn(sdev->dev, "invalid BT link mask %#x found, reset the mask\n", in hda_machine_select()
1552 const struct sof_intel_dsp_desc *chip = get_chip_info(sdev->pdata); in hda_machine_select()
1562 tplg_filename = remove_file_ext(sdev->dev, mach->sof_tplg_filename); in hda_machine_select()
1576 dev_err(sdev->dev, "Invalid tplg quirk mask 0x%x\n", in hda_machine_select()
1582 mach->mach_params.dmic_num = check_dmic_num(sdev); in hda_machine_select()
1590 tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, in hda_machine_select()
1606 tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, "%s-ssp%d-bt", in hda_machine_select()
1620 mach->mach_params.i2s_link_mask = check_nhlt_ssp_mask(sdev, NHLT_DEVICE_I2S); in hda_machine_select()
1630 dev_warn(sdev->dev, "More than one SSP exposed by NHLT, choosing MSB\n"); in hda_machine_select()
1636 dev_err(sdev->dev, "Invalid SSP %d, max on this platform is %d\n", in hda_machine_select()
1641 tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, in hda_machine_select()
1651 mclk_mask = check_nhlt_ssp_mclk_mask(sdev, ssp_num); in hda_machine_select()
1654 dev_err(sdev->dev, "Invalid MCLK configuration\n"); in hda_machine_select()
1658 dev_dbg(sdev->dev, "MCLK mask %#x found in NHLT\n", mclk_mask); in hda_machine_select()
1661 dev_info(sdev->dev, "Overriding topology with MCLK mask %#x from NHLT\n", mclk_mask); in hda_machine_select()
1662 sdev->mclk_id_override = true; in hda_machine_select()
1663 sdev->mclk_id_quirk = (mclk_mask & BIT(0)) ? 0 : 1; in hda_machine_select()
1667 amp_type = snd_soc_acpi_intel_detect_amp_type(sdev->dev); in hda_machine_select()
1668 codec_type = snd_soc_acpi_intel_detect_codec_type(sdev->dev); in hda_machine_select()
1675 dev_err(sdev->dev, "no tplg suffix found, amp %d\n", in hda_machine_select()
1680 tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, in hda_machine_select()
1696 dev_err(sdev->dev, "no tplg suffix found, codec %d\n", in hda_machine_select()
1701 tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, in hda_machine_select()
1712 tplg_filename = devm_kasprintf(sdev->dev, GFP_KERNEL, in hda_machine_select()
1724 … dev_info(sdev->dev, "Overriding topology with MCLK %d from kernel_parameter\n", mclk_id_override); in hda_machine_select()
1725 sdev->mclk_id_override = true; in hda_machine_select()
1726 sdev->mclk_id_quirk = mclk_id_override; in hda_machine_select()
1747 int hda_register_clients(struct snd_sof_dev *sdev) in hda_register_clients() argument
1749 return hda_probes_register(sdev); in hda_register_clients()
1752 void hda_unregister_clients(struct snd_sof_dev *sdev) in hda_unregister_clients() argument
1754 hda_probes_unregister(sdev); in hda_unregister_clients()