All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Fixes for AMD Stoney ACP audio
@ 2017-11-08 17:24 Alex Deucher
  2017-11-08 17:24 ` [PATCH v2 2/3] ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2 Alex Deucher
       [not found] ` <20171108172404.19118-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 2 replies; 14+ messages in thread
From: Alex Deucher @ 2017-11-08 17:24 UTC (permalink / raw)
  To: amd-gfx, alsa-devel, dri-devel, broonie, Vijendar.Mukunda
  Cc: Alex Deucher, lgirdwood

This patch set is just a couple fixes for the Audio CoProcessor (ACP)
on AMD Stoney platforms and a small general fix for the rt5645
codec driver.

The entire patch set can also be viewed here:
https://cgit.freedesktop.org/~agd5f/linux/log/?h=sound-for-next-stoney2

Thanks!

Alex

v2: - Add a fix for a 64 bit divide in hw_ptr patch
    - rework rt5645 patch as per Mark's comments


Akshu Agrawal (2):
  ASoC: AMD: Make the driver name consistent across files
  ASoC: rt5645: Wait for 400msec before concluding on value of
    RT5645_VENDOR_ID2

Guenter Roeck (1):
  FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma

 sound/soc/amd/Makefile      | 4 ++--
 sound/soc/amd/acp-pcm-dma.c | 9 +++++----
 sound/soc/codecs/rt5645.c   | 9 +++++++++
 3 files changed, 16 insertions(+), 6 deletions(-)

-- 
2.13.6

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 1/3] ASoC: AMD: Make the driver name consistent across files
       [not found] ` <20171108172404.19118-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-11-08 17:24   ` Alex Deucher
  2017-11-08 18:08     ` Mark Brown
  2017-11-08 17:24   ` [PATCH 3/3] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma Alex Deucher
  1 sibling, 1 reply; 14+ messages in thread
From: Alex Deucher @ 2017-11-08 17:24 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, Vijendar.Mukunda-5C7GfCeVMHo
  Cc: tiwai-l3A5Bk7waGM, Alex Deucher,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w, Akshu Agrawal

From: Akshu Agrawal <akshu.agrawal@amd.com>

This fixes the issue of driver not getting auto loaded with
MODULE_ALIAS.
find /sys/devices -name modalias -print0 | xargs -0 grep 'audio'
/sys/devices/pci0000:00/0000:00:01.0/acp_audio_dma.0.auto/modalias:platform:acp_audio_dma

BUG=b:62103837
TEST=boot and check for device in lsmod

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Reviewed-on: https://chromium-review.googlesource.com/678278
Tested-by: Jason Clinton <jclinton@chromium.org>
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 sound/soc/amd/Makefile      | 4 ++--
 sound/soc/amd/acp-pcm-dma.c | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/sound/soc/amd/Makefile b/sound/soc/amd/Makefile
index eed64ff6c73e..f07fd2e2870a 100644
--- a/sound/soc/amd/Makefile
+++ b/sound/soc/amd/Makefile
@@ -1,5 +1,5 @@
-snd-soc-acp-pcm-objs	:= acp-pcm-dma.o
+acp_audio_dma-objs := acp-pcm-dma.o
 snd-soc-acp-rt5645-mach-objs := acp-rt5645.o
 
-obj-$(CONFIG_SND_SOC_AMD_ACP) += snd-soc-acp-pcm.o
+obj-$(CONFIG_SND_SOC_AMD_ACP) += acp_audio_dma.o
 obj-$(CONFIG_SND_SOC_AMD_CZ_RT5645_MACH) += snd-soc-acp-rt5645-mach.o
diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index e19f281afeaa..13d040a4d26f 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -40,6 +40,8 @@
 #define ST_MAX_BUFFER (ST_PLAYBACK_MAX_PERIOD_SIZE * PLAYBACK_MAX_NUM_PERIODS)
 #define ST_MIN_BUFFER ST_MAX_BUFFER
 
