All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture
@ 2018-03-12  9:11 Akshu Agrawal
  2018-03-12  9:11 ` [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework Akshu Agrawal
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Akshu Agrawal @ 2018-03-12  9:11 UTC (permalink / raw)
  To: broonie, alsa-devel; +Cc: tiwai, lgirdwood, akshu.agrawal

BT I2S is a bi-directional dai, we will use the same
cpu dai for playback and capture.

TEST=Build, apply grunt_mixer_settings:
iotools mmio_write32 0xfed80e40 0x040c40c0
iotools mmio_write32 0xfed80e28 0x10000
aplay -D hw:0,0 -vv <file>
arecord -D hw:0,0 -f dat -d 5 -vv <file>

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
---
 sound/soc/amd/acp-da7219-max98357a.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
index bbe0f10..d07c2a1 100644
--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -124,8 +124,8 @@ static int cz_fe_startup(struct snd_pcm_substream *substream)
 
 static struct snd_soc_dai_link cz_dai_7219_98357[] = {
 	{
-		.name = "amd-da7219-play",
-		.stream_name = "Playback",
+		.name = "amd-da7219-play-cap",
+		.stream_name = "Playback and Capture",
 		.platform_name = "acp_audio_dma.0.auto",
 		.cpu_dai_name = "designware-i2s.3.auto",
 		.codec_dai_name = "da7219-hifi",
@@ -134,16 +134,6 @@ static int cz_fe_startup(struct snd_pcm_substream *substream)
 				| SND_SOC_DAIFMT_CBM_CFM,
 		.init = cz_da7219_init,
 		.dpcm_playback = 1,
-	},
-	{
-		.name = "amd-da7219-cap",
-		.stream_name = "Capture",
-		.platform_name = "acp_audio_dma.0.auto",
-		.cpu_dai_name = "designware-i2s.4.auto",
-		.codec_dai_name = "da7219-hifi",
-		.codec_name = "i2c-DLGS7219:00",
-		.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
-				| SND_SOC_DAIFMT_CBM_CFM,
 		.dpcm_capture = 1,
 		.ops = &cz_da7219_cap_ops,
 	},
-- 
1.9.1

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

* [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework
  2018-03-12  9:11 [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture Akshu Agrawal
@ 2018-03-12  9:11 ` Akshu Agrawal
  2018-03-13  0:32   ` kbuild test robot
                     ` (3 more replies)
  2018-03-12 17:01 ` [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture Mark Brown
  2018-03-20  1:21 ` Applied "ASoC: amd: Use single dai for da7219 playback and capture" to the asoc tree Mark Brown
  2 siblings, 4 replies; 12+ messages in thread
From: Akshu Agrawal @ 2018-03-12  9:11 UTC (permalink / raw)
  To: broonie, alsa-devel; +Cc: tiwai, lgirdwood, akshu.agrawal

DA7219 is clock master for other codecs. DA7219 has exposed clock
control by using common clock framework and same is used to enable
and disable clock for all codecs in the system.

TEST=Build, apply grunt_mixer_settings:
iotools mmio_write32 0xfed80e40 0x040c40c0
iotools mmio_write32 0xfed80e28 0x10000
aplay -D hw:0,0 -vv <file>
arecord -D hw:0,0 -f dat -d 5 -vv <file>
aplay -D hw:0,1 -vv <file>

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
---
 sound/soc/amd/acp-da7219-max98357a.c | 41 ++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
index d07c2a1..1441be3 100644
--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -42,6 +42,7 @@
 #define DUAL_CHANNEL		2
 
 static struct snd_soc_jack cz_jack;
+struct clk *da7219_dai_clk;
 
 static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
 {
@@ -66,6 +67,8 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
 		return ret;
 	}
 
+	da7219_dai_clk = clk_get(codec->dev, "da7219-dai-clks");
+
 	ret = snd_soc_card_jack_new(card, "Headset Jack",
 				SND_JACK_HEADPHONE | SND_JACK_MICROPHONE |
 				SND_JACK_BTN_0 | SND_JACK_BTN_1 |
@@ -81,6 +84,30 @@ static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
 	return 0;
 }
 
