Commit Graph

222 Commits

Author SHA1 Message Date
Ranjani Sridharan 22fba69dfb topology: glk: fix channel count for dmic stereo recording
Fix the channel count to 2 for stereo dmic recording.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-10-31 22:35:00 -07:00
Liam Girdwood c9a4c87d7a
Merge pull request #114 from plbossart/fix/ipc-alignment
topology: renumber SSP tokens - ABI CHANGE
2018-10-24 14:03:04 +01:00
Pierre-Louis Bossart 8d0f1783a6 topology: renumber SSP tokens - ABI CHANGE
Initial _ACTIVE fields are replaced by a single clock control
This change can lead to regressions, it needs to be aligned with the same
change at the kernel level.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-10-23 12:28:47 -05:00
Seppo Ingalsuo 8d4b10c539 Topology: Add 2ch and 4ch raw DMIC capture topologies for APL
This patch adds two minimal capture topologies to enable doing tests
those require raw audio capture with unmodified S32_LE samples, e.g.
channels order preserve test where the mic # origin can be checked
from side information in LSB bits.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-10-23 11:27:25 +03:00
Liam Girdwood a1dfcb7f4b
Merge pull request #110 from xiulipan/pr/daidir
Add direction for dai widget in topology
2018-10-18 16:58:20 +01:00
Pan Xiuli 25dcef9219 topolgy: m4: add direction for widget dai
Add direction for widget dai, 0 for playback and 1 for capture.

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-10-18 18:59:24 +08:00
Pan Xiuli 489832137c topology: m4: add SOF_TKN_DAI_DIRECTION for DAI
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-10-18 18:59:18 +08:00
Pan Xiuli b6016cd5e5 topology: duplicate dai formart for pcm add
In PIPELINE_PCM_ADD, DAI_FORMAT is not set but are used later.
Need to set this value to avoid protenial issues.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-10-18 18:43:37 +08:00
Seppo Ingalsuo 53f90d9c6a Topology: DMIC: Reduce PCM capabilities to DMIC configuration
This patch impacts topologies sof-apl-nocodec, sof-apl-da7219, and
sof-glk-da7219 those use the pipe-passthrough-capture macro for DMIC.

The PCM saple rate is limited to 48 kHz (was 8 - 192 kHz). The capture
channels count can be only PIPELINE_CHANNELS (was 1 - PIPELINE_CHANNELS).
This prevents corrupted audio capture that happens when DMIC topology
parameters and capture parameters differ. It happens because DMIC FIFOs
drop samples or add unwanted samples when the configuration does not match.

In sof-apl-nocodec topology the PIPELINE_CHANNELS is set to 2 that
matches the configuration.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-10-18 12:42:38 +03:00
Pan Xiuli 97ae708c5e topology: enable hdmi support on UP2 board
Add HDMI support to sof-apl-pcm512x

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-10-15 08:16:24 +08:00
Liam Girdwood c0a881a3b7
Merge pull request #101 from juimonen/test_pr
tests: add qa tests and rearrange other tests under one directory
2018-10-14 22:41:17 +01:00
Jaska Uimonen 0808765bf4 tests: add qa tests and rearrange other tests under one directory
Previously we used to have tests scattered around, so let's put
them under one directory to make things more clear.

Now under top level test directory we have directories:

audio - objective audio quality tests
used to be under test/

qa - qa tests run by the CI
new test component in soft repo

topology - topology test file generation
used to be under topology/tests

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2018-10-12 08:12:49 +03:00
Seppo Ingalsuo 27281d75e7 Topology: Add DMIC capture pipeline with gain and high-pass filter
This patch adds topology sof-apl-eq-dmic to help testing acoustical
audio capture via DMIC or work as example for other machine drivers. The
capture format is set as four channels, S32_LE, 48 kHz. The IIR EQ is
a 2nd order Butterworth high-pass with cut-off frequency at 50 Hz to
suppress non-audible lowest frequencies. The EQ provides additional
+20 dB gain to avoid the recording to sound too silent.