+#define DRV_NAME "acp_audio_dma"
+
 static const struct snd_pcm_hardware acp_pcm_hardware_playback = {
 	.info = SNDRV_PCM_INFO_INTERLEAVED |
 		SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP |
@@ -1189,7 +1191,7 @@ static struct platform_driver acp_dma_driver = {
 	.probe = acp_audio_probe,
 	.remove = acp_audio_remove,
 	.driver = {
-		.name = "acp_audio_dma",
+		.name = DRV_NAME,
 		.pm = &acp_pm_ops,
 	},
 };
@@ -1200,4 +1202,4 @@ MODULE_AUTHOR("Vijendar.Mukunda@amd.com");
 MODULE_AUTHOR("Maruthi.Bayyavarapu@amd.com");
 MODULE_DESCRIPTION("AMD ACP PCM Driver");
 MODULE_LICENSE("GPL v2");
-MODULE_ALIAS("platform:acp-dma-audio");
+MODULE_ALIAS("platform:"DRV_NAME);
-- 
2.13.6

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* [PATCH v2 2/3] ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2
  2017-11-08 17:24 [PATCH v2 0/3] Fixes for AMD Stoney ACP audio Alex Deucher
@ 2017-11-08 17:24 ` Alex Deucher
  2017-11-08 18:09   ` Mark Brown
       [not found] ` <20171108172404.19118-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  1 sibling, 1 reply; 14+ messages in thread
From: Alex Deucher @ 2017-11-08 17:24 UTC (permalink / raw)
  To: amd-gfx, alsa-devel, dri-devel, broonie, Vijendar.Mukunda
  Cc: Bard Liao, Alex Deucher, lgirdwood, Akshu Agrawal

From: Akshu Agrawal <akshu.agrawal@amd.com>

Minimum time required between power On of codec and read
of RT5645_VENDOR_ID2 is 400msec. We should wait that long
before reading the value.

TEST=Cold boot the device and check for sound device.

Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---

v2: rework the patch based on mailing list discussion.
    Just wait before reading the register.

 sound/soc/codecs/rt5645.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c
index 23cc2cb8393f..ce5d2c3c6976 100644
--- a/sound/soc/codecs/rt5645.c
+++ b/sound/soc/codecs/rt5645.c
@@ -55,6 +55,8 @@ MODULE_PARM_DESC(quirk, "RT5645 pdata quirk override");
 
 #define RT5645_HWEQ_NUM 57
 
+#define TIME_TO_POWER_MS 400
+
 static const struct regmap_range_cfg rt5645_ranges[] = {
 	{
 		.name = "PR",
@@ -3786,6 +3788,13 @@ static int rt5645_i2c_probe(struct i2c_client *i2c,
 	}
 	regmap_read(regmap, RT5645_VENDOR_ID2, &val);
 
+	/*
+	 * Read after 400msec, as it is the interval required between
+	 * read and power On.
+	 */
+	msleep(TIME_TO_POWER_MS);
+	regmap_read(regmap, RT5645_VENDOR_ID2, &val);
+
 	switch (val) {
 	case RT5645_DEVICE_ID:
 		rt5645->regmap = devm_regmap_init_i2c(i2c, &rt5645_regmap);
-- 
2.13.6

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* [PATCH 3/3] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma
       [not found] ` <20171108172404.19118-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  2017-11-08 17:24   ` [PATCH 1/3] ASoC: AMD: Make the driver name consistent across files Alex Deucher
@ 2017-11-08 17:24   ` Alex Deucher
       [not found]     ` <20171108172404.19118-4-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
  2017-11-08 21:43     ` Applied "ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds" to the asoc tree Mark Brown
  1 sibling, 2 replies; 14+ messages in thread
From: Alex Deucher @ 2017-11-08 17:24 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	broonie-DgEjT+Ai2ygdnm+yROfE0A, Vijendar.Mukunda-5C7GfCeVMHo
  Cc: tiwai-l3A5Bk7waGM, Guenter Roeck, Alex Deucher,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w

From: Guenter Roeck <groeck@chromium.org>

ERROR: "__aeabi_uldivmod" [sound/soc/amd/snd-soc-acp-pcm.ko] undefined!

64-bit divides require special operations to avoid build errors on 32-bit
systems.

BUG=b:63121716
TEST="Build i386:allmodconfig"

Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/678919
Reviewed-by: Jason Clinton <jclinton@chromium.org>
(cherry picked from commit 7ca726e80f21abdbaed9a5a70def1c33a26f8533)
Reviewed-on: https://chromium-review.googlesource.com/681618
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 sound/soc/amd/acp-pcm-dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 13d040a4d26f..ef7e98ad960c 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -856,12 +856,11 @@ static snd_pcm_uframes_t acp_dma_pointer(struct snd_pcm_substream *substream)
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		if (bytescount > rtd->renderbytescount)
 			bytescount = bytescount - rtd->renderbytescount;
-		pos =  bytescount % buffersize;
 	} else {
 		if (bytescount > rtd->capturebytescount)
 			bytescount = bytescount - rtd->capturebytescount;
-		pos = bytescount % buffersize;
 	}
+	pos = do_div(bytescount, buffersize);
 	return bytes_to_frames(runtime, pos);
 }
 
-- 
2.13.6

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH 3/3] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma
       [not found]     ` <20171108172404.19118-4-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-11-08 17:29       ` Guenter Roeck
       [not found]         ` <CABXOdTdgxOFJb0B7VRivFaf1ihfKQWiyXRX9hFnKetTanmjd5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Guenter Roeck @ 2017-11-08 17:29 UTC (permalink / raw)
  To: Alex Deucher
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, tiwai-l3A5Bk7waGM,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW, Alex Deucher,
	broonie-DgEjT+Ai2ygdnm+yROfE0A,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	Vijendar.Mukunda-5C7GfCeVMHo, Guenter Roeck


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

On Wed, Nov 8, 2017 at 9:24 AM, Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:

> From: Guenter Roeck <groeck-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
>
> ERROR: "__aeabi_uldivmod" [sound/soc/amd/snd-soc-acp-pcm.ko] undefined!
>
> 64-bit divides require special operations to avoid build errors on 32-bit
> systems.
>
> BUG=b:63121716
> TEST="Build i386:allmodconfig"
>
>
Is this an upstream submission ? Fine with me, but it should not include
any chromium specific tags, neither in the subject not in the description.

Guenter


> Signed-off-by: Guenter Roeck <groeck-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> Reviewed-on: https://chromium-review.googlesource.com/678919
> Reviewed-by: Jason Clinton <jclinton-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> (cherry picked from commit 7ca726e80f21abdbaed9a5a70def1c33a26f8533)
> Reviewed-on: https://chromium-review.googlesource.com/681618
> Signed-off-by: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>
> ---
>  sound/soc/amd/acp-pcm-dma.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
> index 13d040a4d26f..ef7e98ad960c 100644
> --- a/sound/soc/amd/acp-pcm-dma.c
> +++ b/sound/soc/amd/acp-pcm-dma.c
> @@ -856,12 +856,11 @@ static snd_pcm_uframes_t acp_dma_pointer(struct
> snd_pcm_substream *substream)
>         if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
>                 if (bytescount > rtd->renderbytescount)
>                         bytescount = bytescount - rtd->renderbytescount;
> -               pos =  bytescount % buffersize;
>         } else {
>                 if (bytescount > rtd->capturebytescount)
>                         bytescount = bytescount - rtd->capturebytescount;
> -               pos = bytescount % buffersize;
>         }
> +       pos = do_div(bytescount, buffersize);
>         return bytes_to_frames(runtime, pos);
>  }
>
> --
> 2.13.6
>
>

[-- Attachment #1.2: Type: text/html, Size: 3274 bytes --]

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

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH 3/3] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma
       [not found]         ` <CABXOdTdgxOFJb0B7VRivFaf1ihfKQWiyXRX9hFnKetTanmjd5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2017-11-08 17:42           ` Alex Deucher
  2017-11-08 17:45             ` Alex Deucher
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Deucher @ 2017-11-08 17:42 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Takashi Iwai, Liam Girdwood,
	Maling list - DRI developers, Alex Deucher, Mark Brown,
	amd-gfx list, Vijendar Mukunda, Guenter Roeck

