* Re: [PATCH v2 1/3] ASoC: zx: Add ZTE zx296702 pcm support
[not found] <1430915885-30656-1-git-send-email-jun.nie@linaro.org>
@ 2015-05-18 8:04 ` Jun Nie
2015-05-21 20:04 ` Mark Brown
2015-05-22 12:07 ` Mark Brown
` (2 subsequent siblings)
3 siblings, 1 reply; 9+ messages in thread
From: Jun Nie @ 2015-05-18 8:04 UTC (permalink / raw)
To: Mark Brown, Liam Girdwood
Cc: alsa-devel, Shawn Guo, wan.zhijun, Jun Nie, ZTE-LT Mailman List
2015-05-06 20:38 GMT+08:00 Jun Nie <jun.nie@linaro.org>:
> This patch adds zx296702 ASoC DMA audio support. It
> handle audio dma based on soc-dmaengine
>
Mark,
Do you have any comments on this patch set? Or you suggest to add HDMI
API calling in the same serial patch? For the HDMI calling, I have no
good idea except direct call currently. Because I need dts hook to
audio driver, while no HDMI call back data can be shared from video
side to audio side in this independent initialization case.
Jun
> Signed-off-by: Jun Nie <jun.nie@linaro.org>
> ---
> sound/soc/Kconfig | 1 +
> sound/soc/Makefile | 1 +
> sound/soc/zte/Kconfig | 8 ++++++++
> sound/soc/zte/Makefile | 1 +
> sound/soc/zte/zx296702-pcm.c | 46 ++++++++++++++++++++++++++++++++++++++++++++
> sound/soc/zte/zx296702-pcm.h | 6 ++++++
> 6 files changed, 63 insertions(+)
> create mode 100644 sound/soc/zte/Kconfig
> create mode 100644 sound/soc/zte/Makefile
> create mode 100644 sound/soc/zte/zx296702-pcm.c
> create mode 100644 sound/soc/zte/zx296702-pcm.h
>
> diff --git a/sound/soc/Kconfig b/sound/soc/Kconfig
> index 3ba52da..e2828e1 100644
> --- a/sound/soc/Kconfig
> +++ b/sound/soc/Kconfig
> @@ -57,6 +57,7 @@ source "sound/soc/tegra/Kconfig"
> source "sound/soc/txx9/Kconfig"
> source "sound/soc/ux500/Kconfig"
> source "sound/soc/xtensa/Kconfig"
> +source "sound/soc/zte/Kconfig"
>
> # Supported codecs
> source "sound/soc/codecs/Kconfig"
> diff --git a/sound/soc/Makefile b/sound/soc/Makefile
> index 974ba70..57bf32d 100644
> --- a/sound/soc/Makefile
> +++ b/sound/soc/Makefile
> @@ -38,3 +38,4 @@ obj-$(CONFIG_SND_SOC) += tegra/
> obj-$(CONFIG_SND_SOC) += txx9/
> obj-$(CONFIG_SND_SOC) += ux500/
> obj-$(CONFIG_SND_SOC) += xtensa/
> +obj-$(CONFIG_SND_SOC) += zte/
> diff --git a/sound/soc/zte/Kconfig b/sound/soc/zte/Kconfig
> new file mode 100644
> index 0000000..392ffa6
> --- /dev/null
> +++ b/sound/soc/zte/Kconfig
> @@ -0,0 +1,8 @@
> +config SND_SOC_ZX296702
> + tristate "SoC Audio for the ZX296702 System-on-Chip"
> + depends on SOC_ZX296702 || COMPILE_TEST
> + depends on COMMON_CLK
> + select SND_SOC_GENERIC_DMAENGINE_PCM
> + help
> + Say Y or M here if you want support for SoC audio on ZX296702
> + chip.
> diff --git a/sound/soc/zte/Makefile b/sound/soc/zte/Makefile
> new file mode 100644
> index 0000000..f2a6af8
> --- /dev/null
> +++ b/sound/soc/zte/Makefile
> @@ -0,0 +1 @@
> +obj-$(CONFIG_SND_SOC_ZX296702) += zx296702-pcm.o
> diff --git a/sound/soc/zte/zx296702-pcm.c b/sound/soc/zte/zx296702-pcm.c
> new file mode 100644
> index 0000000..6e1a61a
> --- /dev/null
> +++ b/sound/soc/zte/zx296702-pcm.c
> @@ -0,0 +1,46 @@
> +/*
> + * Copyright (C) 2015 Linaro
> + *
> + * Author: Jun Nie <jun.nie@linaro.org>
> + *
> + * License terms: GNU General Public License (GPL) version 2
> + */
> +
> +#include <linux/device.h>
> +#include <linux/init.h>
> +#include <linux/module.h>
> +#include <sound/core.h>
> +#include <sound/pcm.h>
> +#include <sound/soc.h>
> +#include <sound/dmaengine_pcm.h>
> +
> +#include "zx296702-pcm.h"
> +
> +static const struct snd_pcm_hardware snd_zx_hardware = {
> + .info = SNDRV_PCM_INFO_MMAP |
> + SNDRV_PCM_INFO_MMAP_VALID |
> + SNDRV_PCM_INFO_INTERLEAVED |
> + SNDRV_PCM_INFO_PAUSE |
> + SNDRV_PCM_INFO_RESUME |
> + SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
> + .period_bytes_min = 32,
> + .period_bytes_max = 16 * 1024,
> + .periods_min = 2,
> + .periods_max = 32,
> + .buffer_bytes_max = 64 * 1024,
> +};
> +
> +static const struct snd_dmaengine_pcm_config zx_dmaengine_pcm_config = {
> + .prepare_slave_config = snd_dmaengine_pcm_prepare_slave_config,
> + .pcm_hardware = &snd_zx_hardware,
> + .prealloc_buffer_size = 64 * 1024,
> +};
> +
> +int zx_pcm_platform_register(struct device *dev)
> +{
> + return devm_snd_dmaengine_pcm_register(dev, &zx_dmaengine_pcm_config,
> + 0);
> +}
> +EXPORT_SYMBOL_GPL(zx_pcm_platform_register);
> +
> +MODULE_LICENSE("GPL");
> diff --git a/sound/soc/zte/zx296702-pcm.h b/sound/soc/zte/zx296702-pcm.h
> new file mode 100644
> index 0000000..4809a38
> --- /dev/null
> +++ b/sound/soc/zte/zx296702-pcm.h
> @@ -0,0 +1,6 @@
> +#ifndef _ZX_PCM_H
> +#define _ZX_PCM_H
> +
> +int zx_pcm_platform_register(struct device *dev);
> +
> +#endif
> --
> 1.9.1
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] ASoC: zx: Add ZTE zx296702 pcm support
2015-05-18 8:04 ` [PATCH v2 1/3] ASoC: zx: Add ZTE zx296702 pcm support Jun Nie
@ 2015-05-21 20:04 ` Mark Brown
2015-05-22 1:08 ` Jun Nie
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2015-05-21 20:04 UTC (permalink / raw)
To: Jun Nie
Cc: alsa-devel, Shawn Guo, wan.zhijun, Liam Girdwood, ZTE-LT Mailman List
[-- Attachment #1.1: Type: text/plain, Size: 646 bytes --]
On Mon, May 18, 2015 at 04:04:30PM +0800, Jun Nie wrote:
> 2015-05-06 20:38 GMT+08:00 Jun Nie <jun.nie@linaro.org>:
> Do you have any comments on this patch set? Or you suggest to add HDMI
Please don't send pings, they just add to the mail volume.
> API calling in the same serial patch? For the HDMI calling, I have no
> good idea except direct call currently. Because I need dts hook to
> audio driver, while no HDMI call back data can be shared from video
> side to audio side in this independent initialization case.
My previous suggestion was to have a CODEC driver for the HDMI IP - I'm
not sure why that would require a "direct call"?
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] ASoC: zx: Add ZTE zx296702 pcm support
2015-05-21 20:04 ` Mark Brown
@ 2015-05-22 1:08 ` Jun Nie
2015-05-22 11:35 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Jun Nie @ 2015-05-22 1:08 UTC (permalink / raw)
To: Mark Brown
Cc: alsa-devel, Shawn Guo, wan.zhijun, Liam Girdwood, ZTE-LT Mailman List
2015-05-22 4:04 GMT+08:00 Mark Brown <broonie@kernel.org>:
> On Mon, May 18, 2015 at 04:04:30PM +0800, Jun Nie wrote:
>> 2015-05-06 20:38 GMT+08:00 Jun Nie <jun.nie@linaro.org>:
>
>> Do you have any comments on this patch set? Or you suggest to add HDMI
>
> Please don't send pings, they just add to the mail volume.
>
>> API calling in the same serial patch? For the HDMI calling, I have no
>> good idea except direct call currently. Because I need dts hook to
>> audio driver, while no HDMI call back data can be shared from video
>> side to audio side in this independent initialization case.
>
> My previous suggestion was to have a CODEC driver for the HDMI IP - I'm
> not sure why that would require a "direct call"?
I mean I have to direct call HDMI API in HDMI codec driver, is that acceptable?
Jun
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] ASoC: zx: Add ZTE zx296702 pcm support
2015-05-22 1:08 ` Jun Nie
@ 2015-05-22 11:35 ` Mark Brown
2015-05-23 14:41 ` Jun Nie
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2015-05-22 11:35 UTC (permalink / raw)
To: Jun Nie
Cc: alsa-devel, Shawn Guo, wan.zhijun, Liam Girdwood, ZTE-LT Mailman List
[-- Attachment #1.1: Type: text/plain, Size: 450 bytes --]
On Fri, May 22, 2015 at 09:08:51AM +0800, Jun Nie wrote:
> 2015-05-22 4:04 GMT+08:00 Mark Brown <broonie@kernel.org>:
> > My previous suggestion was to have a CODEC driver for the HDMI IP - I'm
> > not sure why that would require a "direct call"?
> I mean I have to direct call HDMI API in HDMI codec driver, is that acceptable?
I don't know what you mean when you talk about "direct call HDMI API" -
what is the HDMI API to which you refer here?
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] ASoC: zx: Add ZTE zx296702 pcm support
[not found] <1430915885-30656-1-git-send-email-jun.nie@linaro.org>
2015-05-18 8:04 ` [PATCH v2 1/3] ASoC: zx: Add ZTE zx296702 pcm support Jun Nie
@ 2015-05-22 12:07 ` Mark Brown
[not found] ` <1430915885-30656-2-git-send-email-jun.nie@linaro.org>
[not found] ` <1430915885-30656-3-git-send-email-jun.nie@linaro.org>
3 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2015-05-22 12:07 UTC (permalink / raw)
To: Jun Nie; +Cc: alsa-devel, shawn.guo, wan.zhijun, lgirdwood, zte-lt
[-- Attachment #1.1: Type: text/plain, Size: 706 bytes --]
On Wed, May 06, 2015 at 08:38:03PM +0800, Jun Nie wrote:
> +static const struct snd_pcm_hardware snd_zx_hardware = {
> + .info = SNDRV_PCM_INFO_MMAP |
> + SNDRV_PCM_INFO_MMAP_VALID |
> + SNDRV_PCM_INFO_INTERLEAVED |
> + SNDRV_PCM_INFO_PAUSE |
> + SNDRV_PCM_INFO_RESUME |
> + SNDRV_PCM_INFO_NO_PERIOD_WAKEUP,
> + .period_bytes_min = 32,
> + .period_bytes_max = 16 * 1024,
> + .periods_min = 2,
> + .periods_max = 32,
> + .buffer_bytes_max = 64 * 1024,
> +};
As I said last time I'm not sure why you are manually defining these -
the capabilities of the DMA controller should be being enumerated from
the DMA controller driver. See dmaengine_pcm_set_runtime_hwparams().
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 2/3] ASoC: zx: Add zx296702 SPDIF support
[not found] ` <1430915885-30656-2-git-send-email-jun.nie@linaro.org>
@ 2015-05-22 12:09 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2015-05-22 12:09 UTC (permalink / raw)
To: Jun Nie; +Cc: alsa-devel, shawn.guo, wan.zhijun, lgirdwood, zte-lt
[-- Attachment #1.1: Type: text/plain, Size: 262 bytes --]
On Wed, May 06, 2015 at 08:38:04PM +0800, Jun Nie wrote:
> Add driver for zx296702 SPDIF controller
This all seems fine apart from the fact that you're adding a new DT
binding with no binding documentation - all new DT binndings require
binnding documentation.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] dt: Add documentation for the ZTE SPDIF controller
[not found] ` <1430915885-30656-3-git-send-email-jun.nie@linaro.org>
@ 2015-05-22 12:10 ` Mark Brown
2015-05-23 14:04 ` Jun Nie
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2015-05-22 12:10 UTC (permalink / raw)
To: Jun Nie; +Cc: alsa-devel, shawn.guo, wan.zhijun, lgirdwood, zte-lt
[-- Attachment #1.1: Type: text/plain, Size: 309 bytes --]
On Wed, May 06, 2015 at 08:38:05PM +0800, Jun Nie wrote:
> This patch adds the devicetree documentation for the ZTE
> zx296702 SPDIF audio controller.
...and here it is! Sorry - the DT binding is normally before the code
in the patch series. This is fine, it's just patch 1 that needs to be
resolved then.
[-- Attachment #1.2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
[-- Attachment #2: Type: text/plain, Size: 0 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 3/3] dt: Add documentation for the ZTE SPDIF controller
2015-05-22 12:10 ` [PATCH v2 3/3] dt: Add documentation for the ZTE SPDIF controller Mark Brown
@ 2015-05-23 14:04 ` Jun Nie
0 siblings, 0 replies; 9+ messages in thread
From: Jun Nie @ 2015-05-23 14:04 UTC (permalink / raw)
To: Mark Brown
Cc: alsa-devel, Shawn Guo, wan.zhijun, Liam Girdwood, ZTE-LT Mailman List
2015-05-22 20:10 GMT+08:00 Mark Brown <broonie@kernel.org>:
> On Wed, May 06, 2015 at 08:38:05PM +0800, Jun Nie wrote:
>> This patch adds the devicetree documentation for the ZTE
>> zx296702 SPDIF audio controller.
>
> ...and here it is! Sorry - the DT binding is normally before the code
> in the patch series. This is fine, it's just patch 1 that needs to be
> resolved then.
Learn another community execution rule. I will add dts doc before code
next time :)
Jun
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v2 1/3] ASoC: zx: Add ZTE zx296702 pcm support
2015-05-22 11:35 ` Mark Brown
@ 2015-05-23 14:41 ` Jun Nie
0 siblings, 0 replies; 9+ messages in thread
From: Jun Nie @ 2015-05-23 14:41 UTC (permalink / raw)
To: Mark Brown
Cc: alsa-devel, Shawn Guo, wan.zhijun, Liam Girdwood, ZTE-LT Mailman List
2015-05-22 19:35 GMT+08:00 Mark Brown <broonie@kernel.org>:
> On Fri, May 22, 2015 at 09:08:51AM +0800, Jun Nie wrote:
>> 2015-05-22 4:04 GMT+08:00 Mark Brown <broonie@kernel.org>:
>
>> > My previous suggestion was to have a CODEC driver for the HDMI IP - I'm
>> > not sure why that would require a "direct call"?
>
>> I mean I have to direct call HDMI API in HDMI codec driver, is that acceptable?
>
> I don't know what you mean when you talk about "direct call HDMI API" -
> what is the HDMI API to which you refer here?
Sorry for confusing you. I mean HDMI function in video part. I have to
call ZTE specific HDMI function from ASoC codec driver.
Jun
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2015-05-23 14:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1430915885-30656-1-git-send-email-jun.nie@linaro.org>
2015-05-18 8:04 ` [PATCH v2 1/3] ASoC: zx: Add ZTE zx296702 pcm support Jun Nie
2015-05-21 20:04 ` Mark Brown
2015-05-22 1:08 ` Jun Nie
2015-05-22 11:35 ` Mark Brown
2015-05-23 14:41 ` Jun Nie
2015-05-22 12:07 ` Mark Brown
[not found] ` <1430915885-30656-2-git-send-email-jun.nie@linaro.org>
2015-05-22 12:09 ` [PATCH v2 2/3] ASoC: zx: Add zx296702 SPDIF support Mark Brown
[not found] ` <1430915885-30656-3-git-send-email-jun.nie@linaro.org>
2015-05-22 12:10 ` [PATCH v2 3/3] dt: Add documentation for the ZTE SPDIF controller Mark Brown
2015-05-23 14:04 ` Jun Nie
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.