-
Notifications
You must be signed in to change notification settings - Fork 1
/
Google-SC7180-WSA-Speakers-SEC-I2S-VA-DMIC-WCD-TX3.m4
81 lines (78 loc) · 3.71 KB
/
Google-SC7180-WSA-Speakers-SEC-I2S-VA-DMIC-WCD-TX3.m4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
# Copyright, Linaro Ltd, 2023
# SPDX-License-Identifier: BSD-3-Clause
include(`audioreach/audioreach.m4')
include(`audioreach/stream-subgraph.m4')
include(`audioreach/device-subgraph.m4')
include(`util/route.m4')
include(`util/mixer.m4')
include(`audioreach/tokens.m4')
#
# Stream SubGraph for PCM Playback
#
# _____________________________________________________
# | Sub Graph 1 |
# | [WR_SH] -> [PCM DEC] -> [PCM CONV] -> [VOL]->[LOG] |- Kcontrol
# |_____________________________________________________|
#
#
dnl STREAM_SG_PCM_ADD(stream, stream-dai-id, stream-index,
dnl format, min-rate, max-rate, min-channels, max-channels,
dnl sg-iid-start, cont-iid-start, mod-iid-start)
STREAM_SG_PCM_ADD(audioreach/subgraph-stream-vol-playback.m4, FRONTEND_DAI_MULTIMEDIA1,
`S16_LE', 48000, 48000, 2, 2,
0x00004001, 0x00004001, 0x00006001)
dnl
STREAM_SG_PCM_ADD(audioreach/subgraph-stream-vol-playback.m4, FRONTEND_DAI_MULTIMEDIA2,
`S16_LE', 48000, 48000, 2, 2,
0x00004002, 0x00004002, 0x00006010)
dnl
STREAM_SG_PCM_ADD(audioreach/subgraph-stream-capture.m4, FRONTEND_DAI_MULTIMEDIA3,
`S16_LE', 48000, 48000, 2, 2,
0x00004003, 0x00004003, 0x00006020)
STREAM_SG_PCM_ADD(audioreach/subgraph-stream-capture.m4, FRONTEND_DAI_MULTIMEDIA4,
`S16_LE', 48000, 48000, 2, 2,
0x00004004, 0x00004004, 0x00006030)
#
# Device SubGraph for WSA RX0 Backend
#
# ___________________
# | Sub Graph 2 |
# Mixer -| [LOG] -> [WSA EP] |
# |___________________|
#
dnl DEVICE_SG_ADD(stream, stream-dai-id,
dnl format, min-rate, max-rate, min-channels, max-channels,
dnl interface-type, interface-index, sd-line-idx, data-format,
dnl sg-iid-start, cont-iid-start, mod-iid-start
dnl
DEVICE_SG_ADD(audioreach/subgraph-device-i2s-playback.m4, `Secondary', SECONDARY_MI2S_RX,
`S16_LE', 48000, 48000, 2, 2,
LPAIF_INTF_TYPE_LPAIF, I2S_INTF_TYPE_SECONDARY, SD_LINE_IDX_I2S_SD0, DATA_FORMAT_FIXED_POINT,
0x00004005, 0x00004005, 0x00006050, `SECONDARY_MI2S_RX')
dnl
DEVICE_SG_ADD(audioreach/subgraph-device-codec-dma-playback.m4, `RX_CODEC_DMA_RX_0', RX_CODEC_DMA_RX_0,
`S16_LE', 48000, 48000, 2, 2,
LPAIF_INTF_TYPE_RXTX, CODEC_INTF_IDX_RX0, 0, DATA_FORMAT_FIXED_POINT,
0x00004006, 0x00004006, 0x00006060)
dnl
DEVICE_SG_ADD(audioreach/subgraph-device-codec-dma-capture.m4, `VA_CODEC_DMA_TX_0', VA_CODEC_DMA_TX_0,
`S16_LE', 48000, 48000, 2, 2,
LPAIF_INTF_TYPE_VA, CODEC_INTF_IDX_TX0, 0, DATA_FORMAT_FIXED_POINT,
0x00004007, 0x00004007, 0x00006070)
dnl
DEVICE_SG_ADD(audioreach/subgraph-device-codec-dma-capture.m4, `TX_CODEC_DMA_TX_3', TX_CODEC_DMA_TX_3,
`S16_LE', 48000, 48000, 2, 2,
LPAIF_INTF_TYPE_RXTX, CODEC_INTF_IDX_TX3, 0, DATA_FORMAT_FIXED_POINT,
0x00004008, 0x00004008, 0x00006080)
dnl
STREAM_DEVICE_PLAYBACK_MIXER(SECONDARY_MI2S_RX, ``SECONDARY_MI2S_RX'', ``MultiMedia1'', ``MultiMedia2'')
STREAM_DEVICE_PLAYBACK_MIXER(RX_CODEC_DMA_RX_0, ``RX_CODEC_DMA_RX_0'', ``MultiMedia1'', ``MultiMedia2'')
dnl
STREAM_DEVICE_PLAYBACK_ROUTE(RX_CODEC_DMA_RX_0, ``RX_CODEC_DMA_RX_0 Audio Mixer'', ``MultiMedia1, stream0.logger1'', ``MultiMedia2, stream1.logger1'')
STREAM_DEVICE_PLAYBACK_ROUTE(SECONDARY_MI2S_RX, ``SECONDARY_MI2S_RX Audio Mixer'', ``MultiMedia1, stream0.logger1'', ``MultiMedia2, stream1.logger1'')
dnl
STREAM_DEVICE_CAPTURE_MIXER(FRONTEND_DAI_MULTIMEDIA3, ``VA_CODEC_DMA_TX_0'', ``TX_CODEC_DMA_TX_3'')
STREAM_DEVICE_CAPTURE_MIXER(FRONTEND_DAI_MULTIMEDIA4, ``VA_CODEC_DMA_TX_0'', ``TX_CODEC_DMA_TX_3'')
dnl
STREAM_DEVICE_CAPTURE_ROUTE(FRONTEND_DAI_MULTIMEDIA3, ``MultiMedia3 Mixer'', ``VA_CODEC_DMA_TX_0, device110.logger1'', ``TX_CODEC_DMA_TX_3, device120.logger1'')
STREAM_DEVICE_CAPTURE_ROUTE(FRONTEND_DAI_MULTIMEDIA4, ``MultiMedia4 Mixer'', ``VA_CODEC_DMA_TX_0, device110.logger1'', ``TX_CODEC_DMA_TX_3, device120.logger1'')