On Wed, Nov 8, 2017 at 12:29 PM, Guenter Roeck <groeck@google.com> wrote:
> On Wed, Nov 8, 2017 at 9:24 AM, Alex Deucher <alexdeucher@gmail.com> wrote:
>>
>> From: Guenter Roeck <groeck@chromium.org>
>>
>> ERROR: "__aeabi_uldivmod" [sound/soc/amd/snd-soc-acp-pcm.ko] undefined!
>>
>> 64-bit divides require special operations to avoid build errors on 32-bit
>> systems.
>>
>> BUG=b:63121716
>> TEST="Build i386:allmodconfig"
>>
>
> Is this an upstream submission ? Fine with me, but it should not include any
> chromium specific tags, neither in the subject not in the description.

I'm not familiar with which are chromium specific (TEST, BUG, FIXUP,
FROMLIST I guess?). The info seems useful to have in the bug, but I
can respin if it's a big deal.

Alex

>
> Guenter
>
>>
>> Signed-off-by: Guenter Roeck <groeck@chromium.org>
>> Reviewed-on: https://chromium-review.googlesource.com/678919
>> Reviewed-by: Jason Clinton <jclinton@chromium.org>
>> (cherry picked from commit 7ca726e80f21abdbaed9a5a70def1c33a26f8533)
>> Reviewed-on: https://chromium-review.googlesource.com/681618
>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>> ---
>>  sound/soc/amd/acp-pcm-dma.c | 3 +--
>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
>> index 13d040a4d26f..ef7e98ad960c 100644
>> --- a/sound/soc/amd/acp-pcm-dma.c
>> +++ b/sound/soc/amd/acp-pcm-dma.c
>> @@ -856,12 +856,11 @@ static snd_pcm_uframes_t acp_dma_pointer(struct
>> snd_pcm_substream *substream)
>>         if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
>>                 if (bytescount > rtd->renderbytescount)
>>                         bytescount = bytescount - rtd->renderbytescount;
>> -               pos =  bytescount % buffersize;
>>         } else {
>>                 if (bytescount > rtd->capturebytescount)
>>                         bytescount = bytescount - rtd->capturebytescount;
>> -               pos = bytescount % buffersize;
>>         }
>> +       pos = do_div(bytescount, buffersize);
>>         return bytes_to_frames(runtime, pos);
>>  }
>>
>> --
>> 2.13.6
>>
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

* Re: [PATCH 3/3] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma
  2017-11-08 17:42           ` Alex Deucher
@ 2017-11-08 17:45             ` Alex Deucher
  2017-11-08 18:00               ` Mark Brown
  0 siblings, 1 reply; 14+ messages in thread
From: Alex Deucher @ 2017-11-08 17:45 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: alsa-devel, Liam Girdwood, Maling list - DRI developers,
	Alex Deucher, Mark Brown, amd-gfx list, Vijendar Mukunda,
	Guenter Roeck

On Wed, Nov 8, 2017 at 12:42 PM, Alex Deucher <alexdeucher@gmail.com> wrote:
> On Wed, Nov 8, 2017 at 12:29 PM, Guenter Roeck <groeck@google.com> wrote:
>> On Wed, Nov 8, 2017 at 9:24 AM, Alex Deucher <alexdeucher@gmail.com> wrote:
>>>
>>> From: Guenter Roeck <groeck@chromium.org>
>>>
>>> ERROR: "__aeabi_uldivmod" [sound/soc/amd/snd-soc-acp-pcm.ko] undefined!
>>>
>>> 64-bit divides require special operations to avoid build errors on 32-bit
>>> systems.
>>>
>>> BUG=b:63121716
>>> TEST="Build i386:allmodconfig"
>>>
>>
>> Is this an upstream submission ? Fine with me, but it should not include any
>> chromium specific tags, neither in the subject not in the description.
>
> I'm not familiar with which are chromium specific (TEST, BUG, FIXUP,
> FROMLIST I guess?). The info seems useful to have in the bug, but I
> can respin if it's a big deal.

s/bug/commit message/

Alex

>
> Alex
>
>>
>> Guenter
>>
>>>
>>> Signed-off-by: Guenter Roeck <groeck@chromium.org>
>>> Reviewed-on: https://chromium-review.googlesource.com/678919
>>> Reviewed-by: Jason Clinton <jclinton@chromium.org>
>>> (cherry picked from commit 7ca726e80f21abdbaed9a5a70def1c33a26f8533)
>>> Reviewed-on: https://chromium-review.googlesource.com/681618
>>> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
>>> ---
>>>  sound/soc/amd/acp-pcm-dma.c | 3 +--
>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
>>> index 13d040a4d26f..ef7e98ad960c 100644
>>> --- a/sound/soc/amd/acp-pcm-dma.c
>>> +++ b/sound/soc/amd/acp-pcm-dma.c
>>> @@ -856,12 +856,11 @@ static snd_pcm_uframes_t acp_dma_pointer(struct
>>> snd_pcm_substream *substream)
>>>         if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
>>>                 if (bytescount > rtd->renderbytescount)
>>>                         bytescount = bytescount - rtd->renderbytescount;
>>> -               pos =  bytescount % buffersize;
>>>         } else {
>>>                 if (bytescount > rtd->capturebytescount)
>>>                         bytescount = bytescount - rtd->capturebytescount;
>>> -               pos = bytescount % buffersize;
>>>         }
>>> +       pos = do_div(bytescount, buffersize);
>>>         return bytes_to_frames(runtime, pos);
>>>  }
>>>
>>> --
>>> 2.13.6
>>>
>>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 3/3] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma
  2017-11-08 17:45             ` Alex Deucher
