From: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
To: Richard Fitzgerald <rf@opensource.cirrus.com>,
broonie@kernel.org, cezary.rojewski@intel.com,
peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com,
kai.vehmanen@linux.intel.com
Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org,
patches@opensource.cirrus.com
Subject: Re: [PATCH 09/10] ASoC: Intel: sof_sdw: Add support for Cirrus Logic CS35L56
Date: Tue, 21 Feb 2023 13:03:12 -0500 [thread overview]
Message-ID: <273e1484-0285-29b6-4852-9f5bc2d24e2a@linux.intel.com> (raw)
In-Reply-To: <f3d70939-49e5-1da2-c104-11b370888d7c@opensource.cirrus.com>
>>> + card->components);
>>> + if (!card->components)
>>> + return -ENOMEM;
>>> +
>>> + ret = snd_soc_dapm_new_controls(&card->dapm,
>>> + cs35l56_sof_widgets,
>>> ARRAY_SIZE(cs35l56_sof_widgets));
>>> + if (ret) {
>>> + dev_err(card->dev, "Widgets add failed: %d\n", ret);
>>> + return ret;
>>> + }
>>> +
>>> + ret = snd_soc_dapm_add_routes(&card->dapm, cs35l56_sof_map, count);
>>> + if (ret) {
>>> + dev_err(card->dev, "Map add %d failed: %d\n", count, ret);
>>> + return ret;
>>> + }
>>> +
>>> + /* Enable one feedback TX per amp on different slots */
>>> + for_each_rtd_codec_dais(rtd, i, codec_dai) {
>>> + ret = snd_soc_dai_set_tdm_slot(codec_dai, 0x3, 1 << i, 4, 16);
>>
>> TDM slots? Not getting how this would work with SoundWire?
>>
>
> Strictly speaking Soundwire is TDM (the frame time is divided up into
> slots for each sample...).
>
> The problem is if you have N amps on the dailink all feeding back audio
> on the same bus. Their DP slots are all programmed to the same positions
> in the frame, same as for the playback. So you have 4 amps all trying to
> send 6 audio channels in the same positions in the frame and you'll just
> get a ton of bus clash interrupts.
>
> So we use the set_tdm_slot() like we do with I2S TDM to set which slots
> are active for each amp.
>
> I can't see that there's any obvious "generic" way that the manager code
> can automatically figure out how many channels to enable on each amp and
> what order to map them, so we do it here. Just as with I2S TDM - you
> have many slots and many codecs but the machine driver has to tell it
> how to map those.
IIRC Bard did the same thing recently, and the order of the feedback
channels is really defined by the order in which the peripheral devices
are added in the dailink. See
https://github.com/thesofproject/linux/pull/4108
There's also another open related to the number of channels, we need to
patch what the CPU DAI can handle, see
https://github.com/thesofproject/linux/pull/4136 or
https://github.com/thesofproject/linux/pull/4134
next prev parent reply other threads:[~2023-02-21 18:04 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-17 16:14 [PATCH 00/10] ASoC: Initial support for Cirrus Logic CS35L56 Richard Fitzgerald
2023-02-17 16:14 ` [PATCH 01/10] firmware: cs_dsp: Introduce no_core_startstop for self-booting DSPs Richard Fitzgerald
2023-02-17 16:14 ` [PATCH 02/10] ASoC: wm_adsp: Use no_core_startstop to prevent creating preload control Richard Fitzgerald
2023-02-17 16:14 ` [PATCH 03/10] firmware: cs_dsp: Support DSPs that don't require firmware download Richard Fitzgerald
2023-02-17 16:14 ` [PATCH 04/10] ASoC: wm_adsp: " Richard Fitzgerald
2023-02-17 16:14 ` [PATCH 05/10] ASoC: wm_adsp: Expose the DSP boot work actions as wm_adsp_power_up() Richard Fitzgerald
2023-02-17 16:14 ` [PATCH 06/10] ASoC: wm_adsp: Add support for loading bin files without wmfw Richard Fitzgerald
2023-02-17 16:14 ` [PATCH 07/10] ASoC: wm_adsp: Simplify the logging of requested firmware files Richard Fitzgerald
2023-02-17 16:14 ` [PATCH 08/10] ASoC: cs35l56: Add driver for Cirrus Logic CS35L56 Richard Fitzgerald
2023-02-21 16:45 ` Pierre-Louis Bossart
2023-02-21 17:18 ` Richard Fitzgerald
2023-02-21 17:58 ` Pierre-Louis Bossart
2023-02-22 11:16 ` Richard Fitzgerald
2023-02-17 16:14 ` [PATCH 09/10] ASoC: Intel: sof_sdw: Add support " Richard Fitzgerald
2023-02-21 16:49 ` Pierre-Louis Bossart
2023-02-21 17:32 ` Richard Fitzgerald
2023-02-21 18:03 ` Pierre-Louis Bossart [this message]
2023-02-22 11:39 ` Richard Fitzgerald
2023-02-17 16:14 ` [PATCH 10/10] ASoC: Intel: soc-acpi: Add CS35L56 Soundwire to TGL Richard Fitzgerald
2023-02-21 16:52 ` Pierre-Louis Bossart
2023-02-22 11:48 ` Richard Fitzgerald
2023-02-22 14:31 ` Pierre-Louis Bossart
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=273e1484-0285-29b6-4852-9f5bc2d24e2a@linux.intel.com \
--to=pierre-louis.bossart@linux.intel.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=cezary.rojewski@intel.com \
--cc=kai.vehmanen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@opensource.cirrus.com \
--cc=peter.ujfalusi@linux.intel.com \
--cc=rf@opensource.cirrus.com \
--cc=yung-chuan.liao@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox