diff for duplicates of <20100515153131.221491641@mandriva.com> diff --git a/a/1.txt b/N1/1.txt index c92f968..2d7660c 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -1,164 +1,3 @@ -This patch is adding support for openrd client platforms. It's using -the cs42l51 codec and has one mic and one speaker plugs. - -Signed-off-by: Arnaud Patard <apatard@mandriva.com> - -Index: sound-2.6/sound/soc/orion/Kconfig -=================================================================== ---- sound-2.6.orig/sound/soc/orion/Kconfig 2010-05-15 17:06:16.890586343 +0200 -+++ sound-2.6/sound/soc/orion/Kconfig 2010-05-15 17:07:30.990586832 +0200 -@@ -9,3 +9,12 @@ config SND_ORION_SOC - config SND_ORION_SOC_I2S - tristate - -+config SND_KIRKWOOD_SOC_OPENRD -+ tristate "SoC Audio support for Kirkwood Openrd Client" -+ depends on SND_ORION_SOC && MACH_OPENRD_CLIENT -+ select SND_ORION_SOC_I2S -+ select SND_SOC_CS42L51 -+ help -+ Say Y if you want to add support for SoC audio on -+ Openrd Client. -+ -Index: sound-2.6/sound/soc/orion/Makefile -=================================================================== ---- sound-2.6.orig/sound/soc/orion/Makefile 2010-05-15 17:06:16.962086209 +0200 -+++ sound-2.6/sound/soc/orion/Makefile 2010-05-15 17:07:31.006586283 +0200 -@@ -4,3 +4,6 @@ snd-soc-orion-i2s-objs := orion-i2s.o - obj-$(CONFIG_SND_ORION_SOC) += snd-soc-orion.o - obj-$(CONFIG_SND_ORION_SOC_I2S) += snd-soc-orion-i2s.o - -+snd-soc-openrd-objs := kirkwood-openrd.o -+ -+obj-$(CONFIG_SND_KIRKWOOD_SOC_OPENRD) += snd-soc-openrd.o -Index: sound-2.6/sound/soc/orion/kirkwood-openrd.c -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ sound-2.6/sound/soc/orion/kirkwood-openrd.c 2010-05-15 17:07:31.046586004 +0200 -@@ -0,0 +1,126 @@ -+/* -+ * kirkwood-openrd.c -+ * -+ * (c) 2010 Arnaud Patard <apatard@mandriva.com> -+ * -+ * This program is free software; you can redistribute it and/or modify it -+ * under the terms of the GNU General Public License as published by the -+ * Free Software Foundation; either version 2 of the License, or (at your -+ * option) any later version. -+ */ -+ -+#include <linux/module.h> -+#include <linux/moduleparam.h> -+#include <linux/interrupt.h> -+#include <linux/platform_device.h> -+#include <linux/slab.h> -+#include <sound/soc.h> -+#include <mach/kirkwood.h> -+#include <plat/audio.h> -+#include <asm/mach-types.h> -+#include "orion-i2s.h" -+#include "orion-dma.h" -+#include "../codecs/cs42l51.h" -+ -+static int openrd_client_hw_params(struct snd_pcm_substream *substream, -+ struct snd_pcm_hw_params *params) -+{ -+ struct snd_soc_pcm_runtime *rtd = substream->private_data; -+ struct snd_soc_dai *codec_dai = rtd->dai->codec_dai; -+ struct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai; -+ int ret; -+ unsigned int freq, fmt; -+ -+ fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM; -+ ret = snd_soc_dai_set_fmt(cpu_dai, fmt); -+ if (ret < 0) -+ return ret; -+ -+ ret = snd_soc_dai_set_fmt(codec_dai, fmt); -+ if (ret < 0) -+ return ret; -+ -+ switch (params_rate(params)) { -+ default: -+ case 44100: -+ freq = 11289600; -+ break; -+ case 48000: -+ freq = 12288000; -+ break; -+ case 96000: -+ freq = 24576000; -+ break; -+ } -+ -+ return snd_soc_dai_set_sysclk(codec_dai, 0, freq, SND_SOC_CLOCK_IN); -+ -+} -+ -+static struct snd_soc_ops openrd_client_ops = { -+ .hw_params = openrd_client_hw_params, -+}; -+ -+ -+static struct snd_soc_dai_link openrd_client_dai[] = { -+{ -+ .name = "CS42L51", -+ .stream_name = "CS42L51 HiFi", -+ .cpu_dai = &orion_i2s_dai, -+ .codec_dai = &cs42l51_dai, -+ .ops = &openrd_client_ops, -+}, -+}; -+ -+ -+static struct snd_soc_card openrd_client = { -+ .name = "OpenRD Client", -+ .platform = &orion_soc_platform, -+ .dai_link = openrd_client_dai, -+ .num_links = ARRAY_SIZE(openrd_client_dai), -+}; -+ -+static struct snd_soc_device openrd_client_snd_devdata = { -+ .card = &openrd_client, -+ .codec_dev = &soc_codec_device_cs42l51, -+}; -+ -+static struct platform_device *openrd_client_snd_device; -+ -+static int __init openrd_client_init(void) -+{ -+ int ret; -+ -+ if (!machine_is_openrd_client()) -+ return 0; -+ -+ openrd_client_snd_device = platform_device_alloc("soc-audio", -1); -+ if (!openrd_client_snd_device) -+ return -ENOMEM; -+ -+ platform_set_drvdata(openrd_client_snd_device, -+ &openrd_client_snd_devdata); -+ openrd_client_snd_devdata.dev = &openrd_client_snd_device->dev; -+ -+ ret = platform_device_add(openrd_client_snd_device); -+ if (ret) { -+ printk(KERN_ERR "%s: platform_device_add failed\n", __func__); -+ platform_device_put(openrd_client_snd_device); -+ } -+ -+ return ret; -+} -+ -+static void __exit openrd_client_exit(void) -+{ -+ platform_device_unregister(openrd_client_snd_device); -+} -+ -+module_init(openrd_client_init); -+module_exit(openrd_client_exit); -+ -+/* Module information */ -+MODULE_AUTHOR("Arnaud Patard <apatard@mandriva.com>"); -+MODULE_DESCRIPTION("ALSA SoC OpenRD Client"); -+MODULE_LICENSE("GPL"); -+MODULE_ALIAS("platform:soc-audio"); +An embedded and charset-unspecified text was scrubbed... +Name: openrd_audio.patch +URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100515/7476679e/attachment.el> diff --git a/a/content_digest b/N1/content_digest index 1d3640b..d286380 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,180 +1,12 @@ "ref\020100515152958.899927802@mandriva.com\0" - "From\0apatard@mandriva.com\0" + "From\0apatard@mandriva.com (apatard at mandriva.com)\0" "Subject\0[patch 6/6] kirkwood: Add audio support to openrd client platforms\0" "Date\0Sat, 15 May 2010 17:30:04 +0200\0" - "To\0alsa-devel@alsa-project.org\0" - "Cc\0nico@fluxnic.net" - broonie@opensource.wolfsonmicro.com - saeed@marvell.com - Arnaud Patard <apatard@mandriva.com> - tbm@cyrius.com - " linux-arm-kernel@lists.infradead.org\0" + "To\0linux-arm-kernel@lists.infradead.org\0" "\00:1\0" - "fn\0openrd_audio.patch\0" "b\0" - "This patch is adding support for openrd client platforms. It's using\n" - "the cs42l51 codec and has one mic and one speaker plugs.\n" - "\n" - "Signed-off-by: Arnaud Patard <apatard@mandriva.com>\n" - "\n" - "Index: sound-2.6/sound/soc/orion/Kconfig\n" - "===================================================================\n" - "--- sound-2.6.orig/sound/soc/orion/Kconfig\t2010-05-15 17:06:16.890586343 +0200\n" - "+++ sound-2.6/sound/soc/orion/Kconfig\t2010-05-15 17:07:30.990586832 +0200\n" - "@@ -9,3 +9,12 @@ config SND_ORION_SOC\n" - " config SND_ORION_SOC_I2S\n" - " \ttristate\n" - " \n" - "+config SND_KIRKWOOD_SOC_OPENRD\n" - "+\ttristate \"SoC Audio support for Kirkwood Openrd Client\"\n" - "+\tdepends on SND_ORION_SOC && MACH_OPENRD_CLIENT\n" - "+\tselect SND_ORION_SOC_I2S\n" - "+\tselect SND_SOC_CS42L51\n" - "+\thelp\n" - "+\t Say Y if you want to add support for SoC audio on\n" - "+\t Openrd Client.\n" - "+\n" - "Index: sound-2.6/sound/soc/orion/Makefile\n" - "===================================================================\n" - "--- sound-2.6.orig/sound/soc/orion/Makefile\t2010-05-15 17:06:16.962086209 +0200\n" - "+++ sound-2.6/sound/soc/orion/Makefile\t2010-05-15 17:07:31.006586283 +0200\n" - "@@ -4,3 +4,6 @@ snd-soc-orion-i2s-objs := orion-i2s.o\n" - " obj-$(CONFIG_SND_ORION_SOC) += snd-soc-orion.o\n" - " obj-$(CONFIG_SND_ORION_SOC_I2S) += snd-soc-orion-i2s.o\n" - " \n" - "+snd-soc-openrd-objs := kirkwood-openrd.o\n" - "+\n" - "+obj-$(CONFIG_SND_KIRKWOOD_SOC_OPENRD) += snd-soc-openrd.o\n" - "Index: sound-2.6/sound/soc/orion/kirkwood-openrd.c\n" - "===================================================================\n" - "--- /dev/null\t1970-01-01 00:00:00.000000000 +0000\n" - "+++ sound-2.6/sound/soc/orion/kirkwood-openrd.c\t2010-05-15 17:07:31.046586004 +0200\n" - "@@ -0,0 +1,126 @@\n" - "+/*\n" - "+ * kirkwood-openrd.c\n" - "+ *\n" - "+ * (c) 2010 Arnaud Patard <apatard@mandriva.com>\n" - "+ *\n" - "+ * This program is free software; you can redistribute it and/or modify it\n" - "+ * under the terms of the GNU General Public License as published by the\n" - "+ * Free Software Foundation; either version 2 of the License, or (at your\n" - "+ * option) any later version.\n" - "+ */\n" - "+\n" - "+#include <linux/module.h>\n" - "+#include <linux/moduleparam.h>\n" - "+#include <linux/interrupt.h>\n" - "+#include <linux/platform_device.h>\n" - "+#include <linux/slab.h>\n" - "+#include <sound/soc.h>\n" - "+#include <mach/kirkwood.h>\n" - "+#include <plat/audio.h>\n" - "+#include <asm/mach-types.h>\n" - "+#include \"orion-i2s.h\"\n" - "+#include \"orion-dma.h\"\n" - "+#include \"../codecs/cs42l51.h\"\n" - "+\n" - "+static int openrd_client_hw_params(struct snd_pcm_substream *substream,\n" - "+\t\tstruct snd_pcm_hw_params *params)\n" - "+{\n" - "+\tstruct snd_soc_pcm_runtime *rtd = substream->private_data;\n" - "+\tstruct snd_soc_dai *codec_dai = rtd->dai->codec_dai;\n" - "+\tstruct snd_soc_dai *cpu_dai = rtd->dai->cpu_dai;\n" - "+\tint ret;\n" - "+\tunsigned int freq, fmt;\n" - "+\n" - "+\tfmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM;\n" - "+\tret = snd_soc_dai_set_fmt(cpu_dai, fmt);\n" - "+\tif (ret < 0)\n" - "+\t\treturn ret;\n" - "+\n" - "+\tret = snd_soc_dai_set_fmt(codec_dai, fmt);\n" - "+\tif (ret < 0)\n" - "+\t\treturn ret;\n" - "+\n" - "+\tswitch (params_rate(params)) {\n" - "+\tdefault:\n" - "+\tcase 44100:\n" - "+\t\tfreq = 11289600;\n" - "+\t\tbreak;\n" - "+\tcase 48000:\n" - "+\t\tfreq = 12288000;\n" - "+\t\tbreak;\n" - "+\tcase 96000:\n" - "+\t\tfreq = 24576000;\n" - "+\t\tbreak;\n" - "+\t}\n" - "+\n" - "+\treturn snd_soc_dai_set_sysclk(codec_dai, 0, freq, SND_SOC_CLOCK_IN);\n" - "+\n" - "+}\n" - "+\n" - "+static struct snd_soc_ops openrd_client_ops = {\n" - "+\t.hw_params = openrd_client_hw_params,\n" - "+};\n" - "+\n" - "+\n" - "+static struct snd_soc_dai_link openrd_client_dai[] = {\n" - "+{\n" - "+\t.name = \"CS42L51\",\n" - "+\t.stream_name = \"CS42L51 HiFi\",\n" - "+\t.cpu_dai = &orion_i2s_dai,\n" - "+\t.codec_dai = &cs42l51_dai,\n" - "+\t.ops = &openrd_client_ops,\n" - "+},\n" - "+};\n" - "+\n" - "+\n" - "+static struct snd_soc_card openrd_client = {\n" - "+\t.name = \"OpenRD Client\",\n" - "+\t.platform = &orion_soc_platform,\n" - "+\t.dai_link = openrd_client_dai,\n" - "+\t.num_links = ARRAY_SIZE(openrd_client_dai),\n" - "+};\n" - "+\n" - "+static struct snd_soc_device openrd_client_snd_devdata = {\n" - "+\t.card = &openrd_client,\n" - "+\t.codec_dev = &soc_codec_device_cs42l51,\n" - "+};\n" - "+\n" - "+static struct platform_device *openrd_client_snd_device;\n" - "+\n" - "+static int __init openrd_client_init(void)\n" - "+{\n" - "+\tint ret;\n" - "+\n" - "+\tif (!machine_is_openrd_client())\n" - "+\t\treturn 0;\n" - "+\n" - "+\topenrd_client_snd_device = platform_device_alloc(\"soc-audio\", -1);\n" - "+\tif (!openrd_client_snd_device)\n" - "+\t\treturn -ENOMEM;\n" - "+\n" - "+\tplatform_set_drvdata(openrd_client_snd_device,\n" - "+\t\t\t&openrd_client_snd_devdata);\n" - "+\topenrd_client_snd_devdata.dev = &openrd_client_snd_device->dev;\n" - "+\n" - "+\tret = platform_device_add(openrd_client_snd_device);\n" - "+\tif (ret) {\n" - "+\t\tprintk(KERN_ERR \"%s: platform_device_add failed\\n\", __func__);\n" - "+\t\tplatform_device_put(openrd_client_snd_device);\n" - "+\t}\n" - "+\n" - "+\treturn ret;\n" - "+}\n" - "+\n" - "+static void __exit openrd_client_exit(void)\n" - "+{\n" - "+\tplatform_device_unregister(openrd_client_snd_device);\n" - "+}\n" - "+\n" - "+module_init(openrd_client_init);\n" - "+module_exit(openrd_client_exit);\n" - "+\n" - "+/* Module information */\n" - "+MODULE_AUTHOR(\"Arnaud Patard <apatard@mandriva.com>\");\n" - "+MODULE_DESCRIPTION(\"ALSA SoC OpenRD Client\");\n" - "+MODULE_LICENSE(\"GPL\");\n" - "+MODULE_ALIAS(\"platform:soc-audio\");" + "An embedded and charset-unspecified text was scrubbed...\n" + "Name: openrd_audio.patch\n" + URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100515/7476679e/attachment.el> -23e36d825b119764b3382f630cc0ddc75b44bb67fed07643a325e534209f1746 +bd23a8b703dd73b6c76d4793367456fd1c10db7f75479e090d66c175e8fd377f
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.