All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ASoC: Add gtm601 simple codec
@ 2015-05-06 20:38 ` Marek Belisko
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Belisko @ 2015-05-06 20:38 UTC (permalink / raw)
  To: perex, tiwai
  Cc: broonie, hns, devicetree, linux-kernel, alsa-devel, Marek Belisko

Following patch series add support for gtm601 PCM audio.
gtm601 is UMTS modem which provide I2S interface for rx/tx data.
Codec is connected to cpu in master mode (rate is fixed 8kHz).

changes from v1:
- fix license mismatch
- sort Kconfig and Makefiles additions
- remove misleading comment

Marek Belisko (4):
  ASoC: Add gtm601 codec driver
  Documentation: devicetree: sound: Add documentation for gtm601 codec
  Documentation: vendor-prefixes: Add option prefix
  ARM: dts: omap3-gta04: Add GSM audio support

 Documentation/devicetree/bindings/sound/gtm601.txt | 14 ++++
 .../devicetree/bindings/vendor-prefixes.txt        |  1 +
 arch/arm/boot/dts/omap3-gta04.dtsi                 | 26 ++++++
 sound/soc/codecs/Kconfig                           |  4 +
 sound/soc/codecs/Makefile                          |  2 +
 sound/soc/codecs/gtm601.c                          | 98 ++++++++++++++++++++++
 6 files changed, 145 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/gtm601.txt
 create mode 100644 sound/soc/codecs/gtm601.c

-- 
1.9.1


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

* [PATCH v2 0/4] ASoC: Add gtm601 simple codec
@ 2015-05-06 20:38 ` Marek Belisko
  0 siblings, 0 replies; 10+ messages in thread
From: Marek Belisko @ 2015-05-06 20:38 UTC (permalink / raw)
  To: perex-/Fr2/VpizcU, tiwai-l3A5Bk7waGM
  Cc: broonie-DgEjT+Ai2ygdnm+yROfE0A, hns-xXXSsgcRVICgSpxsJD1C4w,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw, Marek Belisko

Following patch series add support for gtm601 PCM audio.
gtm601 is UMTS modem which provide I2S interface for rx/tx data.
Codec is connected to cpu in master mode (rate is fixed 8kHz).

changes from v1:
- fix license mismatch
- sort Kconfig and Makefiles additions
- remove misleading comment

Marek Belisko (4):
  ASoC: Add gtm601 codec driver
  Documentation: devicetree: sound: Add documentation for gtm601 codec
  Documentation: vendor-prefixes: Add option prefix
  ARM: dts: omap3-gta04: Add GSM audio support

 Documentation/devicetree/bindings/sound/gtm601.txt | 14 ++++
 .../devicetree/bindings/vendor-prefixes.txt        |  1 +
 arch/arm/boot/dts/omap3-gta04.dtsi                 | 26 ++++++
 sound/soc/codecs/Kconfig                           |  4 +
 sound/soc/codecs/Makefile                          |  2 +
 sound/soc/codecs/gtm601.c                          | 98 ++++++++++++++++++++++
 6 files changed, 145 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/gtm601.txt
 create mode 100644 sound/soc/codecs/gtm601.c

