-
Notifications
You must be signed in to change notification settings - Fork 140
Sof hda series for legacy hda mode enabling. #74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6e27a09
7c4d24d
c176a3f
2c361f5
3b7dab1
748035c
a36a21b
3d70689
6f2dcae
d36b009
356a728
d75c293
95387e2
7f556f0
456e8c3
caa51af
45b7db3
71f91bb
209d6f5
599324c
992fb07
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -291,8 +291,10 @@ static int sof_probe(struct platform_device *pdev) | |
| goto ipc_err; | ||
| } | ||
|
|
||
| /* bypass DSP if in force legacy hda debug mode */ | ||
| #ifndef CONFIG_SND_SOC_SOF_FORCE_LEGACY_HDA | ||
|
||
| /* load the firmware */ | ||
| ret = snd_sof_load_firmware(sdev, plat_data->fw, true); | ||
| ret = snd_sof_load_firmware(sdev, true); | ||
| if (ret < 0) { | ||
| dev_err(sdev->dev, "error: failed to load DSP firmware %d\n", | ||
| ret); | ||
|
|
@@ -306,6 +308,7 @@ static int sof_probe(struct platform_device *pdev) | |
| ret); | ||
| goto fw_run_err; | ||
| } | ||
| #endif | ||
|
|
||
| /* now register audio DSP platform driver */ | ||
| ret = snd_soc_register_platform(&pdev->dev, &sdev->plat_drv); | ||
|
|
@@ -324,13 +327,16 @@ static int sof_probe(struct platform_device *pdev) | |
| goto comp_err; | ||
| } | ||
|
|
||
| /* bypass DSP if in force legacy hda debug mode */ | ||
| #ifndef CONFIG_SND_SOC_SOF_FORCE_LEGACY_HDA | ||
|
||
| /* init DMA trace */ | ||
| ret = snd_sof_init_trace(sdev); | ||
| if (ret < 0) { | ||
| /* non fatal */ | ||
| dev_warn(sdev->dev, | ||
| "warning: failed to initialize trace %d\n", ret); | ||
| } | ||
| #endif | ||
|
|
||
| /* autosuspend sof device */ | ||
| pm_runtime_mark_last_busy(sdev->dev); | ||
|
|
@@ -346,9 +352,12 @@ static int sof_probe(struct platform_device *pdev) | |
| snd_soc_unregister_component(&pdev->dev); | ||
| snd_sof_free_topology(sdev); | ||
| fw_run_err: | ||
| /* bypass DSP if in force legacy hda debug mode */ | ||
| #ifndef CONFIG_SND_SOC_SOF_FORCE_LEGACY_HDA | ||
| snd_sof_fw_unload(sdev); | ||
| fw_load_err: | ||
| snd_sof_ipc_free(sdev); | ||
| #endif | ||
| ipc_err: | ||
| snd_sof_free_debug(sdev); | ||
|
||
| dbg_err: | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -113,4 +113,15 @@ config SND_SOC_SOF_HDA | |
| Say Y if you want to enble HDA links with SOF. | ||
| If unsure select "N". | ||
|
|
||
| config SND_SOC_SOF_FORCE_LEGACY_HDA | ||
| bool "SOF force legacy hda and bypass DSP" | ||
| depends on SND_SOC_SOF_HDA | ||
| depends on SND_SOC_SOF_DEBUG | ||
| help | ||
| This forces the driver to use HDA legacy mode, and bypasses | ||
| the embedded DSP in HD-A controller on Intel SKL+ platforms. | ||
| This is designed for debugging only. | ||
| Say Y if you do wan't to use this mode. | ||
|
||
| If unsure select "N". | ||
|
|
||
| endif ## SND_SOC_SOF_INTEL | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,6 +81,7 @@ struct snd_sof_dsp_ops sof_apl_ops = { | |
| .pcm_close = hda_dsp_pcm_close, | ||
| .pcm_hw_params = hda_dsp_pcm_hw_params, | ||
| .pcm_trigger = hda_dsp_pcm_trigger, | ||
| .pcm_pointer = hda_dsp_pcm_pointer, | ||
|
||
|
|
||
| /* firmware loading */ | ||
| .load_firmware = hda_dsp_cl_load_fw, | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the DSP is not enabled, we should select another machine driver.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's true, will change like that.