+static int cz_da7219_hw_params(struct snd_pcm_substream *substream,
+			     struct snd_pcm_hw_params *params)
+{
+	int ret = 0;
+	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+
+	ret = clk_prepare_enable(da7219_dai_clk);
+	if (ret < 0) {
+		dev_err(rtd->dev, "can't enable master clock %d\n", ret);
+		return ret;
+	}
+
+	return ret;
+}
+
+static int cz_da7219_hw_free(struct snd_pcm_substream *substream)
+{
+	int ret = 0;
+
+	clk_disable_unprepare(da7219_dai_clk);
+
+	return ret;
+}
+
 static const unsigned int channels[] = {
 	DUAL_CHANNEL,
 };
@@ -119,9 +146,21 @@ static int cz_fe_startup(struct snd_pcm_substream *substream)
 }
 
 static struct snd_soc_ops cz_da7219_cap_ops = {
+	.hw_params = cz_da7219_hw_params,
+	.hw_free = cz_da7219_hw_free,
 	.startup = cz_fe_startup,
 };
 
+static struct snd_soc_ops cz_max_play_ops = {
+	.hw_params = cz_da7219_hw_params,
+	.hw_free = cz_da7219_hw_free,
+};
+
+static struct snd_soc_ops cz_dmic_cap_ops = {
+	.hw_params = cz_da7219_hw_params,
+	.hw_free = cz_da7219_hw_free,
+};
+
 static struct snd_soc_dai_link cz_dai_7219_98357[] = {
 	{
 		.name = "amd-da7219-play-cap",
@@ -147,6 +186,7 @@ static int cz_fe_startup(struct snd_pcm_substream *substream)
 		.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
 				| SND_SOC_DAIFMT_CBM_CFM,
 		.dpcm_playback = 1,
+		.ops = &cz_max_play_ops,
 	},
 	{
 		.name = "dmic",
@@ -158,6 +198,7 @@ static int cz_fe_startup(struct snd_pcm_substream *substream)
 		.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
 				| SND_SOC_DAIFMT_CBM_CFM,
 		.dpcm_capture = 1,
+		.ops = &cz_dmic_cap_ops,
 	},
 };
 
-- 
1.9.1

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

