Skip to content
Merged
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
39 changes: 31 additions & 8 deletions tools/topology/sof-icl-rt711-rt1308-rt715-hdmi.m4
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,32 @@ PIPELINE_PCM_ADD(sof/pipe-volume-capture.m4,
1000, 0, 0,
48000, 48000, 48000)

ifdef(`MONO',
`
# 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-demux-playback.m4,
PIPELINE_PCM_ADD(sof/pipe-volume-playback.m4,
3, 2, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)
',
`
# 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(ifdef(`NO_AGGREGATION',`sof/pipe-volume-playback.m4',
`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.
# 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-dai-endpoint.m4,
PIPELINE_PCM_ADD(ifdef(`NO_AGGREGATION', `sof/pipe-volume-playback.m4',
`sof/pipe-dai-endpoint.m4'),
4, 3, 2, s32le,
1000, 0, 0,
48000, 48000, 48000)')
48000, 48000, 48000)
')

# Low Latency capture pipeline 5 on PCM 4 using max 2 channels of s32le.
# Schedule 48 frames per 1000us deadline on core 0 with priority 0
Expand Down Expand Up @@ -124,10 +136,15 @@ DAI_ADD(sof/pipe-dai-playback.m4,
PIPELINE_SOURCE_3, 2, s24le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)

ifdef(`MONO', `',
ifdef(`NO_AGGREGATION',
`# 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_SCHED(sof/pipe-dai-sched-playback.m4,
DAI_ADD(sof/pipe-dai-playback.m4,
4, ALH, 0x202, SDW2-Playback,
PIPELINE_SOURCE_4, 2, s24le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER)',
`ifdef(`MONO', `',
`DAI_ADD_SCHED(sof/pipe-dai-sched-playback.m4,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mix of ifdef is really hard to follow. And on line 148 it's rather suspicious to have SDW1-playback with index 0x202. That looks like a copy paste mistake to me, no?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the mix of ifdef is really hard to follow. And on line 148 it's rather suspicious to have SDW1-playback with index 0x202. That looks like a copy paste mistake to me, no?

No, it is intentional. ALH0x202 is the 2nd DAI for SDW1-Playback stream.
From line 54 to 79:

if NOMO (1 rt1308)
    Create a normal pipeline 3
else
    if NO_AGGREGATION (2 rt1308s but no aggregation)
        Create a normal pipeline 3 and normal pipeline 4
    else (2 rt1308s and aggregation)
        Create a demux pipeline 3 and DAI endpoint 4

From line 139 to 162:

if NO_AGGREGATION (2 rt1308s, but no aggregation)
    ALH0x202 DAI is for SDW2-Playback stream
else
    if MONO (No ALH0x202 is there is only 1 rt1308)
    else (2 rt1308s and aggregation)
        ALH0x202 is the 2nd DAI for SDW1-Playback stream and connect pipeline 4 source to the demux

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, but then let's stop using SDW1-playback, it's confusing. In some cases it does mean playback on Link1 and other it's just the playback stream1...

We can fix this in a follow-up, along with the rename of MONO which is misleading - should be SINGLE_AMP

4, ALH, 0x202, SDW1-Playback,
PIPELINE_SOURCE_4, 2, s24le,
1000, 0, 0, SCHEDULE_TIME_DOMAIN_TIMER,
Expand All @@ -142,7 +159,7 @@ SectionGraph."PIPE_DEMUX" {
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 @@ -177,6 +194,7 @@ 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(`NO_AGGREGATION', `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 @@ -196,6 +214,11 @@ DAI_CONFIG(ALH, 3, 1, SDW0-Capture)
#ALH SDW1 Pin2 (ID: 2)
DAI_CONFIG(ALH, 0x102, 2, SDW1-Playback)

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

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

Expand Down