@ 2017-11-08 18:00               ` Mark Brown
  0 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2017-11-08 18:00 UTC (permalink / raw)
  To: Alex Deucher
  Cc: alsa-devel, Guenter Roeck, Liam Girdwood,
	Maling list - DRI developers, Alex Deucher, amd-gfx list,
	Vijendar Mukunda, Guenter Roeck


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

On Wed, Nov 08, 2017 at 12:45:16PM -0500, Alex Deucher wrote:
> On Wed, Nov 8, 2017 at 12:42 PM, Alex Deucher <alexdeucher@gmail.com> wrote:

> > I'm not familiar with which are chromium specific (TEST, BUG, FIXUP,
> > FROMLIST I guess?). The info seems useful to have in the bug, but I
> > can respin if it's a big deal.

> s/bug/commit message/

All of those are Chrome specific.  If in doubt look at what other people
are using.

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

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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/3] ASoC: AMD: Make the driver name consistent across files
  2017-11-08 17:24   ` [PATCH 1/3] ASoC: AMD: Make the driver name consistent across files Alex Deucher
@ 2017-11-08 18:08     ` Mark Brown
  2017-11-08 18:12       ` Deucher, Alexander
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Brown @ 2017-11-08 18:08 UTC (permalink / raw)
  To: Alex Deucher
  Cc: alsa-devel, tiwai, lgirdwood, dri-devel, Akshu Agrawal, amd-gfx,
	Vijendar.Mukunda, Alex Deucher


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

On Wed, Nov 08, 2017 at 12:24:02PM -0500, Alex Deucher wrote:
> From: Akshu Agrawal <akshu.agrawal@amd.com>
> 
> This fixes the issue of driver not getting auto loaded with
> MODULE_ALIAS.

Please don't resubmit patches that have already been applied, you should
submit patches against current code in the tree you're expecting things
to be applied to.  If any updates are needed to a patch that's already
been applied you should submit incremental patches which make those
updates.  This avoids having to change published git commits which could
cause problems for people working against git.

[-- 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] 14+ messages in thread

* Re: [PATCH v2 2/3] ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2
  2017-11-08 17:24 ` [PATCH v2 2/3] ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2 Alex Deucher
@ 2017-11-08 18:09   ` Mark Brown
       [not found]     ` <20171108180957.ddcdyzu2fschypbx-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Mark Brown @ 2017-11-08 18:09 UTC (permalink / raw)
  To: Alex Deucher
  Cc: alsa-devel, tiwai, lgirdwood, dri-devel, Akshu Agrawal, amd-gfx,
	Vijendar.Mukunda, Alex Deucher, Bard Liao


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

On Wed, Nov 08, 2017 at 12:24:03PM -0500, Alex Deucher wrote:

>  	regmap_read(regmap, RT5645_VENDOR_ID2, &val);
>  
> +	/*
> +	 * Read after 400msec, as it is the interval required between
> +	 * read and power On.
> +	 */
> +	msleep(TIME_TO_POWER_MS);
> +	regmap_read(regmap, RT5645_VENDOR_ID2, &val);
> +

This leaves the original read in there so we've both got the early read
(which might upset things potentially) and the delayed read.  Shouldn't
we just be adding a msleep() before the existing read?

[-- 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] 14+ messages in thread

* RE: [PATCH 1/3] ASoC: AMD: Make the driver name consistent across files
  2017-11-08 18:08     ` Mark Brown