-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH v2 1/4] ASoC: Add gtm601 codec driver
  2015-05-06 20:38 ` Marek Belisko
  (?)
@ 2015-05-06 20:38 ` Marek Belisko
  2015-05-07 18:50   ` Mark Brown
  -1 siblings, 1 reply; 10+ messages in thread
From: Marek Belisko @ 2015-05-06 20:38 UTC (permalink / raw)
  To: perex, tiwai
  Cc: broonie, hns, devicetree, linux-kernel, alsa-devel, Marek Belisko

This driver add PCM interface to a GTM601 UMTS modem chip.
There is no configuration interface.

Signed-off-by: Marek Belisko <marek@goldelico.com>
---
 sound/soc/codecs/Kconfig  |  4 ++
 sound/soc/codecs/Makefile |  2 +
 sound/soc/codecs/gtm601.c | 98 +++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 104 insertions(+)
 create mode 100644 sound/soc/codecs/gtm601.c

diff --git a/sound/soc/codecs/Kconfig b/sound/soc/codecs/Kconfig
index 061c465..d3a0fa8 100644
--- a/sound/soc/codecs/Kconfig
+++ b/sound/soc/codecs/Kconfig
@@ -62,6 +62,7 @@ config SND_SOC_ALL_CODECS
 	select SND_SOC_BT_SCO
 	select SND_SOC_ES8328_SPI if SPI_MASTER
 	select SND_SOC_ES8328_I2C if I2C
+	select SND_SOC_GTM601
 	select SND_SOC_ISABELLE if I2C
 	select SND_SOC_JZ4740_CODEC
 	select SND_SOC_LM4857 if I2C
@@ -444,6 +445,9 @@ config SND_SOC_ES8328_SPI
 	tristate
 	select SND_SOC_ES8328
 
+config SND_SOC_GTM601
+	tristate 'GTM601 UMTS modem audio codec'
+
 config SND_SOC_ISABELLE
         tristate
 
diff --git a/sound/soc/codecs/Makefile b/sound/soc/codecs/Makefile
index abe2d7e..1fbfbee 100644
--- a/sound/soc/codecs/Makefile
+++ b/sound/soc/codecs/Makefile
@@ -55,6 +55,7 @@ snd-soc-dmic-objs := dmic.o
 snd-soc-es8328-objs := es8328.o
 snd-soc-es8328-i2c-objs := es8328-i2c.o
 snd-soc-es8328-spi-objs := es8328-spi.o
+snd-soc-gtm601-objs := gtm601.o
 snd-soc-isabelle-objs := isabelle.o
 snd-soc-jz4740-codec-objs := jz4740.o
 snd-soc-l3-objs := l3.o
@@ -240,6 +241,7 @@ obj-$(CONFIG_SND_SOC_DMIC)	+= snd-soc-dmic.o
 obj-$(CONFIG_SND_SOC_ES8328)	+= snd-soc-es8328.o
 obj-$(CONFIG_SND_SOC_ES8328_I2C)+= snd-soc-es8328-i2c.o
 obj-$(CONFIG_SND_SOC_ES8328_SPI)+= snd-soc-es8328-spi.o
+obj-$(CONFIG_SND_SOC_GTM601)    += snd-soc-gtm601.o
 obj-$(CONFIG_SND_SOC_ISABELLE)	+= snd-soc-isabelle.o
 obj-$(CONFIG_SND_SOC_JZ4740_CODEC)	+= snd-soc-jz4740-codec.o
 obj-$(CONFIG_SND_SOC_L3)	+= snd-soc-l3.o
diff --git a/sound/soc/codecs/gtm601.c b/sound/soc/codecs/gtm601.c
new file mode 100644
index 0000000..1b77ff2
--- /dev/null
+++ b/sound/soc/codecs/gtm601.c
@@ -0,0 +1,98 @@
+/*
+ * This is a simple driver for the GTM601 Voice PCM interface
+ *
+ * Copyright (C) 2015 Goldelico GmbH
+ *
+ * Author: Marek Belisko <marek@goldelico.com>
+ *
+ * Based on wm8727.c driver
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/init.h>
+#include <linux/slab.h>
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/device.h>
+#include <sound/core.h>
+#include <sound/pcm.h>
+#include <sound/ac97_codec.h>
+#include <sound/initval.h>
+#include <sound/soc.h>
+
+static const struct snd_soc_dapm_widget gtm601_dapm_widgets[] = {
+	SND_SOC_DAPM_OUTPUT("AOUT"),
+	SND_SOC_DAPM_INPUT("AIN"),
+};
+
+static const struct snd_soc_dapm_route gtm601_dapm_routes[] = {
+	{ "AOUT", NULL, "Playback" },
+	{ "Capture", NULL, "AIN" },
+};
+
+struct snd_soc_dai_driver gtm601_dai = {
+	.name = "gtm601",
+	.playback = {
+		.stream_name = "Playback",
+		.channels_min = 1,
+		.channels_max = 1,
+		.rates = SNDRV_PCM_RATE_8000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE,
+		},
+	.capture = {
+		.stream_name = "Capture",
+		.channels_min = 1,
+		.channels_max = 1,
+		.rates = SNDRV_PCM_RATE_8000,
+		.formats = SNDRV_PCM_FMTBIT_S16_LE,
+	},
+};
+
+static struct snd_soc_codec_driver soc_codec_dev_gtm601 = {
+	.dapm_widgets = gtm601_dapm_widgets,
+	.num_dapm_widgets = ARRAY_SIZE(gtm601_dapm_widgets),
+	.dapm_routes = gtm601_dapm_routes,
+	.num_dapm_routes = ARRAY_SIZE(gtm601_dapm_routes),
+};
+
+static int gtm601_platform_probe(struct platform_device *pdev)
+{
+	return snd_soc_register_codec(&pdev->dev,
+			&soc_codec_dev_gtm601, &gtm601_dai, 1);
+}
+
+static int gtm601_platform_remove(struct platform_device *pdev)
+{
+	snd_soc_unregister_codec(&pdev->dev);
+	return 0;
+}
+
+MODULE_ALIAS("platform:gtm601_codec_audio");
+
+#if defined(CONFIG_OF)
+static const struct of_device_id gtm601_codec_of_match[] = {
+	{ .compatible = "option,gtm601", },
+	{},
+};
+MODULE_DEVICE_TABLE(of, gtm601_codec_of_match);
+#endif
+
+static struct platform_driver gtm601_codec_driver = {
+	.driver = {
+			.name = "gtm601",
+			.owner = THIS_MODULE,
+			.of_match_table = of_match_ptr(gtm601_codec_of_match),
+	},
+
+	.probe = gtm601_platform_probe,
+	.remove = gtm601_platform_remove,
+};
+
+module_platform_driver(gtm601_codec_driver);
+
+MODULE_DESCRIPTION("ASoC gtm601 driver");
+MODULE_AUTHOR("Marek Belisko <marek@goldelico.com>");
+MODULE_LICENSE("GPL");
-- 
1.9.1


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

* [PATCH v2 2/4] Documentation: devicetree: sound: Add documentation for gtm601 codec
  2015-05-06 20:38 ` Marek Belisko
  (?)
  (?)
