AMD ACP raven ridge: invalid audio mode 2
Forwarded from: https://bugzilla.kernel.org/show_bug.cgi?id=208699
Anybody who knows what this "ACP" actually does? what's its use?
Kind regards,
Janpieter Sollie
Adding AMD people to Cc.
On Tue, 08 Dec 2020 15:01:24 +0100, Janpieter Sollie wrote:
Forwarded from: https://bugzilla.kernel.org/show_bug.cgi?id=208699
Anybody who knows what this "ACP" actually does? what's its use?
Kind regards,
Janpieter Sollie
On 08/12/20 8:34 pm, Takashi Iwai wrote:
Adding AMD people to Cc.
On Tue, 08 Dec 2020 15:01:24 +0100, Janpieter Sollie wrote:
Forwarded from: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.k...
Anybody who knows what this "ACP" actually does? what's its use?
ACP(Audio Co-processor) is an AMD Audio IP which has multiple generations support(1.x,2.x,3.x..etc)
ACP supports different audio configurations like I2S/AZ etc.. endpoint support. Based on the platform, Audio configuration will be programmed from BIOS. For example, to use I2S endpoint ACP_I2S_PIN_CONFIG is programmed as 0x04 on Raven Ridge. To use the AZ(HD AUdio) endpoint, ACP_I2S_PIN_CONFIG is programmed to different value.
On Raven ridge APU, We have upstreamed ACP PCI driver and I2S ASoC driver.
On Renoir APU, We have upstreamed ACP PCI driver along with PDM DMA driver. You have to enable ACP specific Kconfig flags for renoir platform when platform has DMIC support and it is connected to APU.
I see from the logs, you have tried to load ACP PDM DMIC driver but attached config file is not matching.
There are hardware differences in terms of ACP IP for both Raven and Renoir.
HD Audio endpoint uses open source HDA driver.
Let us know what is your platform configuration? What Audio endpoints your platform supports?
-- Vijendar
Kind regards,
Janpieter Sollie
Dear Viiendar,
Thank you for your answer,
The .config file includes the following (no idea why the uploaded config file does not include it, you'll have to take my word for it): CONFIG_SND_SOC=y CONFIG_SND_SOC_AC97_BUS=y # CONFIG_SND_SOC_AMD_ACP is not set CONFIG_SND_SOC_AMD_ACP3x=m # CONFIG_SND_SOC_AMD_RENOIR is not set on a raven ridge, I believe this should be sufficient.
Indeed, I found the device on the PCI bus: 04:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor It builds the following modules: snd-acp3x-i2s.ko snd-acp3x-pcm-dma.ko snd-pci-acp3x.ko I tried to initialize each and everyone of them one by one, but all I could was: frisbee /usr/src/linux # modprobe snd_pci_acp3x frisbee /usr/src/linux # dmesg | tail [ 23.326984] elogind-daemon[3633]: Watching system buttons on /dev/input/event4 (Trust 2.4G Keyboard And Mouse) [ 23.327261] elogind-daemon[3633]: Watching system buttons on /dev/input/event10 (Trust 2.4G Keyboard And Mouse Consumer Control) [ 23.327533] elogind-daemon[3633]: Watching system buttons on /dev/input/event12 (Trust 2.4G Keyboard And Mouse System Control) [ 24.560093] elogind-daemon[3633]: New session c1 of user frizbee. [ 24.803864] fuse: init (API version 7.31) [ 52.527742] elogind-daemon[3633]: New session c2 of user janpieter. [ 572.817028] snd_pci_acp3x 0000:04:00.5: enabling device (0000 -> 0002) [ 572.817192] snd_pci_acp3x 0000:04:00.5: Invalid ACP audio mode : 2 frisbee /usr/src/linux # lsmod | grep acp snd_pci_acp3x 12288 0 snd_acp3x_pcm_dma 12288 0
So, if I understand correctly, the snd_pci_acp3x module initialised the acp to mode 0x2, and then decides the mode is not supported? doesn't this sound a little weird to you?
Janpieter
Op 8/12/2020 om 19:27 schreef Mukunda,Vijendar:
On 08/12/20 8:34 pm, Takashi Iwai wrote:
Adding AMD people to Cc.
On Tue, 08 Dec 2020 15:01:24 +0100, Janpieter Sollie wrote:
Forwarded from: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.k...
Anybody who knows what this "ACP" actually does? what's its use?
ACP(Audio Co-processor) is an AMD Audio IP which has multiple generations support(1.x,2.x,3.x..etc)
ACP supports different audio configurations like I2S/AZ etc.. endpoint support. Based on the platform, Audio configuration will be programmed from BIOS. For example, to use I2S endpoint ACP_I2S_PIN_CONFIG is programmed as 0x04 on Raven Ridge. To use the AZ(HD AUdio) endpoint, ACP_I2S_PIN_CONFIG is programmed to different value.
On Raven ridge APU, We have upstreamed ACP PCI driver and I2S ASoC driver.
On Renoir APU, We have upstreamed ACP PCI driver along with PDM DMA driver. You have to enable ACP specific Kconfig flags for renoir platform when platform has DMIC support and it is connected to APU.
I see from the logs, you have tried to load ACP PDM DMIC driver but attached config file is not matching.
There are hardware differences in terms of ACP IP for both Raven and Renoir.
HD Audio endpoint uses open source HDA driver.
Let us know what is your platform configuration? What Audio endpoints your platform supports?
-- Vijendar
Kind regards,
Janpieter Sollie
.
On 09/12/20 7:58 pm, Janpieter Sollie wrote:
Dear Viiendar,
Thank you for your answer,
The .config file includes the following (no idea why the uploaded config file does not include it, you'll have to take my word for it): CONFIG_SND_SOC=y CONFIG_SND_SOC_AC97_BUS=y # CONFIG_SND_SOC_AMD_ACP is not set CONFIG_SND_SOC_AMD_ACP3x=m # CONFIG_SND_SOC_AMD_RENOIR is not set on a raven ridge, I believe this should be sufficient.
Indeed, I found the device on the PCI bus: 04:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor It builds the following modules: snd-acp3x-i2s.ko snd-acp3x-pcm-dma.ko snd-pci-acp3x.ko I tried to initialize each and everyone of them one by one, but all I could was: frisbee /usr/src/linux # modprobe snd_pci_acp3x frisbee /usr/src/linux # dmesg | tail [ 23.326984] elogind-daemon[3633]: Watching system buttons on /dev/input/event4 (Trust 2.4G Keyboard And Mouse) [ 23.327261] elogind-daemon[3633]: Watching system buttons on /dev/input/event10 (Trust 2.4G Keyboard And Mouse Consumer Control) [ 23.327533] elogind-daemon[3633]: Watching system buttons on /dev/input/event12 (Trust 2.4G Keyboard And Mouse System Control) [ 24.560093] elogind-daemon[3633]: New session c1 of user frizbee. [ 24.803864] fuse: init (API version 7.31) [ 52.527742] elogind-daemon[3633]: New session c2 of user janpieter. [ 572.817028] snd_pci_acp3x 0000:04:00.5: enabling device (0000 -> 0002) [ 572.817192] snd_pci_acp3x 0000:04:00.5: Invalid ACP audio mode : 2 frisbee /usr/src/linux # lsmod | grep acp snd_pci_acp3x 12288 0 snd_acp3x_pcm_dma 12288 0
So, if I understand correctly, the snd_pci_acp3x module initialised the acp to mode 0x2, and then decides the mode is not supported? doesn't this sound a little weird to you?
On Raven Ridge platform, ACP device enumerated by PCI root.ACP PCI driver creates child nodes for I2S device.
Currently we had added support for only I2S configuration. We recently fixed audio driver probe failure issue when Audio configuration is set to other than I2S.
When Audio Configuration is set to other than I2S, load the ACP PCI driver instead of returning probe failure. Below patch already got merged in to asoc-next branch.
https://lore.kernel.org/alsa-devel/1603476441-3506-1-git-send-email-Vijendar...
Thanks, Vijendar
Janpieter
Op 8/12/2020 om 19:27 schreef Mukunda,Vijendar:
On 08/12/20 8:34 pm, Takashi Iwai wrote:
Adding AMD people to Cc.
On Tue, 08 Dec 2020 15:01:24 +0100, Janpieter Sollie wrote:
Forwarded from: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.k...
Anybody who knows what this "ACP" actually does? what's its use?
ACP(Audio Co-processor) is an AMD Audio IP which has multiple generations support(1.x,2.x,3.x..etc)
ACP supports different audio configurations like I2S/AZ etc.. endpoint support. Based on the platform, Audio configuration will be programmed from BIOS. For example, to use I2S endpoint ACP_I2S_PIN_CONFIG is programmed as 0x04 on Raven Ridge. To use the AZ(HD AUdio) endpoint, ACP_I2S_PIN_CONFIG is programmed to different value.
On Raven ridge APU, We have upstreamed ACP PCI driver and I2S ASoC driver.
On Renoir APU, We have upstreamed ACP PCI driver along with PDM DMA driver. You have to enable ACP specific Kconfig flags for renoir platform when platform has DMIC support and it is connected to APU.
I see from the logs, you have tried to load ACP PDM DMIC driver but attached config file is not matching.
There are hardware differences in terms of ACP IP for both Raven and Renoir.
HD Audio endpoint uses open source HDA driver.
Let us know what is your platform configuration? What Audio endpoints your platform supports?
-- Vijendar
Kind regards,
Janpieter Sollie
.
On 10/12/20 12:18 am, Mukunda,Vijendar wrote:
So, if I understand correctly, the snd_pci_acp3x module initialised the acp to mode 0x2, and then decides the mode is not supported? doesn't this sound a little weird to you?
On Raven Ridge platform, ACP device enumerated by PCI root.ACP PCI driver creates child nodes for I2S device.
Currently we had added support for only I2S configuration. We recently fixed audio driver probe failure issue when Audio configuration is set to other than I2S.
When Audio Configuration is set to other than I2S, load the ACP PCI driver instead of returning probe failure. Below patch already got merged in to asoc-next branch.
https://lore.kernel.org/alsa-devel/1603476441-3506-1-git-send-email-Vijendar...
Thanks, Vijendar
To add more to my previous explanation, Based on platform audio configuration, I2S_PIN_CONFIG value is programmed from BIOS.
ACP PCI driver during its probe it only checks what is the audio configuration is really set.
If it sees current configuration is set to I2S, then ACP PCI driver will go ahead and create the platform devices required for I2S endpoint.
If it is other than I2S audio configuration, it wont create the child node and returns the probe as success.
ACP IP do's lot more stuff beyond supporting simple audio endpoints. For other audio configurations, we have added a default case and left it as a place holder for future implementation.
Thanks, Vijendar
Hi Vijendar,
Thank you, the patch got rid of the error message.
Well, I'm not an ALSA expert (more like a noob), but I'll ask the manufacturer (UDOO Bolt, ryzen v1000) about details for the SOC modes then, they *might* be able to show me something which could lead to a (more or less) good implementation. that said: would it be possible to get more info about the device an ABI or something?
The PCI registers show me the following: frisbee /usr/src/linux # lspci -xxxxx -s 04:00.5 04:00.5 Multimedia controller: Advanced Micro Devices, Inc. [AMD] Raven/Raven2/FireFlight/Renoir Audio Processor 00: 22 10 e2 15 06 04 10 00 00 00 80 04 10 00 80 00 10: 00 00 68 fe 00 00 00 00 00 00 00 00 00 00 00 00 20: 00 00 00 00 00 00 00 00 00 00 00 00 22 10 e2 15 30: 00 00 00 00 48 00 00 00 00 00 00 00 ff 02 00 00 40: 00 00 00 00 00 00 00 00 09 50 08 00 22 10 e2 15 50: 01 64 03 c8 0b 01 00 00 00 00 00 00 00 00 00 00 60: 00 00 00 00 10 a0 02 00 a1 8f 00 00 30 29 00 00 70: 03 0d 40 00 40 00 03 11 00 00 00 00 00 00 00 00 80: 00 00 00 00 00 00 00 00 00 08 70 00 00 00 00 00 90: 0e 00 00 00 00 00 01 00 00 00 00 00 00 00 00 00 a0: 05 00 81 00 00 00 e0 fe 00 00 00 00 00 00 00 00 b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 100: 0b 00 01 00 01 00 01 01 00 00 00 00 00 00 00 00
Where can I find more info about what these registers mean (if anything, I'll ask the udoo guys about the device specific bytes)?
Janpieter
Op 10/12/2020 om 01:12 schreef Mukunda,Vijendar:
On 10/12/20 12:18 am, Mukunda,Vijendar wrote:
So, if I understand correctly, the snd_pci_acp3x module initialised the acp to mode 0x2, and then decides the mode is not supported? doesn't this sound a little weird to you?
On Raven Ridge platform, ACP device enumerated by PCI root.ACP PCI driver creates child nodes for I2S device.
Currently we had added support for only I2S configuration. We recently fixed audio driver probe failure issue when Audio configuration is set to other than I2S.
When Audio Configuration is set to other than I2S, load the ACP PCI driver instead of returning probe failure. Below patch already got merged in to asoc-next branch.
https://lore.kernel.org/alsa-devel/1603476441-3506-1-git-send-email-Vijendar...
Thanks, Vijendar
To add more to my previous explanation, Based on platform audio configuration, I2S_PIN_CONFIG value is programmed from BIOS.
ACP PCI driver during its probe it only checks what is the audio configuration is really set.
If it sees current configuration is set to I2S, then ACP PCI driver will go ahead and create the platform devices required for I2S endpoint.
If it is other than I2S audio configuration, it wont create the child node and returns the probe as success.
ACP IP do's lot more stuff beyond supporting simple audio endpoints. For other audio configurations, we have added a default case and left it as a place holder for future implementation.
Thanks, Vijendar
.
participants (3)
-
Janpieter Sollie
-
Mukunda,Vijendar
-
Takashi Iwai