All of lore.kernel.org
 help / color / mirror / Atom feed
* AMD ACP raven ridge: invalid audio mode 2
@ 2020-12-08 14:01 Janpieter Sollie
  2020-12-08 15:04 ` Takashi Iwai
  0 siblings, 1 reply; 7+ messages in thread
From: Janpieter Sollie @ 2020-12-08 14:01 UTC (permalink / raw)
  To: alsa-devel

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AMD ACP raven ridge: invalid audio mode 2
  2020-12-08 14:01 AMD ACP raven ridge: invalid audio mode 2 Janpieter Sollie
@ 2020-12-08 15:04 ` Takashi Iwai
  2020-12-08 18:27   ` Mukunda,Vijendar
  0 siblings, 1 reply; 7+ messages in thread
From: Takashi Iwai @ 2020-12-08 15:04 UTC (permalink / raw)
  To: Janpieter Sollie
  Cc: Ravulapati Vishnu vardhan rao, alsa-devel, Akshu Agrawal,
	Vijendar Mukunda

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
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AMD ACP raven ridge: invalid audio mode 2
  2020-12-08 15:04 ` Takashi Iwai
@ 2020-12-08 18:27   ` Mukunda,Vijendar
  2020-12-09 14:28     ` Janpieter Sollie
  0 siblings, 1 reply; 7+ messages in thread
From: Mukunda,Vijendar @ 2020-12-08 18:27 UTC (permalink / raw)
  To: Takashi Iwai, Janpieter Sollie
  Cc: Ravulapati Vishnu vardhan rao, alsa-devel, Akshu Agrawal



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.kernel.org%2Fshow_bug.cgi%3Fid%3D208699&data=04%7C01%7CVijendar.Mukunda%40amd.com%7Cc55d2e5a7fc8472e14ce08d89b8a9a5e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C1%7C637430367345025555%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=LnNjfKSgSFcozSegpZ52afwMtmK%2FE5AbcHwn0r49jdY%3D&reserved=0
>>
>> 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
>>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AMD ACP raven ridge: invalid audio mode 2
  2020-12-08 18:27   ` Mukunda,Vijendar
@ 2020-12-09 14:28     ` Janpieter Sollie
  2020-12-09 18:48       ` Mukunda,Vijendar
  0 siblings, 1 reply; 7+ messages in thread
From: Janpieter Sollie @ 2020-12-09 14:28 UTC (permalink / raw)
  To: Mukunda,Vijendar, Takashi Iwai
  Cc: Ravulapati Vishnu vardhan rao, alsa-devel, Akshu Agrawal

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.kernel.org%2Fshow_bug.cgi%3Fid%3D208699&data=04%7C01%7CVijendar.Mukunda%40amd.com%7Cc55d2e5a7fc8472e14ce08d89b8a9a5e%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C1%7C637430367345025555%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C2000&sdata=LnNjfKSgSFcozSegpZ52afwMtmK%2FE5AbcHwn0r49jdY%3D&reserved=0
>>>
>>> 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
>>>
>
> .




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AMD ACP raven ridge: invalid audio mode 2
  2020-12-09 14:28     ` Janpieter Sollie
@ 2020-12-09 18:48       ` Mukunda,Vijendar
  2020-12-10  0:12         ` Mukunda,Vijendar
  0 siblings, 1 reply; 7+ messages in thread
From: Mukunda,Vijendar @ 2020-12-09 18:48 UTC (permalink / raw)
  To: Janpieter Sollie, Takashi Iwai
  Cc: Ravulapati Vishnu vardhan rao, alsa-devel, Akshu Agrawal



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.Mukunda@amd.com/


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.kernel.org%2Fshow_bug.cgi%3Fid%3D208699&data=04%7C01%7Cvijendar.mukunda%40amd.com%7C911b15bd9f9c43be7cda08d89c4eb426%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637431209140985281%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=hF0MK83C2tch%2F4vzTNnuIXH%2F4P4q0oSpAGDwkxB71lk%3D&reserved=0
>>>>
>>>> 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
>>>>
>>
>> .
> 
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AMD ACP raven ridge: invalid audio mode 2
  2020-12-09 18:48       ` Mukunda,Vijendar
@ 2020-12-10  0:12         ` Mukunda,Vijendar
  2020-12-10  9:45           ` Janpieter Sollie
  0 siblings, 1 reply; 7+ messages in thread
From: Mukunda,Vijendar @ 2020-12-10  0:12 UTC (permalink / raw)
  To: Janpieter Sollie, Takashi Iwai
  Cc: Ravulapati Vishnu vardhan rao, alsa-devel, Akshu Agrawal



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.Mukunda@amd.com/ 
> 
> 
> 
> 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: AMD ACP raven ridge: invalid audio mode 2
  2020-12-10  0:12         ` Mukunda,Vijendar
@ 2020-12-10  9:45           ` Janpieter Sollie
  0 siblings, 0 replies; 7+ messages in thread
From: Janpieter Sollie @ 2020-12-10  9:45 UTC (permalink / raw)
  To: alsa-devel

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.Mukunda@amd.com/
>>
>>
>> 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
>
> .




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-12-10  9:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-08 14:01 AMD ACP raven ridge: invalid audio mode 2 Janpieter Sollie
2020-12-08 15:04 ` Takashi Iwai
2020-12-08 18:27   ` Mukunda,Vijendar
2020-12-09 14:28     ` Janpieter Sollie
2020-12-09 18:48       ` Mukunda,Vijendar
2020-12-10  0:12         ` Mukunda,Vijendar
2020-12-10  9:45           ` Janpieter Sollie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.