* Re: [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture
  2018-03-12  9:11 [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture Akshu Agrawal
  2018-03-12  9:11 ` [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework Akshu Agrawal
@ 2018-03-12 17:01 ` Mark Brown
  2018-03-13  4:26   ` Agrawal, Akshu
  2018-03-20  1:21 ` Applied "ASoC: amd: Use single dai for da7219 playback and capture" to the asoc tree Mark Brown
  2 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2018-03-12 17:01 UTC (permalink / raw)
  To: Akshu Agrawal; +Cc: tiwai, alsa-devel, lgirdwood


[-- Attachment #1.1: Type: text/plain, Size: 715 bytes --]

On Mon, Mar 12, 2018 at 02:41:22PM +0530, Akshu Agrawal wrote:
> BT I2S is a bi-directional dai, we will use the same
> cpu dai for playback and capture.
> 
> TEST=Build, apply grunt_mixer_settings:
> iotools mmio_write32 0xfed80e40 0x040c40c0
> iotools mmio_write32 0xfed80e28 0x10000
> aplay -D hw:0,0 -vv <file>
> arecord -D hw:0,0 -f dat -d 5 -vv <file>

These reproduction instructions don't make much sense outside of your
test environment (how is anyone supposed to know what
grunt_mixer_settings is?).  I'm also rather worried about the random
magic numbers you're using with this iowrite tool - what do they do?  It
sounds like this driver might not work at all without some missing
bit...

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework
  2018-03-12  9:11 ` [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework Akshu Agrawal
@ 2018-03-13  0:32   ` kbuild test robot
  2018-03-13  4:37   ` kbuild test robot
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2018-03-13  0:32 UTC (permalink / raw)
  Cc: alsa-devel, tiwai, lgirdwood, akshu.agrawal, broonie, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4479 bytes --]

Hi Akshu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180309]
[cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2 v4.16-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Akshu-Agrawal/ASoC-AMD-Use-single-dai-for-da7219-playback-and-capture/20180313-035239
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=sh 

All errors (new ones prefixed by >>):

   sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_da7219_init':
>> sound/soc/amd/acp-da7219-max98357a.c:70:19: error: implicit declaration of function 'clk_get'; did you mean 'key_get'? [-Werror=implicit-function-declaration]
     da7219_dai_clk = clk_get(codec->dev, "da7219-dai-clks");
                      ^~~~~~~
                      key_get
>> sound/soc/amd/acp-da7219-max98357a.c:70:27: error: 'codec' undeclared (first use in this function); did you mean 'cdev'?
     da7219_dai_clk = clk_get(codec->dev, "da7219-dai-clks");
                              ^~~~~
                              cdev
   sound/soc/amd/acp-da7219-max98357a.c:70:27: note: each undeclared identifier is reported only once for each function it appears in
   sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_da7219_hw_params':
>> sound/soc/amd/acp-da7219-max98357a.c:93:8: error: implicit declaration of function 'clk_prepare_enable'; did you mean 'preempt_enable'? [-Werror=implicit-function-declaration]
     ret = clk_prepare_enable(da7219_dai_clk);
           ^~~~~~~~~~~~~~~~~~
           preempt_enable
   sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_da7219_hw_free':
>> sound/soc/amd/acp-da7219-max98357a.c:106:2: error: implicit declaration of function 'clk_disable_unprepare'; did you mean 'acpi_disable_gpe'? [-Werror=implicit-function-declaration]
     clk_disable_unprepare(da7219_dai_clk);
     ^~~~~~~~~~~~~~~~~~~~~
     acpi_disable_gpe
   cc1: some warnings being treated as errors

vim +70 sound/soc/amd/acp-da7219-max98357a.c

    46	
    47	static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
    48	{
    49		int ret;
    50		struct snd_soc_card *card = rtd->card;
    51		struct snd_soc_dai *codec_dai = rtd->codec_dai;
    52		struct snd_soc_component *component = codec_dai->component;
    53	
    54		dev_info(rtd->dev, "codec dai name = %s\n", codec_dai->name);
    55	
    56		ret = snd_soc_dai_set_sysclk(codec_dai, DA7219_CLKSRC_MCLK,
    57					     CZ_PLAT_CLK, SND_SOC_CLOCK_IN);
    58		if (ret < 0) {
    59			dev_err(rtd->dev, "can't set codec sysclk: %d\n", ret);
    60			return ret;
    61		}
    62	
    63		ret = snd_soc_dai_set_pll(codec_dai, 0, DA7219_SYSCLK_PLL,
    64					  CZ_PLAT_CLK, MCLK_RATE);
    65		if (ret < 0) {
    66			dev_err(rtd->dev, "can't set codec pll: %d\n", ret);
    67			return ret;
    68		}
    69	
  > 70		da7219_dai_clk = clk_get(codec->dev, "da7219-dai-clks");
    71	
    72		ret = snd_soc_card_jack_new(card, "Headset Jack",
    73					SND_JACK_HEADPHONE | SND_JACK_MICROPHONE |
    74					SND_JACK_BTN_0 | SND_JACK_BTN_1 |
    75					SND_JACK_BTN_2 | SND_JACK_BTN_3,
    76					&cz_jack, NULL, 0);
    77		if (ret) {
    78			dev_err(card->dev, "HP jack creation failed %d\n", ret);
    79			return ret;
    80		}
    81	
    82		da7219_aad_jack_det(component, &cz_jack);
    83	
    84		return 0;
    85	}
    86	
    87	static int cz_da7219_hw_params(struct snd_pcm_substream *substream,
    88				     struct snd_pcm_hw_params *params)
    89	{
    90		int ret = 0;
    91		struct snd_soc_pcm_runtime *rtd = substream->private_data;
    92	
  > 93		ret = clk_prepare_enable(da7219_dai_clk);
    94		if (ret < 0) {
    95			dev_err(rtd->dev, "can't enable master clock %d\n", ret);
    96			return ret;
    97		}
    98	
    99		return ret;
   100	}
   101	
   102	static int cz_da7219_hw_free(struct snd_pcm_substream *substream)
   103	{
   104		int ret = 0;
   105	
 > 106		clk_disable_unprepare(da7219_dai_clk);
   107	
   108		return ret;
   109	}
   110	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 47686 bytes --]

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* Re: [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture
  2018-03-12 17:01 ` [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture Mark Brown
@ 2018-03-13  4:26   ` Agrawal, Akshu
  0 siblings, 0 replies; 12+ messages in thread
From: Agrawal, Akshu @ 2018-03-13  4:26 UTC (permalink / raw)
  To: Mark Brown; +Cc: tiwai, alsa-devel, lgirdwood



On 3/12/2018 10:31 PM, Mark Brown wrote:
> On Mon, Mar 12, 2018 at 02:41:22PM +0530, Akshu Agrawal wrote:
>> BT I2S is a bi-directional dai, we will use the same
>> cpu dai for playback and capture.
>>
>> TEST=Build, apply grunt_mixer_settings:
>> iotools mmio_write32 0xfed80e40 0x040c40c0
>> iotools mmio_write32 0xfed80e28 0x10000
>> aplay -D hw:0,0 -vv <file>
>> arecord -D hw:0,0 -f dat -d 5 -vv <file>
> 
> These reproduction instructions don't make much sense outside of your
> test environment (how is anyone supposed to know what
> grunt_mixer_settings is?).  I'm also rather worried about the random
> magic numbers you're using with this iowrite tool - what do they do?  It
> sounds like this driver might not work at all without some missing
> bit...
> 
write instructions are actually setting up the oscillator. These are 
being done in coreboot and patch is being pushed for same.
I will remove these noise from TEST field and submit again.

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

* Re: [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework
  2018-03-12  9:11 ` [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework Akshu Agrawal
  2018-03-13  0:32   ` kbuild test robot
@ 2018-03-13  4:37   ` kbuild test robot
  2018-03-13  4:37   ` [PATCH] ASoC: AMD: fix returnvar.cocci warnings kbuild test robot
  2018-03-13 11:03   ` [RFC PATCH] ASoC: AMD: da7219_dai_clk can be static kbuild test robot
  3 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2018-03-13  4:37 UTC (permalink / raw)
  Cc: alsa-devel, tiwai, lgirdwood, akshu.agrawal, broonie, kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4534 bytes --]

Hi Akshu,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on next-20180309]
[cannot apply to v4.16-rc4 v4.16-rc3 v4.16-rc2 v4.16-rc5]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Akshu-Agrawal/ASoC-AMD-Use-single-dai-for-da7219-playback-and-capture/20180313-035239
config: i386-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-1) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_da7219_init':
   sound/soc/amd/acp-da7219-max98357a.c:70:19: error: implicit declaration of function 'clk_get'; did you mean 'key_get'? [-Werror=implicit-function-declaration]
     da7219_dai_clk = clk_get(codec->dev, "da7219-dai-clks");
                      ^~~~~~~
                      key_get
   sound/soc/amd/acp-da7219-max98357a.c:70:27: error: 'codec' undeclared (first use in this function); did you mean 'cdev'?
     da7219_dai_clk = clk_get(codec->dev, "da7219-dai-clks");
                              ^~~~~
                              cdev
   sound/soc/amd/acp-da7219-max98357a.c:70:27: note: each undeclared identifier is reported only once for each function it appears in
   sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_da7219_hw_params':
>> sound/soc/amd/acp-da7219-max98357a.c:93:8: error: implicit declaration of function 'clk_prepare_enable'; did you mean 'acpi_pci_irq_enable'? [-Werror=implicit-function-declaration]
     ret = clk_prepare_enable(da7219_dai_clk);
           ^~~~~~~~~~~~~~~~~~
           acpi_pci_irq_enable
   sound/soc/amd/acp-da7219-max98357a.c: In function 'cz_da7219_hw_free':
   sound/soc/amd/acp-da7219-max98357a.c:106:2: error: implicit declaration of function 'clk_disable_unprepare'; did you mean 'acpi_disable_gpe'? [-Werror=implicit-function-declaration]
     clk_disable_unprepare(da7219_dai_clk);
     ^~~~~~~~~~~~~~~~~~~~~
     acpi_disable_gpe
   cc1: some warnings being treated as errors

coccinelle warnings: (new ones prefixed by >>)

>> sound/soc/amd/acp-da7219-max98357a.c:104:5-8: Unneeded variable: "ret". Return "0" on line 108

Please review and possibly fold the followup patch.

vim +93 sound/soc/amd/acp-da7219-max98357a.c

    46	
    47	static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
    48	{
    49		int ret;
    50		struct snd_soc_card *card = rtd->card;
    51		struct snd_soc_dai *codec_dai = rtd->codec_dai;
    52		struct snd_soc_component *component = codec_dai->component;
    53	
    54		dev_info(rtd->dev, "codec dai name = %s\n", codec_dai->name);
    55	
    56		ret = snd_soc_dai_set_sysclk(codec_dai, DA7219_CLKSRC_MCLK,
    57					     CZ_PLAT_CLK, SND_SOC_CLOCK_IN);
    58		if (ret < 0) {
    59			dev_err(rtd->dev, "can't set codec sysclk: %d\n", ret);
    60			return ret;
    61		}
    62	
    63		ret = snd_soc_dai_set_pll(codec_dai, 0, DA7219_SYSCLK_PLL,
    64					  CZ_PLAT_CLK, MCLK_RATE);
    65		if (ret < 0) {
    66			dev_err(rtd->dev, "can't set codec pll: %d\n", ret);
    67			return ret;
    68		}
    69	
  > 70		da7219_dai_clk = clk_get(codec->dev, "da7219-dai-clks");
    71	
    72		ret = snd_soc_card_jack_new(card, "Headset Jack",
    73					SND_JACK_HEADPHONE | SND_JACK_MICROPHONE |
    74					SND_JACK_BTN_0 | SND_JACK_BTN_1 |
    75					SND_JACK_BTN_2 | SND_JACK_BTN_3,
    76					&cz_jack, NULL, 0);
    77		if (ret) {
    78			dev_err(card->dev, "HP jack creation failed %d\n", ret);
    79			return ret;
    80		}
    81	
    82		da7219_aad_jack_det(component, &cz_jack);
    83	
    84		return 0;
    85	}
    86	
    87	static int cz_da7219_hw_params(struct snd_pcm_substream *substream,
    88				     struct snd_pcm_hw_params *params)
    89	{
    90		int ret = 0;
    91		struct snd_soc_pcm_runtime *rtd = substream->private_data;
    92	
  > 93		ret = clk_prepare_enable(da7219_dai_clk);
    94		if (ret < 0) {
    95			dev_err(rtd->dev, "can't enable master clock %d\n", ret);
    96			return ret;
    97		}
    98	
    99		return ret;
   100	}
   101	
   102	static int cz_da7219_hw_free(struct snd_pcm_substream *substream)
   103	{
 > 104		int ret = 0;
   105	
   106		clk_disable_unprepare(da7219_dai_clk);
   107	
 > 108		return ret;
   109	}
   110	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 62927 bytes --]

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



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

* [PATCH] ASoC: AMD: fix returnvar.cocci warnings
  2018-03-12  9:11 ` [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework Akshu Agrawal
  2018-03-13  0:32   ` kbuild test robot
  2018-03-13  4:37   ` kbuild test robot
@ 2018-03-13  4:37   ` kbuild test robot
  2018-03-13 11:03   ` [RFC PATCH] ASoC: AMD: da7219_dai_clk can be static kbuild test robot
  3 siblings, 0 replies; 12+ messages in thread
From: kbuild test robot @ 2018-03-13  4:37 UTC (permalink / raw)
  Cc: alsa-devel, tiwai, lgirdwood, akshu.agrawal, broonie, kbuild-all

From: Fengguang Wu <fengguang.wu@intel.com>

sound/soc/amd/acp-da7219-max98357a.c:104:5-8: Unneeded variable: "ret". Return "0" on line 108


 Remove unneeded variable used to store return value.

Generated by: scripts/coccinelle/misc/returnvar.cocci

Fixes: 7d03b3824d27 ("ASoC: AMD: Enable da7219 master clock using common clock framework")
CC: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---

Please take the patch only if it's a positive warning. Thanks!

 acp-da7219-max98357a.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -101,11 +101,9 @@ static int cz_da7219_hw_params(struct sn
 
 static int cz_da7219_hw_free(struct snd_pcm_substream *substream)
 {
-	int ret = 0;
-
 	clk_disable_unprepare(da7219_dai_clk);
 
-	return ret;
+	return 0;
 }
 
 static const unsigned int channels[] = {

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

* [RFC PATCH] ASoC: AMD: da7219_dai_clk can be static
  2018-03-12  9:11 ` [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework Akshu Agrawal
                     ` (2 preceding siblings ...)
  2018-03-13  4:37   ` [PATCH] ASoC: AMD: fix returnvar.cocci warnings kbuild test robot
@ 2018-03-13 11:03   ` kbuild test robot
  2018-04-16 17:15     ` Applied "ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static" to the asoc tree Mark Brown
                       ` (2 more replies)
  3 siblings, 3 replies; 12+ messages in thread
From: kbuild test robot @ 2018-03-13 11:03 UTC (permalink / raw)
  Cc: alsa-devel, tiwai, lgirdwood, akshu.agrawal, broonie, kbuild-all


Fixes: 7d03b3824d27 ("ASoC: AMD: Enable da7219 master clock using common clock framework")
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
 acp-da7219-max98357a.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
index 1441be3..d6e7420 100644
--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -42,7 +42,7 @@
 #define DUAL_CHANNEL		2
 
 static struct snd_soc_jack cz_jack;
-struct clk *da7219_dai_clk;
+static struct clk *da7219_dai_clk;
 
 static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
 {

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

* Applied "ASoC: amd: Use single dai for da7219 playback and capture" to the asoc tree
  2018-03-12  9:11 [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture Akshu Agrawal
  2018-03-12  9:11 ` [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework Akshu Agrawal
  2018-03-12 17:01 ` [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture Mark Brown
@ 2018-03-20  1:21 ` Mark Brown
  2 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2018-03-20  1:21 UTC (permalink / raw)
  Cc: tiwai, alsa-devel, broonie, lgirdwood, akshu.agrawal

The patch

   ASoC: amd: Use single dai for da7219 playback and capture

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From f155181d23608acd3fb46d0d6b1507b68ffa436b Mon Sep 17 00:00:00 2001
From: Akshu Agrawal <akshu.agrawal@amd.com>
Date: Mon, 19 Mar 2018 11:07:41 +0530
Subject: [PATCH] ASoC: amd: Use single dai for da7219 playback and capture

BT I2S is a bi-directional dai, we will use the same
cpu dai for playback and capture.

TEST=aplay -D hw:0,0 -vv <file>
arecord -D hw:0,0 -f dat -d 5 -vv <file>

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/amd/acp-da7219-max98357a.c | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
index bbe0f103e6a8..d07c2a1d5d9e 100644
--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -124,8 +124,8 @@ static struct snd_soc_ops cz_da7219_cap_ops = {
 
 static struct snd_soc_dai_link cz_dai_7219_98357[] = {
 	{
-		.name = "amd-da7219-play",
-		.stream_name = "Playback",
+		.name = "amd-da7219-play-cap",
+		.stream_name = "Playback and Capture",
 		.platform_name = "acp_audio_dma.0.auto",
 		.cpu_dai_name = "designware-i2s.3.auto",
 		.codec_dai_name = "da7219-hifi",
@@ -134,16 +134,6 @@ static struct snd_soc_dai_link cz_dai_7219_98357[] = {
 				| SND_SOC_DAIFMT_CBM_CFM,
 		.init = cz_da7219_init,
 		.dpcm_playback = 1,
-	},
-	{
-		.name = "amd-da7219-cap",
-		.stream_name = "Capture",
-		.platform_name = "acp_audio_dma.0.auto",
-		.cpu_dai_name = "designware-i2s.4.auto",
-		.codec_dai_name = "da7219-hifi",
-		.codec_name = "i2c-DLGS7219:00",
-		.dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
-				| SND_SOC_DAIFMT_CBM_CFM,
 		.dpcm_capture = 1,
 		.ops = &cz_da7219_cap_ops,
 	},
-- 
2.16.2

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

* Applied "ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static" to the asoc tree
  2018-03-13 11:03   ` [RFC PATCH] ASoC: AMD: da7219_dai_clk can be static kbuild test robot
@ 2018-04-16 17:15     ` Mark Brown
  2018-04-16 17:15     ` Mark Brown
  2018-04-26 11:51     ` Mark Brown
  2 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2018-04-16 17:15 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: alsa-devel, tiwai, lgirdwood, akshu.agrawal, broonie, kbuild-all

The patch

   ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From dc29f581fa9d5567c3a01ecfdd7f16b2e613c7fb Mon Sep 17 00:00:00 2001
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Thu, 29 Mar 2018 02:14:03 +0000
Subject: [PATCH] ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk
 static

Fixes the following sparse warning:

sound/soc/amd/acp-da7219-max98357a.c:46:12: warning:
 symbol 'da7219_dai_clk' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/amd/acp-da7219-max98357a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
index b205c782e494..f41560ecbcd1 100644
--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -43,7 +43,7 @@
 #define DUAL_CHANNEL		2
 
 static struct snd_soc_jack cz_jack;
-struct clk *da7219_dai_clk;
+static struct clk *da7219_dai_clk;
 
 static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
 {
-- 
2.17.0

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

* Applied "ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static" to the asoc tree
  2018-03-13 11:03   ` [RFC PATCH] ASoC: AMD: da7219_dai_clk can be static kbuild test robot
  2018-04-16 17:15     ` Applied "ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static" to the asoc tree Mark Brown
@ 2018-04-16 17:15     ` Mark Brown
  2018-04-26 11:51     ` Mark Brown
  2 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2018-04-16 17:15 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: alsa-devel, tiwai, lgirdwood, akshu.agrawal, broonie, kbuild-all

The patch

   ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From ede1d3534f589d69b381e8509f3d01ec1e23c804 Mon Sep 17 00:00:00 2001
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Thu, 29 Mar 2018 02:14:03 +0000
Subject: [PATCH] ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk
 static

Fixes the following sparse warning:

sound/soc/amd/acp-da7219-max98357a.c:46:12: warning:
 symbol 'da7219_dai_clk' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/amd/acp-da7219-max98357a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
index d281c227d64c..215b06bf2039 100644
--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -44,7 +44,7 @@
 #define DUAL_CHANNEL		2
 
 static struct snd_soc_jack cz_jack;
-struct clk *da7219_dai_clk;
+static struct clk *da7219_dai_clk;
 
 static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
 {
-- 
2.17.0

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

* Applied "ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static" to the asoc tree
  2018-03-13 11:03   ` [RFC PATCH] ASoC: AMD: da7219_dai_clk can be static kbuild test robot
  2018-04-16 17:15     ` Applied "ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static" to the asoc tree Mark Brown
  2018-04-16 17:15     ` Mark Brown
@ 2018-04-26 11:51     ` Mark Brown
  2 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2018-04-26 11:51 UTC (permalink / raw)
  To: Wei Yongjun
  Cc: alsa-devel, tiwai, lgirdwood, akshu.agrawal, broonie, kbuild-all

The patch

   ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

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

>From dc29f581fa9d5567c3a01ecfdd7f16b2e613c7fb Mon Sep 17 00:00:00 2001
From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Thu, 29 Mar 2018 02:14:03 +0000
Subject: [PATCH] ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk
 static

Fixes the following sparse warning:

sound/soc/amd/acp-da7219-max98357a.c:46:12: warning:
 symbol 'da7219_dai_clk' was not declared. Should it be static?

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/amd/acp-da7219-max98357a.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/amd/acp-da7219-max98357a.c b/sound/soc/amd/acp-da7219-max98357a.c
index b205c782e494..f41560ecbcd1 100644
--- a/sound/soc/amd/acp-da7219-max98357a.c
+++ b/sound/soc/amd/acp-da7219-max98357a.c
@@ -43,7 +43,7 @@
 #define DUAL_CHANNEL		2
 
 static struct snd_soc_jack cz_jack;
-struct clk *da7219_dai_clk;
+static struct clk *da7219_dai_clk;
 
 static int cz_da7219_init(struct snd_soc_pcm_runtime *rtd)
 {
-- 
2.17.0

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

end of thread, other threads:[~2018-04-26 11:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12  9:11 [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture Akshu Agrawal
2018-03-12  9:11 ` [PATCH 2/2] ASoC: AMD: Enable da7219 master clock using common clock framework Akshu Agrawal
2018-03-13  0:32   ` kbuild test robot
2018-03-13  4:37   ` kbuild test robot
2018-03-13  4:37   ` [PATCH] ASoC: AMD: fix returnvar.cocci warnings kbuild test robot
2018-03-13 11:03   ` [RFC PATCH] ASoC: AMD: da7219_dai_clk can be static kbuild test robot
2018-04-16 17:15     ` Applied "ASoC: amd: acp-da7219-max98357: Make symbol da7219_dai_clk static" to the asoc tree Mark Brown
2018-04-16 17:15     ` Mark Brown
2018-04-26 11:51     ` Mark Brown
2018-03-12 17:01 ` [PATCH 1/2] ASoC: AMD: Use single dai for da7219 playback and capture Mark Brown
2018-03-13  4:26   ` Agrawal, Akshu
2018-03-20  1:21 ` Applied "ASoC: amd: Use single dai for da7219 playback and capture" to the asoc tree Mark Brown

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.