The IIR EQ or additional FIR EQ instance can when needed provide other
form factor specific equalization.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-10-11 17:12:27 +03:00
Rander Wang c569a95905 WHL: add a bespoke hda topology for WHL
Only passthrough is required on WHL

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-10-09 10:52:06 +08:00
Curtis Malainey 9050d82a7d Use passed in number of channels for pipeline
Pipelines should not expose more channels than what they are configured
to support.

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2018-10-02 13:54:04 -07:00
Rander Wang 2f65d96833 hda: add virtual widgets to kill error message in kernel log
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-09-29 10:40:21 +08:00
Liam Girdwood 18c9950855
Merge pull request #82 from keyonjie/master
topology: add topology file for hda generic machine
2018-09-28 08:39:47 +01:00
Liam Girdwood 933fce3c88
Merge pull request #79 from bardliao/apl_rvp
topology: initial topology file for APL RVP
2018-09-28 08:23:50 +01:00
Keyon Jie 8dc01f7cb5 topology: add topology file for hda generic machine
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-09-28 14:21:05 +08:00
Bard liao 41184b076f topology: initial topology file for APL RVP
It is basically copy from sof-apl-pcm512x.m4 and add hdmi support

Signed-off-by: Bard liao <bard.liao@intel.com>
2018-09-27 10:50:14 +08:00
Keyon Jie 110378d61c topology: sof-glk-da7219: update to use s32le format for HDMI pipelines
Signed-off-by: Keyon Jie <yang.jie@linux.intel.com>
2018-09-26 17:08:22 +08:00
Jaska Uimonen 6b56dafe30 Topology: Add generic type string to effect widgets data field
Adding type string to widget data allows the driver to identify
different effects. As an example use this in the equalizer.

Also modify equalizer to pass default parameters in control's
private data.

Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2018-09-25 08:26:30 +03:00
Seppo Ingalsuo baa791f6e1 Topology: Add Equalizer
This patch adds EQ, bytecontrol, and EQ+volume pipeline m4 macros and an
enhanced topology with EQ for UP2 + HiFiberry. There is not yet FIR/IIR
type select. The EQ type is currently hardcoded into kernel.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2018-09-25 08:26:15 +03:00
Curtis Malainey 46fc6fdf6e Set capabilities of channels to those defined in topology
Do not use a static defined number of channels, use the channels passed
in otherwise ASoC will try to allocate number of channels that should
not be allowed.

Signed-off-by: Curtis Malainey <cujomalainey@google.com>
2018-09-21 13:21:12 -07:00
Mengdong Lin 4c9e3ddaf3 topology: Add 3 HDMI/DP PCMs and backends for GLK
Define 3 new PCMs and backends for HDMI/DP playback on GLK platform.

Here are the updated pipelines in sof-glk-da7219.m4:
PCM0  ----> volume (pipe 1)   ---> SSP1 (speaker - maxim98357a, BE link 0)
PCM1  <---> volume (pipe 2,3) <--> SSP2 (headset - da7219, BE link 1)
PCM99 <---- volume (pipe 4)   <--- DMIC0 (dmic capture, BE link 2)
PCM5  ----> volume (pipe 5)   ---> iDisp1 (HDMI/DP playback, BE link 3)
PCM6  ----> Volume (pipe 6)   ---> iDisp2 (HDMI/DP playback, BE link 4)
PCM7  ----> volume (pipe 7)   ---> iDisp3 (HDMI/DP playback, BE link 5)

There is also support for changing HDMI/DP pipelines to pass-through for
validation purpose, which is commented off by default.

