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

Commit e393b33

Browse files
authored
Merge pull request #1 from ranj063/topic/tone
Tone related changes in topology
2 parents bd7dc88 + e6140f8 commit e393b33

5 files changed

Lines changed: 18 additions & 1 deletion

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/pipe-tone.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ C_CONTROLMIXER(Tone Volume, PIPELINE_ID,
3030

3131
# Switch type Mixer Control with max value of 1
3232
C_CONTROLMIXER(Tone Switch, PIPELINE_ID,
33-
CONTROLMIXER_OPS(volsw, 256 binds the mixer control to volume get/put handlers, 256, 256),
33+
CONTROLMIXER_OPS(volsw, 259 binds the mixer control to switch get/put handlers, 259, 259),
3434
CONTROLMIXER_MAX(max 1 indicates switch type control, 1),
3535
false,
3636
,

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,

topology/test/tplg-build.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ simple_test nocodec src "NoCodec" s24le SSP 4 s24le 25 24 2400000 24000000 I2S S
204204

205205
# Tone test: Tone component only supports s32le currently
206206
simple_test codec tone "SSP2-Codec" s32le SSP 2 s16le 20 16 1920000 19200000 I2S TONE_TEST[@]
207+
#Tone Test for APL
208+
simple_test codec tone "SSP5-Codec" s32le SSP 5 s24le 32 24 3072000 24576000 I2S TONE_TEST[@]
209+
simple_test codec tone "SSP5-Codec" s32le SSP 5 s32le 32 32 3072000 24576000 I2S TONE_TEST[@]
207210

208211
#DMIC Test
209212
simple_test nocodec passthrough "DMIC0" s32le DMIC 0 s32le 1 500000 4800000\

0 commit comments

Comments
 (0)