@ 2015-05-06 20:38 ` Marek Belisko
  2015-05-07 18:45     ` Mark Brown
  -1 siblings, 1 reply; 10+ messages in thread
From: Marek Belisko @ 2015-05-06 20:38 UTC (permalink / raw)
  To: perex, tiwai
  Cc: broonie, hns, devicetree, linux-kernel, alsa-devel, Marek Belisko

Add small documentation for gtm601 UMTS modem audio interface.

Signed-off-by: Marek Belisko <marek@goldelico.com>
---
 Documentation/devicetree/bindings/sound/gtm601.txt | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/sound/gtm601.txt

diff --git a/Documentation/devicetree/bindings/sound/gtm601.txt b/Documentation/devicetree/bindings/sound/gtm601.txt
new file mode 100644
index 0000000..2d2dbfc
--- /dev/null
+++ b/Documentation/devicetree/bindings/sound/gtm601.txt
@@ -0,0 +1,14 @@
+GTM601 UMTS modem audio interface CODEC
+
+This device has no configuration interface. Sample rate is fixed - 8kHz.
+
+Required properties:
+
+  - compatible : "option,gtm601"
+
+Example:
+
+codec: gtm601_codec {
+	compatible = "option,gtm601";
+};
-- 
1.9.1


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

* [PATCH v2 3/4] Documentation: vendor-prefixes: Add option prefix
  2015-05-06 20:38 ` Marek Belisko
                   ` (2 preceding siblings ...)
  (?)