@ 2017-11-08 18:12       ` Deucher, Alexander
  2017-11-08 18:34         ` Mark Brown
  0 siblings, 1 reply; 14+ messages in thread
From: Deucher, Alexander @ 2017-11-08 18:12 UTC (permalink / raw)
  To: 'Mark Brown', Alex Deucher
  Cc: alsa-devel, lgirdwood, dri-devel, Agrawal, Akshu, amd-gfx,
	Mukunda, Vijendar

> -----Original Message-----
> From: Mark Brown [mailto:broonie@kernel.org]
> Sent: Wednesday, November 08, 2017 1:09 PM
> To: Alex Deucher
> Cc: amd-gfx@lists.freedesktop.org; alsa-devel@alsa-project.org; dri-
> devel@lists.freedesktop.org; Mukunda, Vijendar; lgirdwood@gmail.com;
> tiwai@suse.de; Agrawal, Akshu; Deucher, Alexander
> Subject: Re: [PATCH 1/3] ASoC: AMD: Make the driver name consistent
> across files
> 
> On Wed, Nov 08, 2017 at 12:24:02PM -0500, Alex Deucher wrote:
> > From: Akshu Agrawal <akshu.agrawal@amd.com>
> >
> > This fixes the issue of driver not getting auto loaded with
> > MODULE_ALIAS.
> 
> Please don't resubmit patches that have already been applied, you should
> submit patches against current code in the tree you're expecting things
> to be applied to.  If any updates are needed to a patch that's already
> been applied you should submit incremental patches which make those
> updates.  This avoids having to change published git commits which could
> cause problems for people working against git.

This didn't not appear to be in your tree yet and I never got any confirmation it being
applied.  Apologies.

Alex

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/3] ASoC: AMD: Make the driver name consistent across files
  2017-11-08 18:12       ` Deucher, Alexander
@ 2017-11-08 18:34         ` Mark Brown
  0 siblings, 0 replies; 14+ messages in thread
From: Mark Brown @ 2017-11-08 18:34 UTC (permalink / raw)
  To: Deucher, Alexander
  Cc: alsa-devel, lgirdwood, dri-devel, Agrawal, Akshu, amd-gfx,
	Mukunda, Vijendar


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

On Wed, Nov 08, 2017 at 06:12:34PM +0000, Deucher, Alexander wrote:

> This didn't not appear to be in your tree yet and I never got any confirmation it being
> applied.  Apologies.

Ah, sorry - my bad.  This was one that I tried to apply but which didn't
apply.

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

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

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Applied "ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds" to the asoc tree
  2017-11-08 17:24   ` [PATCH 3/3] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma Alex Deucher
       [not found]     ` <20171108172404.19118-4-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
