[PATCH] ASoC: rt5682: Have global name clock option for parent clk

2020-09-06 Thread Akshu Agrawal
When adding parent clk(mclk) to wclk, this adds fallback option for the case where global clk name is used. Signed-off-by: Akshu Agrawal --- sound/soc/codecs/rt5682.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sound/soc/codecs/rt5682.c b/sound/soc/codecs/rt5682.c index 93ebf0279b62

[v2] ASoC: AMD: Clean kernel log from deferred probe error messages

2020-08-26 Thread Akshu Agrawal
While the driver waits for DAIs to be probed and retries probing, have the error messages at debug level instead of error. Signed-off-by: Akshu Agrawal --- v2: Add a debug level message for -EPROBE_DEFER sound/soc/amd/acp3x-rt5682-max9836.c | 11 --- 1 file changed, 8 insertions(+), 3

[PATCH] ASoC: AMD: Clean kernel log from deferred probe error messages

2020-08-26 Thread Akshu Agrawal
While the driver waits for DAIs to be probed and retries probing, avoid printing error messages. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp3x-rt5682-max9836.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/amd/acp3x-rt5682-max9836.c b/sound/soc/amd

[3/4] ACPI: APD: Add a fmw property is_raven

2020-07-31 Thread Akshu Agrawal
Since there is slight difference in AMD RV based soc in misc clk architecture. The fmw property will help in differentiating the SoCs. Signed-off-by: Akshu Agrawal --- drivers/acpi/acpi_apd.c | 4 include/linux/platform_data/clk-fch.h | 1 + 2 files changed, 5 insertions

[v3 4/4] clk: x86: Support RV architecture

2020-07-31 Thread Akshu Agrawal
There is minor difference between previous family of SoC and the current one. Which is the there is only 48Mh fixed clk. There is no mux and no option to select another freq as there in previous. Signed-off-by: Akshu Agrawal Reviewed-by: Stephen Boyd --- v2: Consolidated the loops in remove. v3

[v2 2/4] clk: x86: Change name from ST to FCH

2020-07-31 Thread Akshu Agrawal
AMD SoC general pupose clk is present in new platforms with minor differences. We can reuse the same clk driver for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal Reviewed-by: Stephen Boyd --- v2: Moved some changes to acp:apd patch so that individual

[0/4] Extend AMD SoC general purpose clk for all versions

2020-07-31 Thread Akshu Agrawal
Hi, This series of patch does the following: 1. Changes the name of the AMD SoC general purpose clk from ST(a version of SoC) to FCH (name of the IP). 2. Then make the drivers support both older and newer versions of SoC. Thanks, Akshu Akshu Agrawal (4): ACPI: APD: Change name from ST to FCH

[v2 1/4] ACPI: APD: Change name from ST to FCH

2020-07-31 Thread Akshu Agrawal
AMD SoC general pupose clk is present in new platforms with same MMIO mappings. We can reuse the same clk handler support for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal Acked-by: Stephen Boyd --- v2: pulled in clk changes so that patch compiles

[3/4] ACPI: APD: Add a fmw property is_raven

2020-07-28 Thread Akshu Agrawal
Since there is slight difference in AMD RV based soc in misc clk architecture. The fmw property will help in differentiating the SoCs. Signed-off-by: Akshu Agrawal --- drivers/acpi/acpi_apd.c | 4 include/linux/platform_data/clk-fch.h | 1 + 2 files changed, 5 insertions

[v3 4/4] clk: x86: Support RV architecture

2020-07-28 Thread Akshu Agrawal
There is minor difference between previous family of SoC and the current one. Which is the there is only 48Mh fixed clk. There is no mux and no option to select another freq as there in previous. Signed-off-by: Akshu Agrawal --- v2: Consolidated the loops in remove. v3: Removed negation

[3/4] ACPI: APD: Add a fmw property is_raven

2020-07-28 Thread Akshu Agrawal
Since there is slight difference in AMD RV based soc in misc clk architecture. The fmw property will help in differentiating the SoCs. Signed-off-by: Akshu Agrawal --- drivers/acpi/acpi_apd.c | 4 include/linux/platform_data/clk-fch.h | 1 + 2 files changed, 5 insertions

[v2 2/4] clk: x86: Change name from ST to FCH

2020-07-28 Thread Akshu Agrawal
AMD SoC general pupose clk is present in new platforms with minor differences. We can reuse the same clk driver for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal --- v2: Moved some changes to acp:apd patch so that individual patches compile drivers

[v2 1/4] ACPI: APD: Change name from ST to FCH

2020-07-28 Thread Akshu Agrawal
AMD SoC general pupose clk is present in new platforms with same MMIO mappings. We can reuse the same clk handler support for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal --- v2: pulled in clk changes so that patch compiles individually drivers

