ASoC: amd: Add check for acp config flags
Subsystems (3)
PATCH 1/1 ASoC: amd: Add check for acp config flags
We have SOF and generic ACP support enabled for Rembrandt and pheonix platforms on some machines. Since we have same PCI id used for probing, add check for machine configuration flag to avoid conflict with newer pci drivers. Such machine flag has been initialized via dmi match on few Chrome machines. If no flag is specified probe and register older platform device.
--- sound/soc/amd/Kconfig | 2 ++ sound/soc/amd/ps/acp63.h | 2 ++ sound/soc/amd/ps/pci-ps.c | 8 +++++++- sound/soc/amd/yc/acp6x.h | 3 +++ sound/soc/amd/yc/pci-acp6x.c | 8 +++++++- 5 files changed, 21 insertions(+), 2 deletions(-)
sound/soc/amd/Kconfig +2 -0
@@ -90,6 +90,7 @@ config SND_SOC_AMD_VANGOGH_MACH config SND_SOC_AMD_ACP6x tristate "AMD Audio Coprocessor-v6.x Yellow Carp support" + select SND_AMD_ACP_CONFIG depends on X86 && PCI help This option enables Audio Coprocessor i.e ACP v6.x support on
@@ -130,6 +131,7 @@ config SND_SOC_AMD_RPL_ACP6x config SND_SOC_AMD_PS tristate "AMD Audio Coprocessor-v6.3 Pink Sardine support" + select SND_AMD_ACP_CONFIG depends on X86 && PCI && ACPI help This option enables Audio Coprocessor i.e ACP v6.3 support on
sound/soc/amd/ps/acp63.h +2 -0
@@ -111,3 +111,5 @@ struct acp63_dev_data {u16 pdev_count;u16 pdm_dev_index; }; + +int snd_amd_acp_find_config (struct pci_dev *pci);
sound/soc/amd/ps/pci-ps.c +7 -1
@@ -247,11 +247,17 @@ static int snd_acp63_probe(struct pci_dev *pci, {struct acp63_dev_data *adata;u32 addr; -u32 irqflags; +u32 irqflags, flag;int val;int ret; irqflags =IRQF_SHARED ; + +/* Return if acp config flag is defined */ + flag =snd_amd_acp_find_config (pci); +if (flag) +return -ENODEV ; +/* Pink Sardine device check */ switch (pci->revision) {case 0x63 :
sound/soc/amd/yc/acp6x.h +3 -0
@@ -105,3 +105,6 @@ static inline void acp6x_writel(u32 val, void __iomem *base_addr) {writel (val, base_addr - ACP6x_PHY_BASE_ADDRESS); } + +int snd_amd_acp_find_config (struct pci_dev *pci); +
sound/soc/amd/yc/pci-acp6x.c +7 -1
@@ -149,10 +149,16 @@ static int snd_acp6x_probe(struct pci_dev *pci,int index =0 ;int val =0x00 ;u32 addr; -unsigned int irqflags; +unsigned int irqflags, flag;int ret; irqflags =IRQF_SHARED ; + +/* Return if acp config flag is defined */ + flag =snd_amd_acp_find_config (pci); +if (flag) +return -ENODEV ; +/* Yellow Carp device check */ switch (pci->revision) {case 0x60 :
Signature · 1 line
2.25.1
Quoted 2 lines · Syed Saba Kareem
We have SOF and generic ACP support enabled for Rembrandt and pheonix platforms on some machines. Since we have same PCI id
s,pheonix,Phoenix,
s,have same,have the same,
Quoted 1 line
used for probing, add check for machine configuration flag to
You should mention here that the PCI ID is the same but the revision is different to make this clearer for the commit message.
Quoted 27 lines
avoid conflict with newer pci drivers. Such machine flag has been initialized via dmi match on few Chrome machines. If no flag is specified probe and register older platform device.
Signed-off-by Syed Saba Kareem <[email protected]>Reviewed-by Vijendar Mukunda <[email protected]>--- sound/soc/amd/Kconfig | 2 ++ sound/soc/amd/ps/acp63.h | 2 ++ sound/soc/amd/ps/pci-ps.c | 8 +++++++- sound/soc/amd/yc/acp6x.h | 3 +++ sound/soc/amd/yc/pci-acp6x.c | 8 +++++++- 5 files changed, 21 insertions(+), 2 deletions(-)sound/soc/amd/Kconfig +1
-0@@ -90,6 +90,7 @@ config SND_SOC_AMD_VANGOGH_MACH config SND_SOC_AMD_ACP6x tristate "AMD Audio Coprocessor-v6.x Yellow Carp support" + select SND_AMD_ACP_CONFIG depends on X86 && PCI help This option enables Audio Coprocessor i.e ACP v6.x support on
sound/soc/amd/Kconfig config SND_SOC_AMD_RPL_ACP6x · line 134
Quoted 4 lines
sound/soc/amd/Kconfig +1
-0@@ -130,6 +131,7 @@ config SND_SOC_AMD_RPL_ACP6x config SND_SOC_AMD_PS tristate "AMD Audio Coprocessor-v6.3 Pink Sardine support" + select SND_AMD_ACP_CONFIG
Whitespace looks not aligned here. I think it's a mix of tabs and spaces in this section.
Quoted 19 lines
sound/soc/amd/Kconfig +0
-0depends on X86 && PCI && ACPI help This option enables Audio Coprocessor i.e ACP v6.3 support onsound/soc/amd/ps/acp63.h +2
-0@@ -111,3 +111,5 @@ struct acp63_dev_data {u16 pdev_count;u16 pdm_dev_index; }; + +int snd_amd_acp_find_config (struct pci_dev *pci);sound/soc/amd/ps/pci-ps.c +0
-0@@ -247,11 +247,17 @@ static int snd_acp63_probe(struct pci_dev *pci, {
sound/soc/amd/ps/pci-ps.c static int snd_acp63_probe(struct pci_dev *pci, · line 256
Quoted 10 lines
sound/soc/amd/ps/pci-ps.c +4
-1struct acp63_dev_data *adata;u32 addr; -u32 irqflags; + u32 irqflags, flag; > int val;int ret; irqflags =IRQF_SHARED ; + +/* Return if acp config flag is defined */ + flag =snd_amd_acp_find_config (pci);
This 'flag' variable seems unnecessary if it's just used in one place and never evaluated.
Quoted 23 lines
sound/soc/amd/ps/pci-ps.c +3
-0+if (flag) +return -ENODEV ; +/* Pink Sardine device check */ switch (pci->revision) {case 0x63 :sound/soc/amd/yc/acp6x.h +3
-0@@ -105,3 +105,6 @@ static inline void acp6x_writel(u32 val, void __iomem *base_addr) {writel (val, base_addr - ACP6x_PHY_BASE_ADDRESS); } + +int snd_amd_acp_find_config (struct pci_dev *pci); +sound/soc/amd/yc/pci-acp6x.c +0
-0@@ -149,10 +149,16 @@ static int snd_acp6x_probe(struct pci_dev *pci,int index =0 ;
sound/soc/amd/yc/pci-acp6x.c static int snd_acp6x_probe(struct pci_dev *pci, · line 158
Quoted 10 lines
sound/soc/amd/yc/pci-acp6x.c +4
-1int val =0x00 ;u32 addr; -unsigned int irqflags; +unsigned int irqflags, flag;int ret; irqflags =IRQF_SHARED ; + +/* Return if acp config flag is defined */ + flag =snd_amd_acp_find_config (pci);
This 'flag' variable seems unnecessary if it's just used in one place and never evaluated.
Quoted 6 lines
sound/soc/amd/yc/pci-acp6x.c +3
-0+if (flag) +return -ENODEV ; +/* Yellow Carp device check */ switch (pci->revision) {case 0x60 :
Quoted 118 lines · Mario
Quoted 2 lines · Syed Saba Kareem
We have SOF and generic ACP support enabled for Rembrandt and pheonix platforms on some machines. Since we have same PCI id
s,pheonix,Phoenix,
s,have same,have the same,Quoted 1 line
used for probing, add check for machine configuration flag to
You should mention here that the PCI ID is the same but the revision is different to make this clearer for the commit message.
Quoted 26 lines
avoid conflict with newer pci drivers. Such machine flag has been initialized via dmi match on few Chrome machines. If no flag is specified probe and register older platform device.
Signed-off-by Syed Saba Kareem <[email protected]>Reviewed-by Vijendar Mukunda <[email protected]>---
sound/soc/amd/Kconfig | 2 ++
sound/soc/amd/ps/acp63.h | 2 ++
sound/soc/amd/ps/pci-ps.c | 8 +++++++-
sound/soc/amd/yc/acp6x.h | 3 +++
sound/soc/amd/yc/pci-acp6x.c| 8 +++++++-5 files changed, 21 insertions(+), 2 deletions(-)sound/soc/amd/Kconfig +0
-0@@ -90,6 +90,7 @@ config SND_SOC_AMD_VANGOGH_MACHconfig
SND_SOC_AMD_ACP6x
tristate "AMD Audio Coprocessor-v6.x Yellow Carp support" + selectSND_AMD_ACP_CONFIG
depends on X86 && PCI
help
This option enables Audio Coprocessor i.e ACP v6.x support onsound/soc/amd/Kconfig +0
-0@@ -130,6 +131,7 @@ config SND_SOC_AMD_RPL_ACP6xQuoted 3 lines
config
SND_SOC_AMD_PS
tristate "AMD Audio Coprocessor-v6.3 Pink Sardine support" + selectSND_AMD_ACP_CONFIGWhitespace looks not aligned here. I think it's a mix of tabs and spaces in this section. It is aligned ,may be due to addition of plus symbol in the patch it is looking like misaligned.
Quoted 18 lines
depends on X86 && PCI && ACPI
help
This option enables Audio Coprocessor i.e ACP v6.3 support onsound/soc/amd/ps/acp63.h +2
-0@@ -111,3 +111,5 @@ struct acp63_dev_data { u16 pdev_count; u16 pdm_dev_index; }; + +int snd_amd_acp_find_config (struct pci_dev *pci);sound/soc/amd/ps/pci-ps.c +0
-0sound/soc/amd/ps/pci-ps.c static int snd_acp63_probe(struct pci_dev *pci, · line 255
Quoted 10 lines
sound/soc/amd/ps/pci-ps.c +4
-1@@ -247,11 +247,17 @@ static int snd_acp63_probe(struct pci_dev *pci, { struct acp63_dev_data *adata; u32 addr; - u32 irqflags; + u32 irqflags, flag; > int val; int ret; irqflags = IRQF_SHARED; + + /* Return if acp config flag is defined */ + flag = snd_amd_acp_find_config(pci);This 'flag' variable seems unnecessary if it's just used in one place and never evaluated.
Quoted 23 lines
sound/soc/amd/ps/pci-ps.c +3
-0+ if (flag) + return -ENODEV; + /* Pink Sardine device check */ switch (pci->revision) {case
0x63:sound/soc/amd/yc/acp6x.h +0
-0@@ -105,3 +105,6 @@ static inline void acp6x_writel(u32 val, void __iomem *base_addr) { writel(val, base_addr - ACP6x_PHY_BASE_ADDRESS);}
sound/soc/amd/yc/acp6x.h +3
-0+ +int snd_amd_acp_find_config (struct pci_dev *pci); +sound/soc/amd/yc/pci-acp6x.c +0
-0sound/soc/amd/yc/pci-acp6x.c static int snd_acp6x_probe(struct pci_dev *pci, · line 157
Quoted 10 lines
sound/soc/amd/yc/pci-acp6x.c +4
-1@@ -149,10 +149,16 @@ static int snd_acp6x_probe(struct pci_dev *pci, int index = 0; int val = 0x00; u32 addr; - unsigned int irqflags; + unsigned int irqflags, flag; int ret; irqflags = IRQF_SHARED; + + /* Return if acp config flag is defined */ + flag = snd_amd_acp_find_config(pci);This 'flag' variable seems unnecessary if it's just used in one place and never evaluated.
Quoted 6 lines
sound/soc/amd/yc/pci-acp6x.c +3
-0+ if (flag) + return -ENODEV; + /* Yellow Carp device check */ switch (pci->revision) {case
0x60:
Quoted 118 lines · Mario
Quoted 2 lines · Syed Saba Kareem
We have SOF and generic ACP support enabled for Rembrandt and pheonix platforms on some machines. Since we have same PCI id
s,pheonix,Phoenix,
s,have same,have the same,Quoted 1 line
used for probing, add check for machine configuration flag to
You should mention here that the PCI ID is the same but the revision is different to make this clearer for the commit message.
Quoted 26 lines
avoid conflict with newer pci drivers. Such machine flag has been initialized via dmi match on few Chrome machines. If no flag is specified probe and register older platform device.
Signed-off-by Syed Saba Kareem <[email protected]>Reviewed-by Vijendar Mukunda <[email protected]>---
sound/soc/amd/Kconfig | 2 ++
sound/soc/amd/ps/acp63.h | 2 ++
sound/soc/amd/ps/pci-ps.c | 8 +++++++-
sound/soc/amd/yc/acp6x.h | 3 +++
sound/soc/amd/yc/pci-acp6x.c| 8 +++++++-5 files changed, 21 insertions(+), 2 deletions(-)sound/soc/amd/Kconfig +0
-0@@ -90,6 +90,7 @@ config SND_SOC_AMD_VANGOGH_MACHconfig
SND_SOC_AMD_ACP6x
tristate "AMD Audio Coprocessor-v6.x Yellow Carp support" + selectSND_AMD_ACP_CONFIG
depends on X86 && PCI
help
This option enables Audio Coprocessor i.e ACP v6.x support onsound/soc/amd/Kconfig +0
-0@@ -130,6 +131,7 @@ config SND_SOC_AMD_RPL_ACP6xQuoted 3 lines
config
SND_SOC_AMD_PS
tristate "AMD Audio Coprocessor-v6.3 Pink Sardine support" + selectSND_AMD_ACP_CONFIGWhitespace looks not aligned here. I think it's a mix of tabs and spaces in this section. It is aligned ,may be due to addition of plus symbol in the patch it is looking like misaligned.
Quoted 18 lines
depends on X86 && PCI && ACPI
help
This option enables Audio Coprocessor i.e ACP v6.3 support onsound/soc/amd/ps/acp63.h +2
-0@@ -111,3 +111,5 @@ struct acp63_dev_data { u16 pdev_count; u16 pdm_dev_index; }; + +int snd_amd_acp_find_config (struct pci_dev *pci);sound/soc/amd/ps/pci-ps.c +0
-0sound/soc/amd/ps/pci-ps.c static int snd_acp63_probe(struct pci_dev *pci, · line 255
Quoted 10 lines
sound/soc/amd/ps/pci-ps.c +4
-1@@ -247,11 +247,17 @@ static int snd_acp63_probe(struct pci_dev *pci, { struct acp63_dev_data *adata; u32 addr; - u32 irqflags; + u32 irqflags, flag; > int val; int ret; irqflags = IRQF_SHARED; + + /* Return if acp config flag is defined */ + flag = snd_amd_acp_find_config(pci);This 'flag' variable seems unnecessary if it's just used in one place and never evaluated.
Quoted 23 lines
sound/soc/amd/ps/pci-ps.c +3
-0+ if (flag) + return -ENODEV; + /* Pink Sardine device check */ switch (pci->revision) {case
0x63:sound/soc/amd/yc/acp6x.h +0
-0@@ -105,3 +105,6 @@ static inline void acp6x_writel(u32 val, void __iomem *base_addr) { writel(val, base_addr - ACP6x_PHY_BASE_ADDRESS);}
sound/soc/amd/yc/acp6x.h +3
-0+ +int snd_amd_acp_find_config (struct pci_dev *pci); +sound/soc/amd/yc/pci-acp6x.c +0
-0sound/soc/amd/yc/pci-acp6x.c static int snd_acp6x_probe(struct pci_dev *pci, · line 157
Quoted 10 lines
sound/soc/amd/yc/pci-acp6x.c +4
-1@@ -149,10 +149,16 @@ static int snd_acp6x_probe(struct pci_dev *pci, int index = 0; int val = 0x00; u32 addr; - unsigned int irqflags; + unsigned int irqflags, flag; int ret; irqflags = IRQF_SHARED; + + /* Return if acp config flag is defined */ + flag = snd_amd_acp_find_config(pci);This 'flag' variable seems unnecessary if it's just used in one place and never evaluated.
Quoted 6 lines
sound/soc/amd/yc/pci-acp6x.c +3
-0+ if (flag) + return -ENODEV; + /* Yellow Carp device check */ switch (pci->revision) {case
0x60:
Quoted 2 lines · Syed Saba Kareem
We have SOF and generic ACP support enabled for Rembrandt and pheonix platforms on some machines. Since we have same PCI id
s,pheonix,Phoenix,
s,have same,have the same,
Quoted 1 line
used for probing, add check for machine configuration flag to
You should mention here that the PCI ID is the same but the revision is different to make this clearer for the commit message.
Quoted 27 lines
avoid conflict with newer pci drivers. Such machine flag has been initialized via dmi match on few Chrome machines. If no flag is specified probe and register older platform device.
Signed-off-by Syed Saba Kareem <[email protected]>Reviewed-by Vijendar Mukunda <[email protected]>--- sound/soc/amd/Kconfig | 2 ++ sound/soc/amd/ps/acp63.h | 2 ++ sound/soc/amd/ps/pci-ps.c | 8 +++++++- sound/soc/amd/yc/acp6x.h | 3 +++ sound/soc/amd/yc/pci-acp6x.c | 8 +++++++- 5 files changed, 21 insertions(+), 2 deletions(-)sound/soc/amd/Kconfig +1
-0@@ -90,6 +90,7 @@ config SND_SOC_AMD_VANGOGH_MACH config SND_SOC_AMD_ACP6x tristate "AMD Audio Coprocessor-v6.x Yellow Carp support" + select SND_AMD_ACP_CONFIG depends on X86 && PCI help This option enables Audio Coprocessor i.e ACP v6.x support on
sound/soc/amd/Kconfig config SND_SOC_AMD_RPL_ACP6x · line 134
Quoted 4 lines
sound/soc/amd/Kconfig +1
-0@@ -130,6 +131,7 @@ config SND_SOC_AMD_RPL_ACP6x config SND_SOC_AMD_PS tristate "AMD Audio Coprocessor-v6.3 Pink Sardine support" + select SND_AMD_ACP_CONFIG
Whitespace looks not aligned here. I think it's a mix of tabs and spaces in this section.
Quoted 19 lines
sound/soc/amd/Kconfig +0
-0depends on X86 && PCI && ACPI help This option enables Audio Coprocessor i.e ACP v6.3 support onsound/soc/amd/ps/acp63.h +2
-0@@ -111,3 +111,5 @@ struct acp63_dev_data {u16 pdev_count;u16 pdm_dev_index; }; + +int snd_amd_acp_find_config (struct pci_dev *pci);sound/soc/amd/ps/pci-ps.c +0
-0@@ -247,11 +247,17 @@ static int snd_acp63_probe(struct pci_dev *pci, {
sound/soc/amd/ps/pci-ps.c static int snd_acp63_probe(struct pci_dev *pci, · line 256
Quoted 10 lines
sound/soc/amd/ps/pci-ps.c +4
-1struct acp63_dev_data *adata;u32 addr; -u32 irqflags; + u32 irqflags, flag; > int val;int ret; irqflags =IRQF_SHARED ; + +/* Return if acp config flag is defined */ + flag =snd_amd_acp_find_config (pci);
This 'flag' variable seems unnecessary if it's just used in one place and never evaluated.
Quoted 23 lines
sound/soc/amd/ps/pci-ps.c +3
-0+if (flag) +return -ENODEV ; +/* Pink Sardine device check */ switch (pci->revision) {case 0x63 :sound/soc/amd/yc/acp6x.h +3
-0@@ -105,3 +105,6 @@ static inline void acp6x_writel(u32 val, void __iomem *base_addr) {writel (val, base_addr - ACP6x_PHY_BASE_ADDRESS); } + +int snd_amd_acp_find_config (struct pci_dev *pci); +sound/soc/amd/yc/pci-acp6x.c +0
-0@@ -149,10 +149,16 @@ static int snd_acp6x_probe(struct pci_dev *pci,int index =0 ;
sound/soc/amd/yc/pci-acp6x.c static int snd_acp6x_probe(struct pci_dev *pci, · line 158
Quoted 10 lines
sound/soc/amd/yc/pci-acp6x.c +4
-1int val =0x00 ;u32 addr; -unsigned int irqflags; +unsigned int irqflags, flag;int ret; irqflags =IRQF_SHARED ; + +/* Return if acp config flag is defined */ + flag =snd_amd_acp_find_config (pci);
This 'flag' variable seems unnecessary if it's just used in one place and never evaluated.
Quoted 6 lines
sound/soc/amd/yc/pci-acp6x.c +3
-0+if (flag) +return -ENODEV ; +/* Yellow Carp device check */ switch (pci->revision) {case 0x60 :
Mark Brown
maintainerQuoted 8 lines · Syed Saba Kareem
We have SOF and generic ACP support enabled for Rembrandt and pheonix platforms on some machines. Since we have same PCI id used for probing, add check for machine configuration flag to avoid conflict with newer pci drivers. Such machine flag has been initialized via dmi match on few Chrome machines. If no flag is specified probe and register older platform device.
[...]
Applied to
https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git for-next
Thanks!
[1/1] ASoC: amd: Add check for acp config flags
commit: bddcfb0802eb69b0f51293eab5db33d344c0262f
All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent to Linus during the next merge window (or sooner if it is a bug fix), however if problems are discovered then the patch may be dropped or reverted.
You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.
If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.
Please add any relevant lists and maintainers to the CCs when replying to this mail.
Thanks,
Mark