Pleaes note that 3 virtual widgets hifi1~3 are removed, because they'll
be created by HDMI codec driver. This m4 was verified on GLK platform.
2018-09-06 15:16:55 -04:00
Jaska Uimonen 1354af8b66 topology: make building tests into a separate target
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2018-09-04 17:50:43 +03:00
Liam Girdwood 9af65849fa
Merge pull request #65 from juimonen/m4debug
[RFC] topology: first try of m4 debug macros
2018-09-04 13:09:03 +01:00
Jaska Uimonen 72629ac2d9 topology: first try of m4 debug macros
Signed-off-by: Jaska Uimonen <jaska.uimonen@intel.com>
2018-09-04 15:04:53 +03:00
Mengdong Lin c0062f98c7 topology: Create HDMI only m4 file for APL
This patch creates sof_apl_hdmi.m4 to define topology for 3 playback
pipelines, FE and BE links for HDMI/DisplayPort(DP) audio. This can be
a reference to verify audio over HDMI/DP on APL platforms.

The HDMI/DP frontends are named as HDMIx, to reuse the generic HDA DSP
machine driver which checks the link names and will do extra
initialization on HDMI/DP frontends if "HDMI" is found in the link name.

This m4 does't include topology for using external HD-A analog codecs. We
will create another m4 file to include both HDA display and analog audio.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
2018-09-03 21:51:52 -04:00
Mengdong Lin e767798c7f topology: Define hda.m4 for HD-Audio configurations
This patch adds a new file hda.m4.

This file defines macro HDA_DAI_CONFIG(idx, link_id, name) for user to
define configurations for HDA Backend links. The link's data tuple will
carry the HDA type info for kernel driver to check the link type.

Pleae note that there are no HW configurations defined for HDA BE links
because current HW configurations is more suitable for SSP BE links, but
not for HDA. We'll decide what HW configurations are suitable for HDA BE
links later.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
2018-09-03 19:41:43 -04:00
Liam Girdwood 41861aac37
Merge pull request #58 from plbossart/topic/wm8804
topology: add support for wm8804
2018-08-23 02:59:32 -07:00
Pierre-Louis Bossart 67802d8174 topology: add support for wm8804
This SPDIF transmitter/receiver is used by the HifiBerry DIGI+ and
DIGI IO. The wm8804 operates as bit clock and frame master.

TODO in future update: add support for capture on the DIGI+ IO (this
may be done with a different topology file to avoid confusing users
with a non-working PCM capture patch)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-08-22 21:46:01 -05:00
Seppo Ingalsuo 157e37856d Decrease SRC pipeline buffers RAM size and update PCM configuration
This patch decreases pipeline buffers usage from 5x or 4x periods to 3x
to avoid DAI error in APL platform when allocating buffers. The smaller
buffers are sufficient since the test topology pipelines are scheduled
every 1ms (earlier assumption was every 5 ms).

The PCM capability is updated to 8 channels similarly as with low delay
pipeline. The highest sample rate is increased from 96 kHz to 192 kHz.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2018-08-21 13:31:01 +03:00
Rander Wang a3b38152fb topology: add some virtual widgets to topology of cnl
It fixs dai link error in kernel log

Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-08-14 17:47:29 +08:00
Pierre-Louis Bossart 8e50a510c3 topology: add APL and GLK Chromebook support
The APL and GLK topologies are identical except for a swap of SSPs and MCLKs.
Tested on Reef and GLK

TODO:

1. there is currently a kernel bug where only duplex pipelines can be
assigned to the same PCM number. For now mark DMIC as device 99 to
track this is a work-around to be modified in the near future

2. Edit the Virtual routes/widgets to remove kernel warnings (no
functional impact)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-31 23:39:41 -05:00
Pierre-Louis Bossart 7c214b83b7 topology: Fix SectionPCM macros
PR43 and commit dc10876c20 ('topology: changes to SectionPCM
macros') went a bit too far and removed a much-needed alignment
between pcm id and dummy dai id. Tested on APL/Reef Chromebook

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-30 10:41:31 -05:00
Ranjani Sridharan dc10876c20 topology: changes to SectionPCM macros
This patch addresses the following:

1. Move PCM_PLAYBACK_ADD to pcm.m4
The macro was in the wrong m4 file (buffer.m4)

2. Remove pipeline_id argument and "index" from SectionPCM

"index" is not a member of struct snd_soc_tplg_pcm. So this
information is not used in the kernel at all.
Secondly, the PCM ID could be associated with more than
one pipeline especially in the case of DUPLEX PCM's. So better
to remove it to avoid ambiguities.

3. Remove dai_id

This dai_id is the ID given to the CPU DAI when the FE DAI link
is created. In the case of SOF, we should use an linearly increasing
unique ID for CPU DAI ID's. If this argument is omitted, the kernel
automatially assignes an ID based on the component->num_dai
which is linearly incremented every time a new DAI link is added.

4. Finally update users to align with the new definitions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-25 21:24:20 -07:00
Ranjani Sridharan f08c93721d topology: replace PIPELINE_PCM_DAI_ADD with PIPELINE_PCM_ADD
Avoid duplicating dai_add in sof-apl-nocodec topology.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-24 22:42:56 -07:00
Ranjani Sridharan 27d3e14bdf topology: add comments to sof-apl-nocodec m4 file
This makes it easier to look up the macro definitions.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-24 09:19:21 -07:00
Ranjani Sridharan 2187702ee2 topology: add dmic pipeline to apl nocodec topology
Add DMIC capture pipeline for DMIC01 to the apl nocodec topology.
DMIC16k to be added later.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-24 09:19:21 -07:00
Liam Girdwood 48de25287e
Merge pull request #42 from ranj063/dai_id
topology: fix BE DAI id to be set to ID (not index)
2018-07-24 10:02:10 +01:00
Liam Girdwood d542a6eff6
Merge pull request #40 from xiulipan/daiindex
dai index alignment
2018-07-24 10:00:46 +01:00
Ranjani Sridharan c7adc3dae6 topology: fix BE DAI id to be set to ID (not index)
Previously it was set to be the dai index which works if there's
only one type of BE DAI's.

Signed-off-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
2018-07-23 19:49:34 -07:00
Pierre-Louis Bossart eecc7f6665 topology: fix Makefile.am
copy/paste mistake

Fixes: 3dd17dc0 ('dist: fix make dist for topology M4')
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-23 11:43:32 -05:00
Pan Xiuli 3d903b5e3f topology: Add dai index in DAI SectionBE
DAI_TYPE and DAI_INDEX are both needed to get the dai in FW, add
DAI_INDEX in SectionBE to make sure we can handle multiple type dais.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
2018-07-23 16:28:35 +08:00
Zhang Keqiao 3dd17dc01d dist: fix make dist for topology M4
Signed-off-by: Zhang Keqiao <keqiao.zhang@linux.intel.com>
2018-07-19 13:39:45 +08:00
Pierre-Louis Bossart 812c15cb66 topology: sof-apl-nocodec: enable all 6 SSPs
For some reason parts of the topology were commented out.  Make sure
all 6 SSPs are enabled.

Tested on Up2 with a LogicPro-based check on SSP5 (only interface
accessive on the HAT connector)

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-17 17:25:16 -05:00
Liam Girdwood 576d15b9b4
Merge pull request #26 from RanderWang/icl
tplg: add nocodec topology for icelake
2018-07-17 11:42:53 +01:00
Rander Wang 6ba607461d tplg: add nocodec topology for icelake
Signed-off-by: Rander Wang <rander.wang@linux.intel.com>
2018-07-16 09:59:02 +08:00
Pierre-Louis Bossart 4d1b3d15b6 topology: fix sof-apl-pcm512x
Remove DMIC support to avoid topology load fail,
Remove capture (not supported by PCM512x codec)
Simplify structure using PCM_PIPELINE_ADD instead of PCM_PIPELINE_DAI_ADD
Enable 24-bit output
Enable up to 32-bit PCM (tested with S16_LE and S32_LE)

Tested on Up2, no issues detected.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
2018-07-13 13:14:50 -05:00