[PATCH] ASoC: AMD: Restore PME_EN state at Power On

2020-07-24 Thread Akshu Agrawal
and the state should be maintained after ACP Power On. Signed-off-by: Akshu Agrawal --- sound/soc/amd/raven/pci-acp3x.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/sound/soc/amd/raven/pci-acp3x.c b/sound/soc/amd/raven/pci-acp3x.c index ebf4388b6262

[PATCH 3/4] ACPI: APD: Add a fmw property is_raven

2020-07-19 Thread Akshu Agrawal
Since there is slight difference in AMD RV based soc in misc clk architecture. The fmw property will help in differentiating the SoCs. Signed-off-by: Akshu Agrawal --- drivers/acpi/acpi_apd.c | 4 include/linux/platform_data/clk-fch.h | 1 + 2 files changed, 5 insertions

[PATCH 1/4] ACPI: APD: Change name from ST to FCH

2020-07-19 Thread Akshu Agrawal
AMD SoC general pupose clk is present in new platforms with same MMIO mappings. We can reuse the same clk handler support for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal --- drivers/acpi/acpi_apd.c| 14

[v2 4/4] clk: x86: Support RV architecture

2020-07-19 Thread Akshu Agrawal
There is minor difference between previous family of SoC and the current one. Which is the there is only 48Mh fixed clk. There is no mux and no option to select another freq as there in previous. Signed-off-by: Akshu Agrawal --- v2: Consolidated the loops in remove. drivers/clk/x86/clk-fch.c

[PATCH 2/4] clk: x86: Change name from ST to FCH