@ 2017-11-08 21:43     ` Mark Brown
  1 sibling, 0 replies; 14+ messages in thread
From: Mark Brown @ 2017-11-08 21:43 UTC (permalink / raw)
  To: Guenter Roeck
  Cc: alsa-devel, lgirdwood, dri-devel, broonie, amd-gfx,
	Vijendar.Mukunda, Alex Deucher

The patch

   ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds

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 7db08b2cb36cbfbcb06c44dc8e48ccb6a119466f Mon Sep 17 00:00:00 2001
From: Guenter Roeck <groeck@chromium.org>
Date: Wed, 8 Nov 2017 16:34:54 -0500
Subject: [PATCH] ASoC: amd: use do_div rather than 64 bit division to fix 32
 bit builds

ERROR: "__aeabi_uldivmod" [sound/soc/amd/snd-soc-acp-pcm.ko] undefined!

64-bit divides require special operations to avoid build errors on 32-bit
systems.

[Reword the commit message to make it clearer - Alex]

fixes: 61add8147942 (ASoC: amd: Report accurate hw_ptr during dma)
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/678919
Reviewed-by: Jason Clinton <jclinton@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/681618
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/amd/acp-pcm-dma.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/sound/soc/amd/acp-pcm-dma.c b/sound/soc/amd/acp-pcm-dma.c
index 13d040a4d26f..ef7e98ad960c 100644
--- a/sound/soc/amd/acp-pcm-dma.c
+++ b/sound/soc/amd/acp-pcm-dma.c
@@ -856,12 +856,11 @@ static snd_pcm_uframes_t acp_dma_pointer(struct snd_pcm_substream *substream)
 	if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) {
 		if (bytescount > rtd->renderbytescount)
 			bytescount = bytescount - rtd->renderbytescount;
-		pos =  bytescount % buffersize;
 	} else {
 		if (bytescount > rtd->capturebytescount)
 			bytescount = bytescount - rtd->capturebytescount;
-		pos = bytescount % buffersize;
 	}
+	pos = do_div(bytescount, buffersize);
 	return bytes_to_frames(runtime, pos);
 }
 
-- 
2.15.0

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2 2/3] ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2
       [not found]     ` <20171108180957.ddcdyzu2fschypbx-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
@ 2017-11-09  9:14       ` Agrawal, Akshu
  0 siblings, 0 replies; 14+ messages in thread
From: Agrawal, Akshu @ 2017-11-09  9:14 UTC (permalink / raw)
  To: Mark Brown, Alex Deucher
  Cc: alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, tiwai-l3A5Bk7waGM,
	lgirdwood-Re5JQEeQqe8AvxtiuMwx3w,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	Vijendar.Mukunda-5C7GfCeVMHo, Alex Deucher, Bard Liao



On 11/8/2017 11:39 PM, Mark Brown wrote:
> On Wed, Nov 08, 2017 at 12:24:03PM -0500, Alex Deucher wrote:
> 
>>   	regmap_read(regmap, RT5645_VENDOR_ID2, &val);
>>   
>> +	/*
>> +	 * Read after 400msec, as it is the interval required between
>> +	 * read and power On.
>> +	 */
>> +	msleep(TIME_TO_POWER_MS);
>> +	regmap_read(regmap, RT5645_VENDOR_ID2, &val);
>> +
> 
> This leaves the original read in there so we've both got the early read
> (which might upset things potentially) and the delayed read.  Shouldn't
> we just be adding a msleep() before the existing read?
> 

My bad, I should have removed the addition of register read from the patch.
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

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

end of thread, other threads:[~2017-11-09  9:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-08 17:24 [PATCH v2 0/3] Fixes for AMD Stoney ACP audio Alex Deucher
2017-11-08 17:24 ` [PATCH v2 2/3] ASoC: rt5645: Wait for 400msec before concluding on value of RT5645_VENDOR_ID2 Alex Deucher
2017-11-08 18:09   ` Mark Brown
     [not found]     ` <20171108180957.ddcdyzu2fschypbx-7j8lgAiuQgnQXOPxS62xeg@public.gmane.org>
2017-11-09  9:14       ` Agrawal, Akshu
     [not found] ` <20171108172404.19118-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-11-08 17:24   ` [PATCH 1/3] ASoC: AMD: Make the driver name consistent across files Alex Deucher
2017-11-08 18:08     ` Mark Brown
2017-11-08 18:12       ` Deucher, Alexander
2017-11-08 18:34         ` Mark Brown
2017-11-08 17:24   ` [PATCH 3/3] FIXUP: FROMLIST: ASoC: amd: Report accurate hw_ptr during dma Alex Deucher
     [not found]     ` <20171108172404.19118-4-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2017-11-08 17:29       ` Guenter Roeck
     [not found]         ` <CABXOdTdgxOFJb0B7VRivFaf1ihfKQWiyXRX9hFnKetTanmjd5w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2017-11-08 17:42           ` Alex Deucher
2017-11-08 17:45             ` Alex Deucher
2017-11-08 18:00               ` Mark Brown
2017-11-08 21:43     ` Applied "ASoC: amd: use do_div rather than 64 bit division to fix 32 bit builds" 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.