From: "Mukunda,Vijendar" <vijendar.mukunda@amd.com>
To: Pierre-Louis Bossart <pierre-louis.bossart@linux.dev>,
broonie@kernel.org
Cc: alsa-devel@alsa-project.org, lgirdwood@gmail.com, perex@perex.cz,
tiwai@suse.com, yung-chuan.liao@linux.intel.com,
Basavaraj.Hiregoudar@amd.com, Sunil-kumar.Dommati@amd.com,
venkataprasad.potturu@amd.com, Syed.SabaKareem@amd.com,
Mario.Limonciello@amd.com, Richard.Gong@amd.com,
Poojitha.N@amd.com, linux-sound@vger.kernel.org,
linux-kernel@vger.kernel.org,
sound-open-firmware@alsa-project.org
Subject: Re: [PATCH v3 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support
Date: Thu, 29 Oct 2026 10:26:55 +0530 [thread overview]
Message-ID: <a5771999-6521-4d02-868a-5cf5b75b6848@amd.com> (raw)
In-Reply-To: <f4a337e6-9ba4-4f52-be99-95d0d5ba11ff@linux.dev>
On 26/10/26 02:41, Pierre-Louis Bossart wrote:
> It'd be useful to comment/explain why this routine only relies on a
> subset of IDS...
On ACP7x, each SoundWire data port has a dedicated DMA channel mapped
in hardware. This function selects only the ports required by the
currently supported ACP7x machine topologies:
AUDIO0_TX (0) - headset/jack playback
AUDIO4_TX (4) - amplifier/speaker playback
AUDIO0_RX (11) - headset/jack capture
AUDIO4_RX (15) - amplifier/speaker capture (feedback)
AUDIO5_RX (16) - DMIC capture
The remaining port IDs are defined for completeness to represent the
hardware data port layout, but are not used by the currently supported
machine topologies.
The ID numbering differs from ACP70 due to the hardware differences
between ACP70 and ACP7x. ACP7x uses a flat ID space, with TX ports
numbered 0-10 and RX ports numbered 11-21.
Will add comments above the define block and the function to clarify
this in the next version.
>
>> +int get_acp7x_cpu_pin_id(u32 sdw_link_id, int be_id, int *cpu_pin_id, struct device *dev)
>> +{
>> + switch (sdw_link_id) {
>> + case AMD_SDW0:
>> + case AMD_SDW1:
>> + case AMD_SDW2:
>> + case AMD_SDW3:
>> + switch (be_id) {
>> + case SOC_SDW_JACK_OUT_DAI_ID:
>> + *cpu_pin_id = ACP7X_SW_AUDIO0_TX;
>> + break;
>> + case SOC_SDW_JACK_IN_DAI_ID:
>> + *cpu_pin_id = ACP7X_SW_AUDIO0_RX;
>> + break;
>> + case SOC_SDW_AMP_OUT_DAI_ID:
>> + *cpu_pin_id = ACP7X_SW_AUDIO4_TX;
>> + break;
>> + case SOC_SDW_AMP_IN_DAI_ID:
>> + *cpu_pin_id = ACP7X_SW_AUDIO4_RX;
>> + break;
>> + case SOC_SDW_DMIC_DAI_ID:
>> + *cpu_pin_id = ACP7X_SW_AUDIO5_RX;
>> + break;
>> + default:
>> + dev_err(dev, "Invalid be id:%d\n", be_id);
>> + return -EINVAL;
>> + }
>> + break;
>> + default:
>> + return -EINVAL;
>> + }
>> + dev_dbg(dev, "sdw_link_id:%d, be_id:%d, cpu_pin_id:%d\n", sdw_link_id, be_id, *cpu_pin_id);
>> + return 0;
>> +}
> ... defined here - I marked the NOT USED ones.
Please refer above comment explanation.
>
>> +/* ACP7.B/7.F SoundWire CPU pin IDs */
>> +#define ACP7X_SW_AUDIO0_TX 0
>> +#define ACP7X_SW_AUDIO1_TX 1 << NOT USED
>> +#define ACP7X_SW_AUDIO2_TX 2 << NOT USED
>> +#define ACP7X_SW_AUDIO3_TX 3 << NOT USED
>> +#define ACP7X_SW_AUDIO4_TX 4
>> +#define ACP7X_SW_AUDIO5_TX 5 << NOT USED
>> +#define ACP7X_SW_AUDIO6_TX 6 << NOT USED
>> +#define ACP7X_SW_AUDIO7_TX 7 << NOT USED
>> +#define ACP7X_SW_AUDIO8_TX 8 << NOT USED
>> +#define ACP7X_SW_AUDIO9_TX 9 << NOT USED
>> +#define ACP7X_SW_AUDIO10_TX 10 << NOT USED
>> +
>> +#define ACP7X_SW_AUDIO0_RX 11
>> +#define ACP7X_SW_AUDIO1_RX 12 << NOT USED
>> +#define ACP7X_SW_AUDIO2_RX 13 << NOT USED
>> +#define ACP7X_SW_AUDIO3_RX 14 << NOT USED
>> +#define ACP7X_SW_AUDIO4_RX 15
>> +#define ACP7X_SW_AUDIO5_RX 16
>> +#define ACP7X_SW_AUDIO6_RX 17 << NOT USED
>> +#define ACP7X_SW_AUDIO7_RX 18 << NOT USED
>> +#define ACP7X_SW_AUDIO8_RX 19 << NOT USED
> The IDs are different from what was used for ACP70
ACP7x hardware exposes 11 TX and 11 RX data ports, mapped to 8 TX and
8 RX DMA channels. The CPU pin IDs use linear numbering, with TX ports
numbered 0-10 and RX ports numbered 11-21.
The ID mapping differs from ACP70 due to the hardware differences
between ACP70 and ACP7x. All port IDs are defined here to represent the
ACP7x hardware data port layout.
next prev parent reply other threads:[~2026-10-29 4:56 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-23 6:50 [PATCH v3 00/13] ASoC: amd: acp: ACP7.B/7.F SoundWire machine driver support Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 01/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire link count for machine driver Vijendar Mukunda
2026-10-25 20:59 ` Pierre-Louis Bossart
2026-10-29 3:45 ` Mukunda,Vijendar
2026-10-23 6:50 ` [PATCH v3 02/13] ASoC: amd: acp: add ACP7.B/7.F SoundWire DAI link support Vijendar Mukunda
2026-10-25 21:11 ` Pierre-Louis Bossart
2026-10-29 4:56 ` Mukunda,Vijendar [this message]
2026-10-29 8:07 ` Pierre-Louis Bossart
2026-10-23 6:50 ` [PATCH v3 03/13] ASoC: amd: acp: add PDM controller selection for ACP7.B/7.F SoundWire machine driver Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 04/13] ASoC: amd: acp: log ASOC_SDW_ACP_DMIC1 quirk in SOF " Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 05/13] ASoC: amd: acp: enable DMIC DAI link based on PDM controller selection Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 06/13] ASoC: amd: acp: move ignore_internal_dmic gate to DMIC enable condition Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 07/13] ASoC: amd: acp: add DMIC components string for SOF SoundWire machine driver Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 08/13] ASoC: amd: acp: set PCI subsystem ID " Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 09/13] ASoC: amd: acp: fix MODULE_AUTHOR missing closing angle bracket Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 10/13] ASoC: amd: acp: add ACPI machine tables for ACP7.F SoundWire Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 11/13] ASoC: SOF: amd: add alt_machines for ACP7.F SOF SoundWire Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 12/13] ASoC: amd: acp: add SoundWire machine table for ACP7.B platform Vijendar Mukunda
2026-10-23 6:50 ` [PATCH v3 13/13] ASoC: SOF: amd: register SoundWire alt_machines for ACP7.B Vijendar Mukunda
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=a5771999-6521-4d02-868a-5cf5b75b6848@amd.com \
--to=vijendar.mukunda@amd.com \
--cc=Basavaraj.Hiregoudar@amd.com \
--cc=Mario.Limonciello@amd.com \
--cc=Poojitha.N@amd.com \
--cc=Richard.Gong@amd.com \
--cc=Sunil-kumar.Dommati@amd.com \
--cc=Syed.SabaKareem@amd.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=perex@perex.cz \
--cc=pierre-louis.bossart@linux.dev \
--cc=sound-open-firmware@alsa-project.org \
--cc=tiwai@suse.com \
--cc=venkataprasad.potturu@amd.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
all inboxes | Powered by JetHome®