Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/drivers/intel/cavs/alh.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ static int alh_get_hw_params(struct dai *dai,
{
/* 0 means variable */
params->rate = 0;
params->channels = 0;
params->channels = 2;
params->buffer_fmt = 0;
params->frame_fmt = 0;

Expand Down
5 changes: 5 additions & 0 deletions tools/topology/m4/dai.m4
Original file line number Diff line number Diff line change
Expand Up @@ -200,4 +200,9 @@ define(`DAI_ADD',
`DEBUG_DAI($3, $4)'
)

define(`DAI_ADD_SCHED',
`undefine(`SCHED_COMP')'
`define(`SCHED_COMP', $13)'
`DAI_ADD($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12)'
)
divert(0)dnl
4 changes: 2 additions & 2 deletions tools/topology/m4/demux_coef_default.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ CONTROLBYTES_PRIV(DEMUX_priv,
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
` 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,'
` 0x02,0x00,0x02,0x00,0x02,0x00,0x00,0x00,'
` 0x01,0x00,0x00,0x00,0x02,0x01,0x02,0x04,'
` 0x03,0x00,0x00,0x00,0x02,0x01,0x02,0x04,'
` 0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,'
` 0x05,0x00,0x00,0x00,0x02,0x01,0x02,0x04,'
` 0x04,0x00,0x00,0x00,0x02,0x01,0x02,0x04,'
` 0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00"'
)
25 changes: 16 additions & 9 deletions tools/topology/sof-icl-rt711-rt1308-rt715-hdmi.m4
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,15 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,

# Low Latency playback pipeline 3 on PCM 2 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
PIPELINE_PCM_ADD(sof/pipe-volume-demux-playback.m4,
3, 2, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)

ifdef(`MONO', `',
`# Low Latency playback pipeline 4 on PCM 3 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
PIPELINE_PCM_ADD(sof/pipe-simple-playback.m4,
4, 3, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)')
Expand Down Expand Up @@ -127,10 +127,21 @@ DAI_ADD(sof/pipe-dai-playback.m4,
ifdef(`MONO', `',
`# playback DAI is ALH(SDW2 PIN2) using 2 periods
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
DAI_ADD(sof/pipe-dai-playback.m4,
4, ALH, 0x202, SDW2-Playback,
DAI_ADD_SCHED(sof/pipe-dai-sched-playback.m4,
4, ALH, 0x202, SDW1-Playback,
PIPELINE_SOURCE_4, 2, s24le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)')
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER,
PIPELINE_PLAYBACK_SCHED_COMP_3)')

# Connect demux to capture
SectionGraph."PIPE_DEMUX" {
index "4"

lines [
# mux to 2nd pipeline
dapm(PIPELINE_SOURCE_4, PIPELINE_DEMUX_3)
]
}

# capture DAI is ALH(SDW3 PIN2) using 2 periods
# Buffers use s24le format, with 48 frame per 1000us on core 0 with priority 0
Expand Down Expand Up @@ -165,7 +176,6 @@ dnl PCM_PLAYBACK_ADD(name, pcm_id, playback)
PCM_PLAYBACK_ADD(Headphone, 0, PIPELINE_PCM_1)
PCM_CAPTURE_ADD(Headset mic, 1, PIPELINE_PCM_2)
PCM_PLAYBACK_ADD(SDW1-speakers, 2, PIPELINE_PCM_3)
ifdef(`MONO', `', `PCM_PLAYBACK_ADD(SDW2-speakers, 3, PIPELINE_PCM_4)')
PCM_CAPTURE_ADD(Microphones, 4, PIPELINE_PCM_5)
PCM_PLAYBACK_ADD(HDMI1, 5, PIPELINE_PCM_6)
PCM_PLAYBACK_ADD(HDMI2, 6, PIPELINE_PCM_7)
Expand All @@ -185,9 +195,6 @@ DAI_CONFIG(ALH, 3, 1, SDW0-Capture)
#ALH SDW1 Pin2 (ID: 2)
DAI_CONFIG(ALH, 0x102, 2, SDW1-Playback)

#ALH SDW2 Pin2 (ID: 3)
ifdef(`MONO', `', `DAI_CONFIG(ALH, 0x202, 3, SDW2-Playback)')

#ALH SDW3 Pin2 (ID: 4)
DAI_CONFIG(ALH, 0x302, 4, SDW3-Capture)

Expand Down
24 changes: 24 additions & 0 deletions tools/topology/sof/pipe-dai-sched-playback.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# DAI Playback connector

# Include topology builder
include(`utils.m4')
include(`dai.m4')
include(`pipeline.m4')

#
# DAI definitions
#
W_DAI_OUT(DAI_TYPE, DAI_INDEX, DAI_BE, DAI_FORMAT, 0, DAI_PERIODS)

#
# DAI pipeline - always use 0 for DAIs
#
W_PIPELINE(SCHED_COMP, SCHEDULE_PERIOD, SCHEDULE_PRIORITY, SCHEDULE_CORE, SCHEDULE_TIME_DOMAIN, pipe_dai_schedule_plat)

#
# Graph connections to pipelines

P_GRAPH(DAI_NAME, PIPELINE_ID,
LIST(` ', `dapm(N_DAI_OUT, DAI_BUF)'))

indir(`define', concat(`PIPELINE_PLAYBACK_SCHED_COMP_', PIPELINE_ID), N_DAI_OUT)
26 changes: 26 additions & 0 deletions tools/topology/sof/pipe-simple-playback.m4
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Low Latency Passthrough Pipeline and PCM
#
# Pipeline Endpoints for connection are :-
#
# B0 --> sink DAI0

# Include topology builder
include(`utils.m4')
include(`buffer.m4')
include(`dai.m4')
include(`pipeline.m4')

#
# Components and Buffers
#

# Playback Buffers
W_BUFFER(0, COMP_BUFFER_SIZE(DAI_PERIODS,
COMP_SAMPLE_SIZE(PIPELINE_FORMAT), PIPELINE_CHANNELS, COMP_PERIOD_FRAMES(PCM_MAX_RATE, SCHEDULE_PERIOD)),
PLATFORM_PASS_MEM_CAP)

#
# Pipeline Source and Sinks
#
indir(`define', concat(`PIPELINE_SOURCE_', PIPELINE_ID), N_BUFFER(0))

14 changes: 7 additions & 7 deletions tools/topology/sof/pipe-volume-demux-playback.m4
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
# B2 (DAI buffer)
#
#
# host PCM_P -- B0 --> Demux(M) -- B1 --> volume -- B2 --> sink DAI0
# |
# pipeline n+1 --> DAI
# host PCM_P -- B0 --> volume -- B1 --> Demux(M) -- B2 --> sink DAI0
# |
# pipeline n+1 --> DAI
#

# Include topology builder
Expand Down Expand Up @@ -86,10 +86,10 @@ W_BUFFER(2, COMP_BUFFER_SIZE(DAI_PERIODS,
P_GRAPH(pipe-ll-playback-PIPELINE_ID, PIPELINE_ID,
LIST(` ',
`dapm(N_BUFFER(0), N_PCMP(PCM_ID))',
`dapm(N_MUXDEMUX(0), N_BUFFER(0))',
`dapm(N_BUFFER(1), N_MUXDEMUX(0))',
`dapm(N_PGA(1), N_BUFFER(1))',
`dapm(N_BUFFER(2), N_PGA(1))'))
`dapm(N_PGA(1), N_BUFFER(0))',
`dapm(N_BUFFER(1), N_PGA(1))',
`dapm(N_MUXDEMUX(0), N_BUFFER(1))',
`dapm(N_BUFFER(2), N_MUXDEMUX(0))'))
#
# Pipeline Source and Sinks
#
Expand Down