2020-07-19 Thread Akshu Agrawal
AMD SoC general pupose clk is present in new platforms with minor differences. We can reuse the same clk driver for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal --- drivers/clk/x86/Makefile| 2 +- drivers/clk/x86/{clk-st.c =>

[PATCH 4/5] clk: x86: Support RV architecture

2020-07-12 Thread Akshu Agrawal
There is minor difference between previous family of SoC and the current one. Which is the there is only 48Mh fixed clk. There is no mux and no option to select another freq as there in previous. Signed-off-by: Akshu Agrawal --- drivers/clk/x86/clk-fch.c | 55

[PATCH 2/5] clk: x86: Change name from ST to FCH

2020-07-12 Thread Akshu Agrawal
AMD SoC general pupose clk is present in new platforms with minor differences. We can reuse the same clk driver for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal --- drivers/clk/x86/Makefile| 2 +- drivers/clk/x86/{clk-st.c =>

[PATCH 1/5] ACPI: APD: Change name from ST to FCH

2020-07-12 Thread Akshu Agrawal
AMD SoC general pupose clk is present in new platforms with same MMIO mappings. We can reuse the same clk handler support for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal --- drivers/acpi/acpi_apd.c| 14

[PATCH 3/5] ACPI: APD: Add a fmw property is_raven

2020-07-12 Thread Akshu Agrawal
Since there is slight difference in AMD RV based soc in misc clk architecture. The fmw property will help in differentiating the SoCs. Signed-off-by: Akshu Agrawal --- drivers/acpi/acpi_apd.c | 4 include/linux/platform_data/clk-fch.h | 1 + 2 files changed, 5 insertions

[PATCH] ASoC: rt5682: Add fmw property to get name of mclk

2020-07-07 Thread Akshu Agrawal
Non-dts based systems can use ACPI DSDT to pass on the mclk. Thus add fmw property mclk-name to get the name of the system clk and link it to rt5682 mclk. Signed-off-by: Akshu Agrawal --- include/sound/rt5682.h| 1 + sound/soc/codecs/rt5682.c | 7 ++- 2 files changed, 7 insertions(+), 1

[PATCH 1/2] clk: x86: Change name from ST to FCH

2020-07-07 Thread Akshu Agrawal
AMD SoC general pupose clk is present in new platforms with minor differences. We can reuse the same clk driver for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal --- This patch is dependant on https://patchwork.kernel.org/patch/11648129/ drivers/clk

[PATCH 2/2] clk: x86: Support RV architecture

2020-07-07 Thread Akshu Agrawal
There is minor difference between previous family of SoC and the current one. Which is the there is only 48Mh fixed clk. There is no mux and no option to select another freq as there in previous. Signed-off-by: Akshu Agrawal --- This patch is dependant on https://patchwork.kernel.org/patch

[PATCH 1/2] ACPI: APD: Change name from ST to FCH

2020-07-07 Thread Akshu Agrawal
AMD SoC general pupose clk is present in new platforms with same MMIO mappings. We can reuse the same clk handler support for other platforms. Hence, changing name from ST(SoC) to FCH(IP) Signed-off-by: Akshu Agrawal --- drivers/acpi/acpi_apd.c| 14

[PATCH 2/2] ACPI: APD: Add a fmw property is_raven

2020-07-07 Thread Akshu Agrawal
Since there is slight difference in AMD RV based soc in misc clk architecture. The fmw property will help in differentiating the SoCs. Signed-off-by: Akshu Agrawal --- drivers/acpi/acpi_apd.c | 4 include/linux/platform_data/clk-fch.h | 1 + 2 files changed, 5 insertions

[PATCH] ASoC: amd: Enable interrupt in dma_open

2020-06-30 Thread Akshu Agrawal
Fixes interrupt enable condition check with which now interrupt gets enabled in dma_open. Prior to this patch it was getting enabled in runtime_resume only. Signed-off-by: Akshu Agrawal --- sound/soc/amd/raven/acp3x-pcm-dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] mmc: sdhci-acpi: For amd device set driver type as MMC_SET_DRIVER_TYPE_A

2020-06-23 Thread Akshu Agrawal
HS400/HS200/eMMC HS doesn't have Preset Value register. Hence, sdhci_set_ios function overrides the value set by fmw to SDHCI_CTRL_DRV_TYPE_B. This patch sets drv_type to MMC_SET_DRIVER_TYPE_A so that host_control2 register gets updated with the required strength value. Signed-off-by: Akshu

[PATCH] ASoC: rt5682: Register clocks even when mclk is NULL

2020-06-12 Thread Akshu Agrawal
Fixes kernel crash on platforms which do not have mclk exposed in CCF framework. For these platforms have mclk as NULL and continue to register clocks. Signed-off-by: Akshu Agrawal --- sound/soc/codecs/rt5682.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sound

[v3] ASoC: AMD: Use mixer control to switch between DMICs

2020-05-30 Thread Akshu Agrawal
Having mixer control to switch between DMICs prevents user to initiate capture simultaneously on both the DMIcs. Earlier 2 separate devices, one for each DMIC, gave an option of using them simultaneously, which is not supported. Signed-off-by: Akshu Agrawal --- v2: Modified "Front Mic"

[v2] ASoC: AMD: Use mixer control to switch between DMICs

2020-05-28 Thread Akshu Agrawal
Having mixer control to switch between DMICs prevents user to initiate capture simultaneously on both the DMIcs. Earlier 2 separate devices, one for each DMIC, gave an option of using them simultaneously, which is not supported. Signed-off-by: Akshu Agrawal --- v2: Modified "Front Mic"

[PATCH] ASoC: AMD: Use mixer control to switch between DMICs

2020-05-26 Thread Akshu Agrawal
Having mixer control to switch between DMICs prevents user to initiate capture simultaneously on both the DMIcs. Earlier 2 separate devices, one for each DMIC, gave an option of using them simultaneously, which is not supported. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp3x-rt5682

[PATCH] ASoC: amd: raven: Make the driver name consistent across files

2020-05-17 Thread Akshu Agrawal
-by: Akshu Agrawal --- Resending the patch https://patchwork.kernel.org/patch/11355713/ sound/soc/amd/raven/acp3x-i2s.c | 6 +++--- sound/soc/amd/raven/acp3x-pcm-dma.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sound/soc/amd/raven/acp3x-i2s.c b/sound/soc/amd/raven

[PATCH] ASoC: amd :High hw_level while simultaneous capture

2020-05-06 Thread Akshu Agrawal
he issue. Signed-off-by: Ravulapati Vishnu vardhan rao Signed-off-by: Akshu Agrawal --- sound/soc/amd/raven/acp3x-pcm-dma.c | 37 +++-- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/sound/soc/amd/raven/acp3x-pcm-dma.c b/sound/soc/amd/raven/acp3x-pcm-dma

[PATCH] ASoC: amd :High hw_level while simultaneous capture

2020-05-05 Thread Akshu Agrawal
From: Ravulapati Vishnu vardhan rao Simultaneous capture on dmic and headset mic is having issue with high hw_level being reported. Issue Can be reproduced by: arecord -D hw:2,0 -f dat -d 60 /tmp/test0 & arecord -D hw:2,2 -f dat -d 60 /tmp/test1 & cat /proc/asound/card2/pcm?c/sub0/status

[PATCH] ASoC: AMD: Add SND_JACK_LINEOUT jack type

2018-10-15 Thread Akshu Agrawal
Some 3 pole connectors report impedance greater than threshold of 1000Ohm. Thus, da7219 reports them as LINEOUT. Adding the SND_JACK_LINEOUT type so that we don't fail to detect any 3 pole jack type. Also, changing SND_JACK_HEADPHONE | SND_JACK_MICROPHONE -> SND_JACK_HEADSET Signed-off-by: Ak

[PATCH] ASoC: AMD: Add SND_JACK_LINEOUT jack type

2018-10-15 Thread Akshu Agrawal
Some 3 pole connectors report impedance greater than threshold of 1000Ohm. Thus, da7219 reports them as LINEOUT. Adding the SND_JACK_LINEOUT type so that we don't fail to detect any 3 pole jack type. Also, changing SND_JACK_HEADPHONE | SND_JACK_MICROPHONE -> SND_JACK_HEADSET Signed-off-by: Ak

[PATCH v2] ASoC: AMD: Fix capture unstable in beginning for some runs

2018-09-18 Thread Akshu Agrawal
worth of data is transferred. After one period of data, in handler of period completion interrupt we update the config and correct value of descriptor starts reflecting. Signed-off-by: Akshu Agrawal --- v2: fix overrun issue and missed case where bytescount = rtd->bytescount sound/soc/amd/

[PATCH v2] ASoC: AMD: Fix capture unstable in beginning for some runs

2018-09-18 Thread Akshu Agrawal
worth of data is transferred. After one period of data, in handler of period completion interrupt we update the config and correct value of descriptor starts reflecting. Signed-off-by: Akshu Agrawal --- v2: fix overrun issue and missed case where bytescount = rtd->bytescount sound/soc/amd/

[PATCH] ASoC: AMD: Fix capture unstable in beginning for some runs

2018-09-17 Thread Akshu Agrawal
worth of data is transferred. After one period of data, in handler of period completion interrupt we update the config and correct value of descriptor starts reflecting. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc

[PATCH] ASoC: AMD: Fix capture unstable in beginning for some runs

2018-09-17 Thread Akshu Agrawal
worth of data is transferred. After one period of data, in handler of period completion interrupt we update the config and correct value of descriptor starts reflecting. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc

[PATCH v2] ASoC: AMD: Fix simultaneous playback and capture on different channel

2018-09-10 Thread Akshu Agrawal
: ---capture sets I2S channel 113.597979: acp_dma_hw_params: ---configures capture for I2S channel 113.598114: acp_dma_hw_params: ---configures playback for I2S channel This is fixed by having 2 separate instance for playback and capture. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-da7219

[PATCH v2] ASoC: AMD: Fix simultaneous playback and capture on different channel

2018-09-10 Thread Akshu Agrawal
: ---capture sets I2S channel 113.597979: acp_dma_hw_params: ---configures capture for I2S channel 113.598114: acp_dma_hw_params: ---configures playback for I2S channel This is fixed by having 2 separate instance for playback and capture. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-da7219

[PATCH 1/2] ASoC: AMD: Fix simultaneous playback and capture on different channel

2018-09-10 Thread Akshu Agrawal
(where channel info is set) and hw_params(where channel info is read). Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-da7219-max98357a.c | 28 1 file changed, 28 insertions(+) diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219

[PATCH 1/2] ASoC: AMD: Fix simultaneous playback and capture on different channel

2018-09-10 Thread Akshu Agrawal
(where channel info is set) and hw_params(where channel info is read). Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-da7219-max98357a.c | 28 1 file changed, 28 insertions(+) diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219

[PATCH 2/2] ASoC: AMD: Ensure reset bit is cleared before configuring

2018-09-10 Thread Akshu Agrawal
the start of another dma, channel is out of the reset state. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 21 + 1 file changed, 21 insertions(+) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index e359938..77b265b 100644 --- a/sound/soc/a

[PATCH 2/2] ASoC: AMD: Ensure reset bit is cleared before configuring

2018-09-10 Thread Akshu Agrawal
the start of another dma, channel is out of the reset state. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 21 + 1 file changed, 21 insertions(+) diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c index e359938..77b265b 100644 --- a/sound/soc/a

[PATCH] ASoC: AMD: Change MCLK to 48Mhz

2018-08-21 Thread Akshu Agrawal
25Mhz MCLK which was earlier used was of spread type. Thus, we were not getting accurate rate. The 48Mhz system clk is of non-spread type and we are changing to it to get accurate rate. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-da7219-max98357a.c | 2 +- 1 file changed, 1 insertion

[PATCH] ASoC: AMD: Change MCLK to 48Mhz

2018-08-21 Thread Akshu Agrawal
25Mhz MCLK which was earlier used was of spread type. Thus, we were not getting accurate rate. The 48Mhz system clk is of non-spread type and we are changing to it to get accurate rate. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-da7219-max98357a.c | 2 +- 1 file changed, 1 insertion

[PATCH] ASoC: AMD: Set constraints for DMIC and MAX98357a codec

2018-08-21 Thread Akshu Agrawal
We support dual channel, 48Khz. This constraint was set only for da7219. It is being extended to DMIC and MAX98357a. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-da7219-max98357a.c | 33 + 1 file changed, 33 insertions(+) diff --git a/sound/soc/amd/acp

[PATCH] ASoC: AMD: Set constraints for DMIC and MAX98357a codec

2018-08-21 Thread Akshu Agrawal
We support dual channel, 48Khz. This constraint was set only for da7219. It is being extended to DMIC and MAX98357a. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-da7219-max98357a.c | 33 + 1 file changed, 33 insertions(+) diff --git a/sound/soc/amd/acp

[PATCH] clk: x86: Set default parent to 48Mhz

2018-08-21 Thread Akshu Agrawal
System clk provided in ST soc can be set to: 48Mhz, non-spread 25Mhz, spread To get accurate rate, we need it to set it at non-spread option which is 48Mhz. Signed-off-by: Akshu Agrawal --- drivers/clk/x86/clk-st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk

[PATCH] clk: x86: Set default parent to 48Mhz

2018-08-21 Thread Akshu Agrawal
System clk provided in ST soc can be set to: 48Mhz, non-spread 25Mhz, spread To get accurate rate, we need it to set it at non-spread option which is 48Mhz. Signed-off-by: Akshu Agrawal --- drivers/clk/x86/clk-st.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk

[PATCH v2 3/3] ASoC: AMD: Set delay value for the capture case

2018-08-06 Thread Akshu Agrawal
ACP->SYSMEM DMA happens at every I2S->SYSMEM period completion. Thus, there is delay of x frames till I2S->SYSMEM reaches a period length. This delay is communicated to user space. Signed-off-by: Akshu Agrawal --- v2: moved reading of bytes transfered from I2S->ACP to get more ac

[PATCH v2 3/3] ASoC: AMD: Set delay value for the capture case

2018-08-06 Thread Akshu Agrawal
ACP->SYSMEM DMA happens at every I2S->SYSMEM period completion. Thus, there is delay of x frames till I2S->SYSMEM reaches a period length. This delay is communicated to user space. Signed-off-by: Akshu Agrawal --- v2: moved reading of bytes transfered from I2S->ACP to get more ac

[PATCH v2 2/3] ASoC: AMD: Modified DMA pointer for capture

2018-08-06 Thread Akshu Agrawal
From: "Mukunda, Vijendar" Give position on ACP->SYSMEM DMA channel for the number of bytes that have been transferred on the basis of current descriptor under service. Signed-off-by: Vijendar Mukunda Signed-off-by: Akshu Agrawal --- v2: Fixed position, now position = 0 if on 1

[PATCH v2 2/3] ASoC: AMD: Modified DMA pointer for capture

2018-08-06 Thread Akshu Agrawal
From: "Mukunda, Vijendar" Give position on ACP->SYSMEM DMA channel for the number of bytes that have been transferred on the basis of current descriptor under service. Signed-off-by: Vijendar Mukunda Signed-off-by: Akshu Agrawal --- v2: Fixed position, now position = 0 if on 1

[PATCH 1/3] ASoC: AMD: Make ACP->SYSMEM DMA non circular

2018-08-06 Thread Akshu Agrawal
In capture case we don't want ACP to SYSMEM dma to be circular. This is because if an in place DSP filter is applied to captured output then circular DMA can overwrite the filter value with stale data. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 36

[PATCH 1/3] ASoC: AMD: Make ACP->SYSMEM DMA non circular

2018-08-06 Thread Akshu Agrawal
In capture case we don't want ACP to SYSMEM dma to be circular. This is because if an in place DSP filter is applied to captured output then circular DMA can overwrite the filter value with stale data. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 36

[PATCH 1/3] ASoC: AMD: Make ACP->SYSMEM DMA non circular

2018-08-02 Thread Akshu Agrawal
In capture case we don't want ACP to SYSMEM dma to be circular. This is because if an in place DSP filter is applied to captured output then circular DMA can overwrite the filter value with stale data. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 36

[PATCH 1/3] ASoC: AMD: Make ACP->SYSMEM DMA non circular

2018-08-02 Thread Akshu Agrawal
In capture case we don't want ACP to SYSMEM dma to be circular. This is because if an in place DSP filter is applied to captured output then circular DMA can overwrite the filter value with stale data. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 36

[PATCH 3/3] ASoC: AMD: Set delay value for the capture case

2018-08-02 Thread Akshu Agrawal
ACP->SYSMEM DMA happens at every I2S->SYSMEM period completion. Thus, there is delay of x frames till I2S->SYSMEM reaches a period length. This delay is communicated to user space. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 19 +++ 1 file ch

[PATCH 2/3] ASoC: AMD: Modified DMA pointer for capture

2018-08-02 Thread Akshu Agrawal
From: "Mukunda, Vijendar" Give position on ACP->SYSMEM DMA channel for the number of bytes that have been transferred on the current descriptor under service. Signed-off-by: Vijendar Mukunda Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-p

[PATCH 2/3] ASoC: AMD: Modified DMA pointer for capture

2018-08-02 Thread Akshu Agrawal
From: "Mukunda, Vijendar" Give position on ACP->SYSMEM DMA channel for the number of bytes that have been transferred on the current descriptor under service. Signed-off-by: Vijendar Mukunda Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-p

[PATCH 3/3] ASoC: AMD: Set delay value for the capture case

2018-08-02 Thread Akshu Agrawal
ACP->SYSMEM DMA happens at every I2S->SYSMEM period completion. Thus, there is delay of x frames till I2S->SYSMEM reaches a period length. This delay is communicated to user space. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 19 +++ 1 file ch

[PATCH v2] ASoC: soc-pcm: Use delay set in component pointer function

2018-08-01 Thread Akshu Agrawal
dai delay function if exposed. Now, Total delay = base delay + cpu_dai delay + codec_dai delay Signed-off-by: Akshu Agrawal --- sound/soc/soc-pcm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 98be04b..e8b98bfd 100644 --- a/sound/soc/

[PATCH v2] ASoC: soc-pcm: Use delay set in component pointer function

2018-08-01 Thread Akshu Agrawal
dai delay function if exposed. Now, Total delay = base delay + cpu_dai delay + codec_dai delay Signed-off-by: Akshu Agrawal --- sound/soc/soc-pcm.c | 5 + 1 file changed, 5 insertions(+) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 98be04b..e8b98bfd 100644 --- a/sound/soc/

[PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-27 Thread Akshu Agrawal
ays from codec or cpu dai delay function if exposed. Signed-off-by: Akshu Agrawal --- sound/soc/soc-pcm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 98be04b..b1a2bc2 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/

[PATCH] ASoC: soc-pcm: Use delay set in pointer function

2018-07-27 Thread Akshu Agrawal
ays from codec or cpu dai delay function if exposed. Signed-off-by: Akshu Agrawal --- sound/soc/soc-pcm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 98be04b..b1a2bc2 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/

[PATCH v2] ASoC: AMD: Fix build warning

2018-07-26 Thread Akshu Agrawal
Fixes sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_probe': sound/soc/amd/acp-da7219-max98357a.c:367:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] dev_err(>dev, "Failed to register regulator: %d\n", ret); Signed-off-by: Akshu Ag

[PATCH v2] ASoC: AMD: Fix build warning

2018-07-26 Thread Akshu Agrawal
Fixes sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_probe': sound/soc/amd/acp-da7219-max98357a.c:367:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] dev_err(>dev, "Failed to register regulator: %d\n", ret); Signed-off-by: Akshu Ag

[PATCH] ASoC: AMD: Fix build warning

2018-07-25 Thread Akshu Agrawal
Fixes sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_probe': sound/soc/amd/acp-da7219-max98357a.c:367:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] dev_err(>dev, "Failed to register regulator: %d\n", ret); Signed-off-by: Akshu Agrawa

[PATCH] ASoC: AMD: Fix build warning

2018-07-25 Thread Akshu Agrawal
Fixes sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_probe': sound/soc/amd/acp-da7219-max98357a.c:367:3: warning: 'ret' may be used uninitialized in this function [-Wmaybe-uninitialized] dev_err(>dev, "Failed to register regulator: %d\n", ret); Signed-off-by: Akshu Agrawa

[PATCH v2] ASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002

2018-07-25 Thread Akshu Agrawal
DA7219 for our platform need to be configured for 1.8V. Hence, we add a volatge regulator with supplies of 1.8V in the machine driver. Signed-off-by: Adam Thomson Signed-off-by: Akshu Agrawal --- sound/soc/amd/Kconfig| 1 + sound/soc/amd/acp-da7219-max98357a.c | 43

[PATCH v2] ASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002

2018-07-25 Thread Akshu Agrawal
DA7219 for our platform need to be configured for 1.8V. Hence, we add a volatge regulator with supplies of 1.8V in the machine driver. Signed-off-by: Adam Thomson Signed-off-by: Akshu Agrawal --- sound/soc/amd/Kconfig| 1 + sound/soc/amd/acp-da7219-max98357a.c | 43

[PATCH] ASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002

2018-07-20 Thread Akshu Agrawal
DA7219 for our platform need to be configured for 1.8V. Hence, we add a fixed volatge regulator with supplies of 1.8V in the machine driver. Signed-off-by: Akshu Agrawal --- sound/soc/amd/Kconfig| 2 ++ sound/soc/amd/acp-da7219-max98357a.c | 45

[PATCH] ASoC: AMD: Add a fix voltage regulator for DA7219 and ADAU7002

2018-07-20 Thread Akshu Agrawal
DA7219 for our platform need to be configured for 1.8V. Hence, we add a fixed volatge regulator with supplies of 1.8V in the machine driver. Signed-off-by: Akshu Agrawal --- sound/soc/amd/Kconfig| 2 ++ sound/soc/amd/acp-da7219-max98357a.c | 45

[PATCH 2/2] ASoC: AMD: For capture have interrupts on I2S->ACP channel

2018-07-16 Thread Akshu Agrawal
Having interrupts enabled for ACP<->SYSMEM DMA transfer, we are in for an interrupt storm. For both playback and capture interrupts should be enabled for I2S<->ACP DMA. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 14 ++ 1 file changed, 6 insertions(+),

[PATCH 2/2] ASoC: AMD: For capture have interrupts on I2S->ACP channel

2018-07-16 Thread Akshu Agrawal
Having interrupts enabled for ACP<->SYSMEM DMA transfer, we are in for an interrupt storm. For both playback and capture interrupts should be enabled for I2S<->ACP DMA. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 14 ++ 1 file changed, 6 insertions(+),

[PATCH 1/2] ASoC: AMD: Send correct channel for configuring DMA descriptors

2018-07-16 Thread Akshu Agrawal
Earlier, ch1 was used to define ACP-SYSMEM transfer and ch2 for ACP-I2S transfer. With recent patches ch1 is used to define channel order number 1 and ch2 as channel order number 2. Thus, Playback: ch1:SYSMEM->ACP ch2:ACP->I2S Capture: ch1:I2S->ACP ch1:ACP->SYSMEM Signed-off-by: A

[PATCH 1/2] ASoC: AMD: Send correct channel for configuring DMA descriptors

2018-07-16 Thread Akshu Agrawal
Earlier, ch1 was used to define ACP-SYSMEM transfer and ch2 for ACP-I2S transfer. With recent patches ch1 is used to define channel order number 1 and ch2 as channel order number 2. Thus, Playback: ch1:SYSMEM->ACP ch2:ACP->I2S Capture: ch1:I2S->ACP ch1:ACP->SYSMEM Signed-off-by: A

[v2, 2/2] ASoC: AMD: Configure channel 1 or channel 0 for capture

2018-06-20 Thread Akshu Agrawal
the information to dma driver. Signed-off-by: Akshu Agrawal --- v2: Split acp_dma_cap_channel into 2 functions. sound/soc/amd/acp-da7219-max98357a.c | 43 +++--- sound/soc/amd/acp-pcm-dma.c | 71 +++- sound/soc/amd/acp.h | 4 ++ 3

[v2, 2/2] ASoC: AMD: Configure channel 1 or channel 0 for capture

2018-06-20 Thread Akshu Agrawal
the information to dma driver. Signed-off-by: Akshu Agrawal --- v2: Split acp_dma_cap_channel into 2 functions. sound/soc/amd/acp-da7219-max98357a.c | 43 +++--- sound/soc/amd/acp-pcm-dma.c | 71 +++- sound/soc/amd/acp.h | 4 ++ 3

[PATCH 1/2] ASoC: AMD: Change codec to channel link as per hardware redesign

2018-06-20 Thread Akshu Agrawal
From: "Agrawal, Akshu" This is a correction to match acutal hardware configuration. The hardware configuration looks like: I2S_BT -> SPK(Max) + DMIC(Adau) I2S_SP -> DA7219 Headset No actual products have been shipped with previous configuration. Signed-off-by: Akshu Agrawal --

[PATCH 1/2] ASoC: AMD: Change codec to channel link as per hardware redesign

2018-06-20 Thread Akshu Agrawal
From: "Agrawal, Akshu" This is a correction to match acutal hardware configuration. The hardware configuration looks like: I2S_BT -> SPK(Max) + DMIC(Adau) I2S_SP -> DA7219 Headset No actual products have been shipped with previous configuration. Signed-off-by: Akshu Agrawal --

[v2, 2/2] ASoC: AMD: Configure channel 1 or channel 0 for capture

2018-06-07 Thread Akshu Agrawal
the information to dma driver. Signed-off-by: Akshu Agrawal --- v2: Split acp_dma_cap_channel into 2 functions. This patch is dependent on ASoC: AMD: Change codec to channel link as per hardware redesign https://patchwork.kernel.org/patch/10388099/ sound/soc/amd/acp-da7219-max98357a.c | 43

[v2, 2/2] ASoC: AMD: Configure channel 1 or channel 0 for capture

2018-06-07 Thread Akshu Agrawal
the information to dma driver. Signed-off-by: Akshu Agrawal --- v2: Split acp_dma_cap_channel into 2 functions. This patch is dependent on ASoC: AMD: Change codec to channel link as per hardware redesign https://patchwork.kernel.org/patch/10388099/ sound/soc/amd/acp-da7219-max98357a.c | 43

[PATCH 1/2] ASoC: AMD: Add NULL pointer check

2018-06-07 Thread Akshu Agrawal
Fix crash in those platforms whose machine driver does not expose platform_info. For those platforms we rely on default value and select I2SSP channel. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc

[PATCH 1/2] ASoC: AMD: Add NULL pointer check

2018-06-07 Thread Akshu Agrawal
Fix crash in those platforms whose machine driver does not expose platform_info. For those platforms we rely on default value and select I2SSP channel. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pcm-dma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sound/soc

[PATCH] ASoC: AMD: Configure channel 1 or channel 0 for capture

2018-05-31 Thread Akshu Agrawal
the information to dma driver. Signed-off-by: Akshu Agrawal --- This patch is dependent on ASoC: AMD: Change codec to channel link as per hardware redesign https://patchwork.kernel.org/patch/10388099/ sound/soc/amd/acp-da7219-max98357a.c | 43 +--- sound/soc/amd/acp-pcm-dma.c

[PATCH] ASoC: AMD: Configure channel 1 or channel 0 for capture

2018-05-31 Thread Akshu Agrawal
the information to dma driver. Signed-off-by: Akshu Agrawal --- This patch is dependent on ASoC: AMD: Change codec to channel link as per hardware redesign https://patchwork.kernel.org/patch/10388099/ sound/soc/amd/acp-da7219-max98357a.c | 43 +--- sound/soc/amd/acp-pcm-dma.c

[v2] ASoC: AMD: make channel 1 dma as circular

2018-05-27 Thread Akshu Agrawal
channel 1: SYSMEM<->ACP channel 2: ACP<->I2S Instead of waiting on period interrupt of ch 2 and then starting dma on ch1, we make ch1 dma as circular. This removes dependency of period granularity on hw pointer. Signed-off-by: Akshu Agrawal <akshu.agra...@amd.com> Reviewed-by:

[v2] ASoC: AMD: make channel 1 dma as circular

2018-05-27 Thread Akshu Agrawal
channel 1: SYSMEM<->ACP channel 2: ACP<->I2S Instead of waiting on period interrupt of ch 2 and then starting dma on ch1, we make ch1 dma as circular. This removes dependency of period granularity on hw pointer. Signed-off-by: Akshu Agrawal Reviewed-by: Daniel Kurtz Tested-by:

[PATCH] ASoC: AMD: make channel 1 dma as circular

2018-05-25 Thread Akshu Agrawal
channel 1: SYSMEM<->ACP channel 2: ACP<->I2S Instead of waiting on period interrupt of ch 2 and then starting dma on ch1, we make ch1 dma as circular. This removes dependency of period granularity on hw pointer. Signed-off-by: Akshu Agrawal <akshu.agra...@amd.com> --- sound/soc

[PATCH] ASoC: AMD: make channel 1 dma as circular

2018-05-25 Thread Akshu Agrawal
channel 1: SYSMEM<->ACP channel 2: ACP<->I2S Instead of waiting on period interrupt of ch 2 and then starting dma on ch1, we make ch1 dma as circular. This removes dependency of period granularity on hw pointer. Signed-off-by: Akshu Agrawal --- sound/soc/amd/acp-pc

[PATCH v3 2/2] ACPI: APD: Add AMD misc clock handler support

2018-05-09 Thread Akshu Agrawal
the clock for use of drivers which will connect to it. Signed-off-by: Akshu Agrawal <akshu.agra...@amd.com> --- v2: Submitted with dependent patch, removed unneeded kfree for devm_kzalloc v3: used devm_ioremap and fix coccinelle warning drivers/acpi/acpi_apd.

[PATCH v3 2/2] ACPI: APD: Add AMD misc clock handler support

2018-05-09 Thread Akshu Agrawal
the clock for use of drivers which will connect to it. Signed-off-by: Akshu Agrawal --- v2: Submitted with dependent patch, removed unneeded kfree for devm_kzalloc v3: used devm_ioremap and fix coccinelle warning drivers/acpi/acpi_apd.c | 47 +++ 1 file

[PATCH v5 1/2] clk: x86: Add ST oscout platform clock

2018-05-09 Thread Akshu Agrawal
Stoney SoC provides oscout clock. This clock can support 25Mhz and 48Mhz of frequency. The clock is available for general system use. Signed-off-by: Akshu Agrawal <akshu.agra...@amd.com> --- v2: config change, added SPDX tag and used clk_hw_register_. v3: Fix kbuild warning for checking o

[PATCH v3 0/2] Add support for general system clock on ST AMD platform

2018-05-09 Thread Akshu Agrawal
D misc clock handler support: v2->v3 use devm_ioremap, fix warning Akshu Agrawal (2): clk: x86: Add ST oscout platform clock ACPI: APD: Add AMD misc clock handler support drivers/acpi/acpi_apd.c | 50 drivers/clk/x86/Makefile

  1   2   >