Skip to content

Commit 510ae62

Browse files
ujfalusiplbossart
authored andcommitted
ASoC: SOF: Rename dtrace_is_supported flag to fw_trace_is_supported
Rename the internal flag to not limit it's use for dma-trace, but to be used for generic firmware tracing functionality. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
1 parent e91495b commit 510ae62

4 files changed

Lines changed: 12 additions & 10 deletions

File tree

sound/soc/sof/core.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ static int sof_probe_continue(struct snd_sof_dev *sdev)
250250
}
251251

252252
if (sof_debug_check_flag(SOF_DBG_ENABLE_TRACE)) {
253-
sdev->dtrace_is_supported = true;
253+
sdev->fw_trace_is_supported = true;
254254

255255
/* init DMA trace */
256256
ret = snd_sof_init_trace(sdev);

sound/soc/sof/intel/hda-dsp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ static int hda_dsp_set_D0_state(struct snd_sof_dev *sdev,
432432
* when the DSP enters D0I3 while the system is in S0
433433
* for debug purpose.
434434
*/
435-
if (!sdev->dtrace_is_supported ||
435+
if (!sdev->fw_trace_is_supported ||
436436
!hda_enable_trace_D0I3_S0 ||
437437
sdev->system_suspend_target != SOF_SUSPEND_NONE)
438438
flags = HDA_PM_NO_DMA_TRACE;

sound/soc/sof/sof-priv.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,15 @@ struct snd_sof_dev {
546546
int ipc_timeout;
547547
int boot_timeout;
548548

549+
/* firmwre tracing */
550+
bool fw_trace_is_supported; /* set with Kconfig or module parameter */
551+
549552
/* DMA for Trace */
550553
struct snd_dma_buffer dmatb;
551554
struct snd_dma_buffer dmatp;
552555
int dma_trace_pages;
553556
wait_queue_head_t trace_sleep;
554557
u32 host_offset;
555-
bool dtrace_is_supported; /* set with Kconfig or module parameter */
556558
bool dtrace_error;
557559
bool dtrace_draining;
558560
enum sof_dtrace_state dtrace_state;

sound/soc/sof/trace.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ static int snd_sof_enable_trace(struct snd_sof_dev *sdev)
392392
struct sof_ipc_reply ipc_reply;
393393
int ret;
394394

395-
if (!sdev->dtrace_is_supported)
395+
if (!sdev->fw_trace_is_supported)
396396
return 0;
397397

398398
if (sdev->dtrace_state == SOF_DTRACE_ENABLED || !sdev->dma_trace_pages)
@@ -459,9 +459,9 @@ int snd_sof_init_trace(struct snd_sof_dev *sdev)
459459

460460
/* dtrace is only supported with SOF_IPC */
461461
if (sdev->pdata->ipc_type != SOF_IPC)
462-
sdev->dtrace_is_supported = false;
462+
sdev->fw_trace_is_supported = false;
463463

464-
if (!sdev->dtrace_is_supported)
464+
if (!sdev->fw_trace_is_supported)
465465
return 0;
466466

467467
/* set false before start initialization */
@@ -521,7 +521,7 @@ EXPORT_SYMBOL(snd_sof_init_trace);
521521
int snd_sof_trace_update_pos(struct snd_sof_dev *sdev,
522522
struct sof_ipc_dma_trace_posn *posn)
523523
{
524-
if (!sdev->dtrace_is_supported)
524+
if (!sdev->fw_trace_is_supported)
525525
return 0;
526526

527527
if (sdev->dtrace_state == SOF_DTRACE_ENABLED &&
@@ -541,7 +541,7 @@ int snd_sof_trace_update_pos(struct snd_sof_dev *sdev,
541541
/* an error has occurred within the DSP that prevents further trace */
542542
void snd_sof_trace_notify_for_error(struct snd_sof_dev *sdev)
543543
{
544-
if (!sdev->dtrace_is_supported)
544+
if (!sdev->fw_trace_is_supported)
545545
return;
546546

547547
if (sdev->dtrace_state == SOF_DTRACE_ENABLED) {
@@ -559,7 +559,7 @@ static void snd_sof_release_trace(struct snd_sof_dev *sdev, bool only_stop)
559559
struct sof_ipc_reply ipc_reply;
560560
int ret;
561561

562-
if (!sdev->dtrace_is_supported || sdev->dtrace_state == SOF_DTRACE_DISABLED)
562+
if (!sdev->fw_trace_is_supported || sdev->dtrace_state == SOF_DTRACE_DISABLED)
563563
return;
564564

565565
ret = snd_sof_dma_trace_trigger(sdev, SNDRV_PCM_TRIGGER_STOP);
@@ -611,7 +611,7 @@ EXPORT_SYMBOL(snd_sof_trace_resume);
611611

612612
void snd_sof_free_trace(struct snd_sof_dev *sdev)
613613
{
614-
if (!sdev->dtrace_is_supported)
614+
if (!sdev->fw_trace_is_supported)
615615
return;
616616

617617
/* release trace */

0 commit comments

Comments
 (0)