mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-20 04:48:27 +02:00
Add support for nokia n810 sound
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23303 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
dfc66eb1b5
commit
ba23e6286a
@ -146,3 +146,44 @@ define KernelPackage/sound-soc-core
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call KernelPackage,sound-soc-core))
|
$(eval $(call KernelPackage,sound-soc-core))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/sound-soc-omap
|
||||||
|
TITLE:=OMAP SoC sound support
|
||||||
|
KCONFIG:= \
|
||||||
|
CONFIG_SND_OMAP_SOC
|
||||||
|
FILES:=$(LINUX_DIR)/sound/soc/omap/snd-soc-omap.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,60,snd-soc-omap)
|
||||||
|
DEPENDS:=@TARGET_omap24xx +kmod-sound-soc-core
|
||||||
|
$(call AddDepends/sound)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,sound-soc-omap))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/sound-soc-omap-mcbsp
|
||||||
|
TITLE:=OMAP SoC MCBSP support
|
||||||
|
KCONFIG:= \
|
||||||
|
CONFIG_SND_OMAP_SOC_MCBSP
|
||||||
|
FILES:=$(LINUX_DIR)/sound/soc/omap/snd-soc-omap-mcbsp.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,61,snd-soc-omap-mcbsp)
|
||||||
|
DEPENDS:=@TARGET_omap24xx +kmod-sound-soc-omap
|
||||||
|
$(call AddDepends/sound)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,sound-soc-omap-mcbsp))
|
||||||
|
|
||||||
|
|
||||||
|
define KernelPackage/sound-soc-n810
|
||||||
|
TITLE:=Nokia n810 SoC sound support
|
||||||
|
KCONFIG:= \
|
||||||
|
CONFIG_SND_OMAP_SOC_N810
|
||||||
|
FILES:= \
|
||||||
|
$(LINUX_DIR)/sound/soc/codecs/snd-soc-tlv320aic3x.ko \
|
||||||
|
$(LINUX_DIR)/sound/soc/omap/snd-soc-n810.ko
|
||||||
|
AUTOLOAD:=$(call AutoLoad,65,snd-soc-tlv320aic3x snd-soc-n810)
|
||||||
|
DEPENDS:=@TARGET_omap24xx +kmod-sound-soc-omap +kmod-sound-soc-omap-mcbsp
|
||||||
|
$(call AddDepends/sound)
|
||||||
|
endef
|
||||||
|
|
||||||
|
$(eval $(call KernelPackage,sound-soc-n810))
|
||||||
|
@ -0,0 +1,61 @@
|
|||||||
|
---
|
||||||
|
arch/arm/mach-omap2/board-n8x0.c | 14 ++++++++++++++
|
||||||
|
sound/soc/omap/n810.c | 10 ----------
|
||||||
|
2 files changed, 14 insertions(+), 10 deletions(-)
|
||||||
|
|
||||||
|
--- linux-2.6.36-rc7.orig/arch/arm/mach-omap2/board-n8x0.c
|
||||||
|
+++ linux-2.6.36-rc7/arch/arm/mach-omap2/board-n8x0.c
|
||||||
|
@@ -906,6 +906,20 @@ static void __init n8x0_gpio_switches_in
|
||||||
|
ARRAY_SIZE(n8x0_gpio_switches));
|
||||||
|
}
|
||||||
|
|
||||||
|
+static struct i2c_board_info n810_tlc320aic3x_i2c_dev[] = {
|
||||||
|
+ { I2C_BOARD_INFO("tlv320aic3x", 0x1b), }
|
||||||
|
+};
|
||||||
|
+
|
||||||
|
+static int __init n810_tlv320aic3x_register(void)
|
||||||
|
+{
|
||||||
|
+ if (machine_is_nokia_n810() || machine_is_nokia_n810_wimax()) {
|
||||||
|
+ i2c_register_board_info(1, n810_tlc320aic3x_i2c_dev,
|
||||||
|
+ ARRAY_SIZE(n810_tlc320aic3x_i2c_dev));
|
||||||
|
+ }
|
||||||
|
+ return 0;
|
||||||
|
+}
|
||||||
|
+arch_initcall(n810_tlv320aic3x_register);
|
||||||
|
+
|
||||||
|
static void __init n8x0_init_machine(void)
|
||||||
|
{
|
||||||
|
omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
|
||||||
|
--- linux-2.6.36-rc7.orig/sound/soc/omap/n810.c
|
||||||
|
+++ linux-2.6.36-rc7/sound/soc/omap/n810.c
|
||||||
|
@@ -22,7 +22,6 @@
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <linux/clk.h>
|
||||||
|
-#include <linux/i2c.h>
|
||||||
|
#include <linux/platform_device.h>
|
||||||
|
#include <sound/core.h>
|
||||||
|
#include <sound/pcm.h>
|
||||||
|
@@ -336,13 +335,6 @@ static struct snd_soc_device n810_snd_de
|
||||||
|
|
||||||
|
static struct platform_device *n810_snd_device;
|
||||||
|
|
||||||
|
-/* temporary i2c device creation until this can be moved into the machine
|
||||||
|
- * support file.
|
||||||
|
-*/
|
||||||
|
-static struct i2c_board_info i2c_device[] = {
|
||||||
|
- { I2C_BOARD_INFO("tlv320aic3x", 0x1b), }
|
||||||
|
-};
|
||||||
|
-
|
||||||
|
static int __init n810_soc_init(void)
|
||||||
|
{
|
||||||
|
int err;
|
||||||
|
@@ -351,8 +343,6 @@ static int __init n810_soc_init(void)
|
||||||
|
if (!(machine_is_nokia_n810() || machine_is_nokia_n810_wimax()))
|
||||||
|
return -ENODEV;
|
||||||
|
|
||||||
|
- i2c_register_board_info(1, i2c_device, ARRAY_SIZE(i2c_device));
|
||||||
|
-
|
||||||
|
n810_snd_device = platform_device_alloc("soc-audio", -1);
|
||||||
|
if (!n810_snd_device)
|
||||||
|
return -ENOMEM;
|
@ -474,9 +474,9 @@
|
|||||||
int retu_request_irq(int id, void *irq_handler, unsigned long arg, char *name);
|
int retu_request_irq(int id, void *irq_handler, unsigned long arg, char *name);
|
||||||
--- linux-2.6.36-rc7.orig/arch/arm/mach-omap2/board-n8x0.c
|
--- linux-2.6.36-rc7.orig/arch/arm/mach-omap2/board-n8x0.c
|
||||||
+++ linux-2.6.36-rc7/arch/arm/mach-omap2/board-n8x0.c
|
+++ linux-2.6.36-rc7/arch/arm/mach-omap2/board-n8x0.c
|
||||||
@@ -906,6 +906,17 @@ static void __init n8x0_gpio_switches_in
|
@@ -920,6 +920,17 @@ static int __init n810_tlv320aic3x_regis
|
||||||
ARRAY_SIZE(n8x0_gpio_switches));
|
|
||||||
}
|
}
|
||||||
|
arch_initcall(n810_tlv320aic3x_register);
|
||||||
|
|
||||||
+static struct platform_device n810_bm_device = {
|
+static struct platform_device n810_bm_device = {
|
||||||
+ .name = "n810bm",
|
+ .name = "n810bm",
|
||||||
@ -492,7 +492,7 @@
|
|||||||
static void __init n8x0_init_machine(void)
|
static void __init n8x0_init_machine(void)
|
||||||
{
|
{
|
||||||
omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
|
omap2420_mux_init(board_mux, OMAP_PACKAGE_ZAC);
|
||||||
@@ -933,6 +944,8 @@ static void __init n8x0_init_machine(voi
|
@@ -947,6 +958,8 @@ static void __init n8x0_init_machine(voi
|
||||||
n8x0_onenand_init();
|
n8x0_onenand_init();
|
||||||
n8x0_mmc_init();
|
n8x0_mmc_init();
|
||||||
n8x0_usb_init();
|
n8x0_usb_init();
|
||||||
|
Loading…
Reference in New Issue
Block a user