@ 2015-05-06 20:38 ` Marek Belisko
  -1 siblings, 0 replies; 10+ messages in thread
From: Marek Belisko @ 2015-05-06 20:38 UTC (permalink / raw)
  To: perex, tiwai
  Cc: broonie, hns, devicetree, linux-kernel, alsa-devel, Marek Belisko

Add option to vendor-prefixes file which will be used for Option NV company.

Signed-off-by: Marek Belisko <marek@goldelico.com>
---
 Documentation/devicetree/bindings/vendor-prefixes.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt
index b6682ab..ed3bd55 100644
--- a/Documentation/devicetree/bindings/vendor-prefixes.txt
+++ b/Documentation/devicetree/bindings/vendor-prefixes.txt
@@ -142,6 +142,7 @@ nvidia	NVIDIA
 nxp	NXP Semiconductors
 onnn	ON Semiconductor Corp.
 opencores	OpenCores.org
+option	Option NV
 ortustech	Ortus Technology Co., Ltd.
 ovti	OmniVision Technologies
 panasonic	Panasonic Corporation
-- 
1.9.1


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

* [PATCH v2 4/4] ARM: dts: omap3-gta04: Add GSM audio support
  2015-05-06 20:38 ` Marek Belisko
                   ` (3 preceding siblings ...)
  (?)
@ 2015-05-06 20:38 ` Marek Belisko
  -1 siblings, 0 replies; 10+ messages in thread
From: Marek Belisko @ 2015-05-06 20:38 UTC (permalink / raw)
  To: perex, tiwai
  Cc: broonie, hns, devicetree, linux-kernel, alsa-devel, Marek Belisko

Add voice audio card which is used for telephony on gta04 board.
gtm601 codec is UMTS modem with pcm interface which get samples from
microphone and provide data from other party side. Used simple audio card
to describe audio card.

Signed-off-by: Marek Belisko <marek@goldelico.com>

---
 arch/arm/boot/dts/omap3-gta04.dtsi | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/arch/arm/boot/dts/omap3-gta04.dtsi b/arch/arm/boot/dts/omap3-gta04.dtsi
index b9f6881..a3a4156 100644
--- a/arch/arm/boot/dts/omap3-gta04.dtsi
+++ b/arch/arm/boot/dts/omap3-gta04.dtsi
@@ -48,6 +48,28 @@
 		ti,mcbsp = <&mcbsp2>;
 	};
 
+	 /* GSM audio */
+	sound_telephony {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "GTA04 voice";
+		simple-audio-card,bitclock-master = <&telephony_link_master>;
+		simple-audio-card,frame-master = <&telephony_link_master>;
+		simple-audio-card,format = "i2s";
+
+		simple-audio-card,cpu {
+			sound-dai = <&mcbsp4>;
+		};
+
+		telephony_link_master: simple-audio-card,codec {
+			sound-dai = <&gtm601_codec>;
+		};
+	};
+
+	gtm601_codec: gsm_codec {
+		compatible = "option,gtm601";
+		#sound-dai-cells = <0>;
+	};
+
 	spi_lcd {
 		compatible = "spi-gpio";
 		#address-cells = <0x1>;
@@ -517,3 +539,7 @@
 &mcbsp2 {
 	status = "okay";
 };
+
+&mcbsp4 {
+	status = "okay";
+};
-- 
1.9.1


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

* Re: [PATCH v2 2/4] Documentation: devicetree: sound: Add documentation for gtm601 codec
@ 2015-05-07 18:45     ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2015-05-07 18:45 UTC (permalink / raw)
  To: Marek Belisko; +Cc: perex, tiwai, hns, devicetree, linux-kernel, alsa-devel

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

On Wed, May 06, 2015 at 10:38:48PM +0200, Marek Belisko wrote:
> Add small documentation for gtm601 UMTS modem audio interface.

git am complains that this patch is corrupt so I can't apply it.  Please
also use subject lines reflecting the style for the subsystem.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH v2 2/4] Documentation: devicetree: sound: Add documentation for gtm601 codec
@ 2015-05-07 18:45     ` Mark Brown
  0 siblings, 0 replies; 10+ messages in thread
From: Mark Brown @ 2015-05-07 18:45 UTC (permalink / raw)
  To: Marek Belisko
  Cc: perex-/Fr2/VpizcU, tiwai-l3A5Bk7waGM, hns-xXXSsgcRVICgSpxsJD1C4w,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw

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

On Wed, May 06, 2015 at 10:38:48PM +0200, Marek Belisko wrote:
> Add small documentation for gtm601 UMTS modem audio interface.

git am complains that this patch is corrupt so I can't apply it.  Please
also use subject lines reflecting the style for the subsystem.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH v2 1/4] ASoC: Add gtm601 codec driver
  2015-05-06 20:38 ` [PATCH v2 1/4] ASoC: Add gtm601 codec driver Marek Belisko
