Skip to content
This repository was archived by the owner on Jan 17, 2019. It is now read-only.

Commit e6140f8

Browse files
committed
topology: add SAMPLE_RATE token for tone comp and define it in tone definition
Add SAMPLE_RATE token for tone comp. Include it in tone definition and set it from the test pipeline definition. Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
1 parent 0914848 commit e6140f8

3 files changed

Lines changed: 14 additions & 0 deletions

File tree

topology/m4/tone.m4

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,15 @@ define(`W_TONE',
1515
` SOF_TKN_COMP_PRELOAD_COUNT' STR($5)
1616
` }'
1717
`}'
18+
`SectionVendorTuples."'N_TONE($1)`_tone_tuples_w" {'
19+
` tokens "sof_tone_tokens"'
20+
` tuples."word" {'
21+
` SOF_TKN_TONE_SAMPLE_RATE' ifdef(TONE_SAMPLE_RATE, STR(TONE_SAMPLE_RATE), "48000")
22+
` }'
23+
`}'
1824
`SectionData."'N_TONE($1)`_data_w" {'
1925
` tuples "'N_TONE($1)`_tuples_w"'
26+
` tuples "'N_TONE($1)`_tone_tuples_w"'
2027
`}'
2128
`SectionVendorTuples."'N_TONE($1)`_tuples_str" {'
2229
` tokens "sof_comp_tokens"'

topology/sof/tokens.m4

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,7 @@ SectionVendorTokens."sof_dmic_pdm_tokens" {
7777
SOF_TKN_INTEL_DMIC_PDM_CLK_EDGE "705"
7878
SOF_TKN_INTEL_DMIC_PDM_SKEW "706"
7979
}
80+
81+
SectionVendorTokens."sof_tone_tokens" {
82+
SOF_TKN_TONE_SAMPLE_RATE "800"
83+
}

topology/test/test-tone-playback.m4

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ include(`dsps/byt.m4')
3636
# Tone --B0--> volume --B1--> SSP2
3737
#
3838

39+
# Set sample rate for tone
40+
define(`TONE_SAMPLE_RATE', 48000)
41+
3942
# Tone Playback pipeline 5 using max 2 channels of TEST_PIPE_FORMAT.
4043
# Schedule with 48 frame per 1000us deadline on core 0 with priority 0
4144
PIPELINE_ADD(sof/pipe-tone.m4,

0 commit comments

Comments
 (0)