summaryrefslogtreecommitdiff
path: root/target/linux/xburst/patches-2.6.35
diff options
context:
space:
mode:
authorlars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-08-22 23:21:11 +0000
committerlars <lars@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-08-22 23:21:11 +0000
commit0e4e5ab6065a986fa9f3f2c748158c37cbfc4632 (patch)
tree4a26cf791783a62b295f05d4a3dacbcafe4f6db2 /target/linux/xburst/patches-2.6.35
parentdede4b7a9532a5c209ffc56de8dae2c60dc6ec64 (diff)
[xburst] Fix n5x6 sound drivers
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@22776 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'target/linux/xburst/patches-2.6.35')
-rw-r--r--target/linux/xburst/patches-2.6.35/066-n516-sound.patch27
-rw-r--r--target/linux/xburst/patches-2.6.35/067-n526-sound.patch28
2 files changed, 13 insertions, 42 deletions
diff --git a/target/linux/xburst/patches-2.6.35/066-n516-sound.patch b/target/linux/xburst/patches-2.6.35/066-n516-sound.patch
index ac0ec9c706..d7b0543236 100644
--- a/target/linux/xburst/patches-2.6.35/066-n516-sound.patch
+++ b/target/linux/xburst/patches-2.6.35/066-n516-sound.patch
@@ -21,7 +21,7 @@ Subject: [PATCH] Add N516 sound SoC board driver
+ tristate "SoC Audio support for Hanvon N516 eBook reader"
+ depends on SND_JZ4740_SOC && JZ4740_N516
+ select SND_JZ4740_SOC_I2S
-+ select SND_SOC_JZCODEC
++ select SND_SOC_JZ4740_CODEC
+ help
+ Say Y if you want to enable support for SoC audio on the Hanvon N516.
--- a/sound/soc/jz4740/Makefile
@@ -36,7 +36,7 @@ Subject: [PATCH] Add N516 sound SoC board driver
+obj-$(CONFIG_SND_JZ4740_SOC_N516) += snd-soc-n516.o
--- /dev/null
+++ b/sound/soc/jz4740/n516.c
-@@ -0,0 +1,303 @@
+@@ -0,0 +1,288 @@
+/*
+ * Copyright (C) 2009, Yauhen Kharuzhy <jekhor@gmail.com>
+ * OpenInkpot project
@@ -63,7 +63,7 @@ Subject: [PATCH] Add N516 sound SoC board driver
+#include <linux/gpio.h>
+#include <linux/workqueue.h>
+
-+#include "../codecs/jzcodec.h"
++#include "../codecs/jz4740.h"
+#include "jz4740-pcm.h"
+#include "jz4740-i2s.h"
+
@@ -178,32 +178,18 @@ Subject: [PATCH] Add N516 sound SoC board driver
+{
+ int ret;
+ struct snd_soc_dai *cpu_dai = codec->socdev->card->dai_link->cpu_dai;
-+ struct snd_soc_dai *codec_dai = codec->socdev->card->dai_link->codec_dai;
+
+ n516_codec = codec;
+
+ snd_soc_dapm_nc_pin(codec, "LIN");
+ snd_soc_dapm_nc_pin(codec, "RIN");
+
-+ ret = snd_soc_dai_set_fmt(codec_dai, N516_DAIFMT);
-+ if (ret < 0) {
-+ dev_err(codec->dev, "Failed to set codec dai format: %d\n", ret);
-+ return ret;
-+ }
-+
+ ret = snd_soc_dai_set_fmt(cpu_dai, N516_DAIFMT);
+ if (ret < 0) {
+ dev_err(codec->dev, "Failed to set cpu dai format: %d\n", ret);
+ return ret;
+ }
+
-+ ret = snd_soc_dai_set_sysclk(codec_dai, JZCODEC_SYSCLK, 111,
-+ SND_SOC_CLOCK_IN);
-+ if (ret < 0) {
-+ dev_err(codec->dev, "Failed to set codec dai sysclk: %d\n", ret);
-+ return ret;
-+ }
-+
+ ret = snd_soc_add_controls(codec, n516_controls,
+ ARRAY_SIZE(n516_controls));
+ if (ret) {
@@ -211,7 +197,6 @@ Subject: [PATCH] Add N516 sound SoC board driver
+ return ret;
+ }
+
-+
+ ret = snd_soc_dapm_new_controls(codec, n516_widgets,
+ ARRAY_SIZE(n516_widgets));
+ if (ret) {
@@ -232,9 +217,9 @@ Subject: [PATCH] Add N516 sound SoC board driver
+
+static struct snd_soc_dai_link n516_dai = {
+ .name = "jz-codec",
-+ .stream_name = "JZCODEC",
++ .stream_name = "jz4740",
+ .cpu_dai = &jz4740_i2s_dai,
-+ .codec_dai = &jz_codec_dai,
++ .codec_dai = &jz4740_codec_dai,
+ .init = n516_codec_init,
+};
+
@@ -247,7 +232,7 @@ Subject: [PATCH] Add N516 sound SoC board driver
+
+static struct snd_soc_device n516_snd_devdata = {
+ .card = &n516_card,
-+ .codec_dev = &soc_codec_dev_jzcodec,
++ .codec_dev = &soc_codec_dev_jz4740_codec,
+};
+
+static struct platform_device *n516_snd_device;
diff --git a/target/linux/xburst/patches-2.6.35/067-n526-sound.patch b/target/linux/xburst/patches-2.6.35/067-n526-sound.patch
index 34268200d5..9413e57383 100644
--- a/target/linux/xburst/patches-2.6.35/067-n526-sound.patch
+++ b/target/linux/xburst/patches-2.6.35/067-n526-sound.patch
@@ -13,7 +13,7 @@ Subject: [PATCH] Add N526 sound SoC board driver
--- a/sound/soc/jz4740/Kconfig
+++ b/sound/soc/jz4740/Kconfig
@@ -29,3 +29,11 @@ config SND_JZ4740_SOC_N516
- select SND_SOC_JZCODEC
+ select SND_SOC_JZ4740_CODEC
help
Say Y if you want to enable support for SoC audio on the Hanvon N516.
+
@@ -21,7 +21,7 @@ Subject: [PATCH] Add N526 sound SoC board driver
+ tristate "SoC Audio support for Hanvon N526 eBook reader"
+ depends on SND_JZ4740_SOC && JZ4740_N526
+ select SND_JZ4740_SOC_I2S
-+ select SND_SOC_JZCODEC
++ select SND_SOC_JZ4740_CODEC
+ help
+ Say Y if you want to enable support for SoC audio on the Hanvon N526.
--- a/sound/soc/jz4740/Makefile
@@ -37,7 +37,7 @@ Subject: [PATCH] Add N526 sound SoC board driver
+obj-$(CONFIG_SND_JZ4740_SOC_N526) += snd-soc-n526.o
--- /dev/null
+++ b/sound/soc/jz4740/n526.c
-@@ -0,0 +1,169 @@
+@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2009, Lars-Peter Clausen <lars@metafoo.de>
+ *
@@ -62,7 +62,7 @@ Subject: [PATCH] Add N526 sound SoC board driver
+#include <sound/soc-dapm.h>
+#include <linux/gpio.h>
+
-+#include "../codecs/jzcodec.h"
++#include "../codecs/jz4740.h"
+#include "jz4740-pcm.h"
+#include "jz4740-i2s.h"
+
@@ -101,30 +101,16 @@ Subject: [PATCH] Add N526 sound SoC board driver
+{
+ int ret;
+ struct snd_soc_dai *cpu_dai = codec->socdev->card->dai_link->cpu_dai;
-+ struct snd_soc_dai *codec_dai = codec->socdev->card->dai_link->codec_dai;
+
+ snd_soc_dapm_nc_pin(codec, "LIN");
+ snd_soc_dapm_nc_pin(codec, "RIN");
+
-+ ret = snd_soc_dai_set_fmt(codec_dai, N526_DAIFMT);
-+ if (ret < 0) {
-+ dev_err(codec->dev, "Failed to set codec dai format: %d\n", ret);
-+ return ret;
-+ }
-+
+ ret = snd_soc_dai_set_fmt(cpu_dai, N526_DAIFMT);
+ if (ret < 0) {
+ dev_err(codec->dev, "Failed to set cpu dai format: %d\n", ret);
+ return ret;
+ }
+
-+ ret = snd_soc_dai_set_sysclk(codec_dai, JZCODEC_SYSCLK, 111,
-+ SND_SOC_CLOCK_IN);
-+ if (ret < 0) {
-+ dev_err(codec->dev, "Failed to set codec dai sysclk: %d\n", ret);
-+ return ret;
-+ }
-+
+ snd_soc_dapm_new_controls(codec, n526_widgets, ARRAY_SIZE(n526_widgets));
+
+ snd_soc_add_controls(codec, n526_controls,
@@ -139,9 +125,9 @@ Subject: [PATCH] Add N526 sound SoC board driver
+
+static struct snd_soc_dai_link n526_dai = {
+ .name = "jz-codec",
-+ .stream_name = "JZCODEC",
++ .stream_name = "jz4740",
+ .cpu_dai = &jz4740_i2s_dai,
-+ .codec_dai = &jz_codec_dai,
++ .codec_dai = &jz4740_codec_dai,
+ .init = n526_codec_init,
+};
+
@@ -154,7 +140,7 @@ Subject: [PATCH] Add N526 sound SoC board driver
+
+static struct snd_soc_device n526_snd_devdata = {
+ .card = &n526,
-+ .codec_dev = &soc_codec_dev_jzcodec,
++ .codec_dev = &soc_codec_dev_jz4740_codec,
+};
+
+static struct platform_device *n526_snd_device;