@ 2015-05-07 18:50   ` Mark Brown
  2015-05-07 18:57     ` Belisko Marek
  0 siblings, 1 reply; 10+ messages in thread
From: Mark Brown @ 2015-05-07 18:50 UTC (permalink / raw)
  To: Marek Belisko; +Cc: perex, tiwai, hns, devicetree, linux-kernel, alsa-devel

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

On Wed, May 06, 2015 at 10:38:47PM +0200, Marek Belisko wrote:
> This driver add PCM interface to a GTM601 UMTS modem chip.
> There is no configuration interface.

Applied, thanks.  Please remember to CC maintainers on patches, you've
missed Liam for some reason.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

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

* Re: [PATCH v2 1/4] ASoC: Add gtm601 codec driver
  2015-05-07 18:50   ` Mark Brown
@ 2015-05-07 18:57     ` Belisko Marek
  0 siblings, 0 replies; 10+ messages in thread
From: Belisko Marek @ 2015-05-07 18:57 UTC (permalink / raw)
  To: Mark Brown
  Cc: perex, tiwai, Dr. H. Nikolaus Schaller, devicetree, LKML, alsa-devel

On Thu, May 7, 2015 at 8:50 PM, Mark Brown <broonie@kernel.org> wrote:
> On Wed, May 06, 2015 at 10:38:47PM +0200, Marek Belisko wrote:
>> This driver add PCM interface to a GTM601 UMTS modem chip.
>> There is no configuration interface.
>
> Applied, thanks.  Please remember to CC maintainers on patches, you've
> missed Liam for some reason.
OK thanks. I'll fix Documentation patches and post them to correct maintainers.

BR,

marek

-- 
as simple and primitive as possible
-------------------------------------------------
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com

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

end of thread, other threads:[~2015-05-07 18:58 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-06 20:38 [PATCH v2 0/4] ASoC: Add gtm601 simple codec Marek Belisko
2015-05-06 20:38 ` Marek Belisko
2015-05-06 20:38 ` [PATCH v2 1/4] ASoC: Add gtm601 codec driver Marek Belisko
2015-05-07 18:50   ` Mark Brown
2015-05-07 18:57     ` Belisko Marek
2015-05-06 20:38 ` [PATCH v2 2/4] Documentation: devicetree: sound: Add documentation for gtm601 codec Marek Belisko
2015-05-07 18:45   ` Mark Brown
2015-05-07 18:45     ` Mark Brown
2015-05-06 20:38 ` [PATCH v2 3/4] Documentation: vendor-prefixes: Add option prefix Marek Belisko
2015-05-06 20:38 ` [PATCH v2 4/4] ARM: dts: omap3-gta04: Add GSM audio support Marek Belisko

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.