Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (348 commits) ALSA: hda - Fix NULL-derefence with a single mic in STAC auto-mic detection ALSA: hda - Add missing NID 0x19 fixup for Sony VAIO ALSA: hda - Fix ALC275 enable hardware EQ for SONY VAIO ALSA: oxygen: fix Xonar DG input ALSA: hda - Fix EAPD on Lenovo NB ALC269 to low ALSA: hda - Fix missing EAPD for Acer 4930G ALSA: hda: Disable 4/6 channels on some NVIDIA GPUs. ALSA: hda - Add static_hdmi_pcm option to HDMI codec parser ALSA: hda - Don't refer ELD when unplugged ASoC: tpa6130a2: Fix compiler warning ASoC: tlv320dac33: Add DAPM selection for LOM invert ASoC: DMIC codec: Adding a generic DMIC codec ALSA: snd-usb-us122l: Fix missing NULL checks ALSA: snd-usb-us122l: Fix MIDI output ASoC: soc-cache: Fix invalid memory access during snd_soc_lzo_cache_sync() ASoC: Fix section mismatch in wm8995.c ALSA: oxygen: add S/PDIF source selection for Claro cards ALSA: oxygen: fix CD/MIDI for X-Meridian (2G) ASoC: fix migor audio build ALSA: include delay.h for msleep in Xonar DG support ...
This commit is contained in:
commit
66dc918d42
297 changed files with 25450 additions and 7182 deletions
|
|
@ -974,13 +974,6 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
|
||||
See hdspm.txt for details.
|
||||
|
||||
Module snd-hifier
|
||||
-----------------
|
||||
|
||||
Module for the MediaTek/TempoTec HiFier Fantasia sound card.
|
||||
|
||||
This module supports autoprobe and multiple cards.
|
||||
|
||||
Module snd-ice1712
|
||||
------------------
|
||||
|
||||
|
|
@ -1531,15 +1524,20 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
Module snd-oxygen
|
||||
-----------------
|
||||
|
||||
Module for sound cards based on the C-Media CMI8788 chip:
|
||||
Module for sound cards based on the C-Media CMI8786/8787/8788 chip:
|
||||
* Asound A-8788
|
||||
* Asus Xonar DG
|
||||
* AuzenTech X-Meridian
|
||||
* AuzenTech X-Meridian 2G
|
||||
* Bgears b-Enspirer
|
||||
* Club3D Theatron DTS
|
||||
* HT-Omega Claro (plus)
|
||||
* HT-Omega Claro halo (XT)
|
||||
* Kuroutoshikou CMI8787-HG2PCI
|
||||
* Razer Barracuda AC-1
|
||||
* Sondigo Inferno
|
||||
* TempoTec HiFier Fantasia
|
||||
* TempoTec HiFier Serenade
|
||||
|
||||
This module supports autoprobe and multiple cards.
|
||||
|
||||
|
|
@ -2006,9 +2004,9 @@ Prior to version 0.9.0rc4 options had a 'snd_' prefix. This was removed.
|
|||
Module snd-virtuoso
|
||||
-------------------
|
||||
|
||||
Module for sound cards based on the Asus AV100/AV200 chips,
|
||||
i.e., Xonar D1, DX, D2, D2X, DS, HDAV1.3 (Deluxe), Essence ST
|
||||
(Deluxe) and Essence STX.
|
||||
Module for sound cards based on the Asus AV66/AV100/AV200 chips,
|
||||
i.e., Xonar D1, DX, D2, D2X, DS, Essence ST (Deluxe), Essence STX,
|
||||
HDAV1.3 (Deluxe), and HDAV1.3 Slim.
|
||||
|
||||
This module supports autoprobe and multiple cards.
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,6 @@ ALC882/883/885/888/889
|
|||
acer-aspire-7730g Acer Aspire 7730G
|
||||
acer-aspire-8930g Acer Aspire 8930G
|
||||
medion Medion Laptops
|
||||
medion-md2 Medion MD2
|
||||
targa-dig Targa/MSI
|
||||
targa-2ch-dig Targa/MSI with 2-channel
|
||||
targa-8ch-dig Targa/MSI with 8-channel (MSI GX620)
|
||||
|
|
|
|||
45
MAINTAINERS
45
MAINTAINERS
|
|
@ -1523,6 +1523,14 @@ S: Supported
|
|||
F: block/bsg.c
|
||||
F: include/linux/bsg.h
|
||||
|
||||
BT87X AUDIO DRIVER
|
||||
M: Clemens Ladisch <clemens@ladisch.de>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
T: git git://git.alsa-project.org/alsa-kernel.git
|
||||
S: Maintained
|
||||
F: Documentation/sound/alsa/Bt87x.txt
|
||||
F: sound/pci/bt87x.c
|
||||
|
||||
BT8XXGPIO DRIVER
|
||||
M: Michael Buesch <mb@bu3sch.de>
|
||||
W: http://bu3sch.de/btgpio.php
|
||||
|
|
@ -1548,6 +1556,13 @@ S: Maintained
|
|||
F: Documentation/video4linux/bttv/
|
||||
F: drivers/media/video/bt8xx/bttv*
|
||||
|
||||
C-MEDIA CMI8788 DRIVER
|
||||
M: Clemens Ladisch <clemens@ladisch.de>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
T: git git://git.alsa-project.org/alsa-kernel.git
|
||||
S: Maintained
|
||||
F: sound/pci/oxygen/
|
||||
|
||||
CACHEFILES: FS-CACHE BACKEND FOR CACHING ON MOUNTED FILESYSTEMS
|
||||
M: David Howells <dhowells@redhat.com>
|
||||
L: linux-cachefs@redhat.com
|
||||
|
|
@ -2339,6 +2354,13 @@ W: bluesmoke.sourceforge.net
|
|||
S: Maintained
|
||||
F: drivers/edac/r82600_edac.c
|
||||
|
||||
EDIROL UA-101/UA-1000 DRIVER
|
||||
M: Clemens Ladisch <clemens@ladisch.de>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
T: git git://git.alsa-project.org/alsa-kernel.git
|
||||
S: Maintained
|
||||
F: sound/usb/misc/ua101.c
|
||||
|
||||
EEEPC LAPTOP EXTRAS DRIVER
|
||||
M: Corentin Chary <corentincj@iksaif.net>
|
||||
L: acpi4asus-user@lists.sourceforge.net
|
||||
|
|
@ -3507,6 +3529,13 @@ L: linux-serial@vger.kernel.org
|
|||
S: Maintained
|
||||
F: drivers/serial/jsm/
|
||||
|
||||
K10TEMP HARDWARE MONITORING DRIVER
|
||||
M: Clemens Ladisch <clemens@ladisch.de>
|
||||
L: lm-sensors@lm-sensors.org
|
||||
S: Maintained
|
||||
F: Documentation/hwmon/k10temp
|
||||
F: drivers/hwmon/k10temp.c
|
||||
|
||||
K8TEMP HARDWARE MONITORING DRIVER
|
||||
M: Rudolf Marek <r.marek@assembler.cz>
|
||||
L: lm-sensors@lm-sensors.org
|
||||
|
|
@ -4537,6 +4566,13 @@ F: drivers/of
|
|||
F: include/linux/of*.h
|
||||
K: of_get_property
|
||||
|
||||
OPL4 DRIVER
|
||||
M: Clemens Ladisch <clemens@ladisch.de>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
T: git git://git.alsa-project.org/alsa-kernel.git
|
||||
S: Maintained
|
||||
F: sound/drivers/opl4/
|
||||
|
||||
OPROFILE
|
||||
M: Robert Richter <robert.richter@amd.com>
|
||||
L: oprofile-list@lists.sf.net
|
||||
|
|
@ -5283,7 +5319,7 @@ SAMSUNG AUDIO (ASoC) DRIVERS
|
|||
M: Jassi Brar <jassi.brar@samsung.com>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
S: Supported
|
||||
F: sound/soc/s3c24xx
|
||||
F: sound/soc/samsung
|
||||
|
||||
TIMEKEEPING, NTP
|
||||
M: John Stultz <johnstul@us.ibm.com>
|
||||
|
|
@ -6291,6 +6327,13 @@ S: Maintained
|
|||
W: http://www.one-eyed-alien.net/~mdharm/linux-usb/
|
||||
F: drivers/usb/storage/
|
||||
|
||||
USB MIDI DRIVER
|
||||
M: Clemens Ladisch <clemens@ladisch.de>
|
||||
L: alsa-devel@alsa-project.org (moderated for non-subscribers)
|
||||
T: git git://git.alsa-project.org/alsa-kernel.git
|
||||
S: Maintained
|
||||
F: sound/usb/midi.*
|
||||
|
||||
USB OHCI DRIVER
|
||||
M: David Brownell <dbrownell@users.sourceforge.net>
|
||||
L: linux-usb@vger.kernel.org
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ static void __init openrd_init(void)
|
|||
|
||||
kirkwood_i2c_init();
|
||||
|
||||
if (machine_is_openrd_client()) {
|
||||
if (machine_is_openrd_client() || machine_is_openrd_ultimate()) {
|
||||
i2c_register_board_info(0, i2c_board_info,
|
||||
ARRAY_SIZE(i2c_board_info));
|
||||
kirkwood_audio_init();
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ static struct platform_device *h1940_devices[] __initdata = {
|
|||
&s3c_device_wdt,
|
||||
&s3c_device_i2c0,
|
||||
&s3c_device_iis,
|
||||
&s3c_device_pcm,
|
||||
&samsung_asoc_dma,
|
||||
&s3c_device_usbgadget,
|
||||
&h1940_device_leds,
|
||||
&h1940_device_bluetooth,
|
||||
|
|
|
|||
|
|
@ -692,7 +692,7 @@ static struct platform_device *rx1950_devices[] __initdata = {
|
|||
&s3c_device_wdt,
|
||||
&s3c_device_i2c0,
|
||||
&s3c_device_iis,
|
||||
&s3c_device_pcm,
|
||||
&samsung_asoc_dma,
|
||||
&s3c_device_usbgadget,
|
||||
&s3c_device_rtc,
|
||||
&s3c_device_nand,
|
||||
|
|
|
|||
|
|
@ -695,7 +695,7 @@ static struct clksrc_clk clksrcs[] = {
|
|||
}, {
|
||||
.clk = {
|
||||
.name = "audio-bus",
|
||||
.id = -1, /* There's only one IISv4 port */
|
||||
.id = 2,
|
||||
.ctrlbit = S3C6410_CLKCON_SCLK_AUDIO2,
|
||||
.enable = s3c64xx_sclk_ctrl,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -22,7 +22,12 @@
|
|||
#include <plat/audio.h>
|
||||
#include <plat/gpio-cfg.h>
|
||||
|
||||
static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev)
|
||||
static const char *rclksrc[] = {
|
||||
[0] = "iis",
|
||||
[1] = "audio-bus",
|
||||
};
|
||||
|
||||
static int s3c64xx_i2s_cfg_gpio(struct platform_device *pdev)
|
||||
{
|
||||
unsigned int base;
|
||||
|
||||
|
|
@ -33,6 +38,12 @@ static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev)
|
|||
case 1:
|
||||
base = S3C64XX_GPE(0);
|
||||
break;
|
||||
case 2:
|
||||
s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5));
|
||||
return 0;
|
||||
default:
|
||||
printk(KERN_DEBUG "Invalid I2S Controller number: %d\n",
|
||||
pdev->id);
|
||||
|
|
@ -44,16 +55,6 @@ static int s3c64xx_i2sv3_cfg_gpio(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int s3c64xx_i2sv4_cfg_gpio(struct platform_device *pdev)
|
||||
{
|
||||
s3c_gpio_cfgpin(S3C64XX_GPC(4), S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin(S3C64XX_GPC(5), S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin(S3C64XX_GPC(7), S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin_range(S3C64XX_GPH(6), 4, S3C_GPIO_SFN(5));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct resource s3c64xx_iis0_resource[] = {
|
||||
[0] = {
|
||||
.start = S3C64XX_PA_IIS0,
|
||||
|
|
@ -72,17 +73,22 @@ static struct resource s3c64xx_iis0_resource[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata s3c_i2s0_pdata = {
|
||||
.cfg_gpio = s3c64xx_i2sv3_cfg_gpio,
|
||||
static struct s3c_audio_pdata i2sv3_pdata = {
|
||||
.cfg_gpio = s3c64xx_i2s_cfg_gpio,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.src_clk = rclksrc,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s3c64xx_device_iis0 = {
|
||||
.name = "s3c64xx-iis",
|
||||
.name = "samsung-i2s",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s3c64xx_iis0_resource),
|
||||
.resource = s3c64xx_iis0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2s0_pdata,
|
||||
.platform_data = &i2sv3_pdata,
|
||||
},
|
||||
};
|
||||
EXPORT_SYMBOL(s3c64xx_device_iis0);
|
||||
|
|
@ -105,17 +111,13 @@ static struct resource s3c64xx_iis1_resource[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata s3c_i2s1_pdata = {
|
||||
.cfg_gpio = s3c64xx_i2sv3_cfg_gpio,
|
||||
};
|
||||
|
||||
struct platform_device s3c64xx_device_iis1 = {
|
||||
.name = "s3c64xx-iis",
|
||||
.name = "samsung-i2s",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(s3c64xx_iis1_resource),
|
||||
.resource = s3c64xx_iis1_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2s1_pdata,
|
||||
.platform_data = &i2sv3_pdata,
|
||||
},
|
||||
};
|
||||
EXPORT_SYMBOL(s3c64xx_device_iis1);
|
||||
|
|
@ -138,17 +140,23 @@ static struct resource s3c64xx_iisv4_resource[] = {
|
|||
},
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata s3c_i2sv4_pdata = {
|
||||
.cfg_gpio = s3c64xx_i2sv4_cfg_gpio,
|
||||
static struct s3c_audio_pdata i2sv4_pdata = {
|
||||
.cfg_gpio = s3c64xx_i2s_cfg_gpio,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.quirks = QUIRK_PRI_6CHAN,
|
||||
.src_clk = rclksrc,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s3c64xx_device_iisv4 = {
|
||||
.name = "s3c64xx-iis-v4",
|
||||
.id = -1,
|
||||
.name = "samsung-i2s",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(s3c64xx_iisv4_resource),
|
||||
.resource = s3c64xx_iisv4_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2sv4_pdata,
|
||||
.platform_data = &i2sv4_pdata,
|
||||
},
|
||||
};
|
||||
EXPORT_SYMBOL(s3c64xx_device_iisv4);
|
||||
|
|
@ -288,7 +296,7 @@ static struct s3c_audio_pdata s3c_ac97_pdata;
|
|||
static u64 s3c64xx_ac97_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
struct platform_device s3c64xx_device_ac97 = {
|
||||
.name = "s3c-ac97",
|
||||
.name = "samsung-ac97",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(s3c64xx_ac97_resource),
|
||||
.resource = s3c64xx_ac97_resource,
|
||||
|
|
@ -307,16 +315,3 @@ void __init s3c64xx_ac97_setup_gpio(int num)
|
|||
else
|
||||
s3c_ac97_pdata.cfg_gpio = s3c64xx_ac97_cfg_gpe;
|
||||
}
|
||||
|
||||
static u64 s3c_device_audio_dmamask = 0xffffffffUL;
|
||||
|
||||
struct platform_device s3c_device_pcm = {
|
||||
.name = "s3c24xx-pcm-audio",
|
||||
.id = -1,
|
||||
.dev = {
|
||||
.dma_mask = &s3c_device_audio_dmamask,
|
||||
.coherent_dma_mask = 0xffffffffUL
|
||||
}
|
||||
};
|
||||
EXPORT_SYMBOL(s3c_device_pcm);
|
||||
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ static struct platform_device *smdk6410_devices[] __initdata = {
|
|||
&s3c_device_fb,
|
||||
&s3c_device_ohci,
|
||||
&s3c_device_usb_hsotg,
|
||||
&s3c_device_pcm,
|
||||
&samsung_asoc_dma,
|
||||
&s3c64xx_device_iisv4,
|
||||
&samsung_device_keypad,
|
||||
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ static int s5p6442_cfg_i2s(struct platform_device *pdev)
|
|||
base = S5P6442_GPC1(0);
|
||||
break;
|
||||
|
||||
case -1:
|
||||
case 0:
|
||||
base = S5P6442_GPC0(0);
|
||||
break;
|
||||
|
||||
|
|
@ -42,8 +42,19 @@ static int s5p6442_cfg_i2s(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct s3c_audio_pdata s3c_i2s_pdata = {
|
||||
static const char *rclksrc_v35[] = {
|
||||
[0] = "busclk",
|
||||
[1] = "i2sclk",
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata i2sv35_pdata = {
|
||||
.cfg_gpio = s5p6442_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.quirks = QUIRK_SEC_DAI | QUIRK_NEED_RSTCLR,
|
||||
.src_clk = rclksrc_v35,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5p6442_iis0_resource[] = {
|
||||
|
|
@ -62,15 +73,34 @@ static struct resource s5p6442_iis0_resource[] = {
|
|||
.end = DMACH_I2S0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[3] = {
|
||||
.start = DMACH_I2S0S_TX,
|
||||
.end = DMACH_I2S0S_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5p6442_device_iis0 = {
|
||||
.name = "s3c64xx-iis-v4",
|
||||
.id = -1,
|
||||
.name = "samsung-i2s",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s5p6442_iis0_resource),
|
||||
.resource = s5p6442_iis0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2s_pdata,
|
||||
.platform_data = &i2sv35_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static const char *rclksrc_v3[] = {
|
||||
[0] = "iis",
|
||||
[1] = "sclk_audio",
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata i2sv3_pdata = {
|
||||
.cfg_gpio = s5p6442_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.src_clk = rclksrc_v3,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -93,12 +123,12 @@ static struct resource s5p6442_iis1_resource[] = {
|
|||
};
|
||||
|
||||
struct platform_device s5p6442_device_iis1 = {
|
||||
.name = "s3c64xx-iis",
|
||||
.name = "samsung-i2s",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(s5p6442_iis1_resource),
|
||||
.resource = s5p6442_iis1_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2s_pdata,
|
||||
.platform_data = &i2sv3_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ static struct clk init_clocks_disable[] = {
|
|||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 25),
|
||||
}, {
|
||||
.name = "i2s_v40",
|
||||
.name = "iis",
|
||||
.id = 0,
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
|
|
|
|||
|
|
@ -256,7 +256,7 @@ static struct clk init_clocks_disable[] = {
|
|||
.ctrlbit = (1 << 22),
|
||||
}, {
|
||||
.name = "iis",
|
||||
.id = -1,
|
||||
.id = 0,
|
||||
.parent = &clk_pclk_low.clk,
|
||||
.enable = s5p64x0_pclk_ctrl,
|
||||
.ctrlbit = (1 << 26),
|
||||
|
|
|
|||
|
|
@ -19,15 +19,19 @@
|
|||
#include <mach/dma.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
static int s5p6440_cfg_i2s(struct platform_device *pdev)
|
||||
static const char *rclksrc[] = {
|
||||
[0] = "iis",
|
||||
[1] = "sclk_audio2",
|
||||
};
|
||||
|
||||
static int s5p64x0_cfg_i2s(struct platform_device *pdev)
|
||||
{
|
||||
/* configure GPIO for i2s port */
|
||||
switch (pdev->id) {
|
||||
case -1:
|
||||
case 0:
|
||||
s3c_gpio_cfgpin_range(S5P6440_GPR(4), 5, S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin_range(S5P6440_GPR(13), 2, S3C_GPIO_SFN(5));
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(KERN_ERR "Invalid Device %d\n", pdev->id);
|
||||
return -EINVAL;
|
||||
|
|
@ -36,31 +40,14 @@ static int s5p6440_cfg_i2s(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int s5p6450_cfg_i2s(struct platform_device *pdev)
|
||||
{
|
||||
/* configure GPIO for i2s port */
|
||||
switch (pdev->id) {
|
||||
case -1:
|
||||
s3c_gpio_cfgpin(S5P6450_GPB(4), S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin_range(S5P6450_GPR(4), 5, S3C_GPIO_SFN(5));
|
||||
s3c_gpio_cfgpin_range(S5P6450_GPR(13), 2, S3C_GPIO_SFN(5));
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(KERN_ERR "Invalid Device %d\n", pdev->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct s3c_audio_pdata s5p6440_i2s_pdata = {
|
||||
.cfg_gpio = s5p6440_cfg_i2s,
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata s5p6450_i2s_pdata = {
|
||||
.cfg_gpio = s5p6450_cfg_i2s,
|
||||
static struct s3c_audio_pdata s5p64x0_i2s_pdata = {
|
||||
.cfg_gpio = s5p64x0_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.quirks = QUIRK_PRI_6CHAN,
|
||||
.src_clk = rclksrc,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5p64x0_iis0_resource[] = {
|
||||
|
|
@ -82,22 +69,22 @@ static struct resource s5p64x0_iis0_resource[] = {
|
|||
};
|
||||
|
||||
struct platform_device s5p6440_device_iis = {
|
||||
.name = "s3c64xx-iis-v4",
|
||||
.id = -1,
|
||||
.name = "samsung-i2s",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s5p64x0_iis0_resource),
|
||||
.resource = s5p64x0_iis0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s5p6440_i2s_pdata,
|
||||
.platform_data = &s5p64x0_i2s_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5p6450_device_iis0 = {
|
||||
.name = "s3c64xx-iis-v4",
|
||||
.id = -1,
|
||||
.name = "samsung-i2s",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s5p64x0_iis0_resource),
|
||||
.resource = s5p64x0_iis0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s5p6450_i2s_pdata,
|
||||
.platform_data = &s5p64x0_i2s_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -23,17 +23,14 @@ static int s5pc100_cfg_i2s(struct platform_device *pdev)
|
|||
{
|
||||
/* configure GPIO for i2s port */
|
||||
switch (pdev->id) {
|
||||
case 0: /* Dedicated pins */
|
||||
break;
|
||||
case 1:
|
||||
s3c_gpio_cfgpin_range(S5PC100_GPC(0), 5, S3C_GPIO_SFN(2));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
s3c_gpio_cfgpin_range(S5PC100_GPG3(0), 5, S3C_GPIO_SFN(4));
|
||||
break;
|
||||
|
||||
case -1: /* Dedicated pins */
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(KERN_ERR "Invalid Device %d\n", pdev->id);
|
||||
return -EINVAL;
|
||||
|
|
@ -42,8 +39,20 @@ static int s5pc100_cfg_i2s(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct s3c_audio_pdata s3c_i2s_pdata = {
|
||||
static const char *rclksrc_v5[] = {
|
||||
[0] = "iis",
|
||||
[1] = "i2sclkd2",
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata i2sv5_pdata = {
|
||||
.cfg_gpio = s5pc100_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI
|
||||
| QUIRK_NEED_RSTCLR,
|
||||
.src_clk = rclksrc_v5,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5pc100_iis0_resource[] = {
|
||||
|
|
@ -62,15 +71,34 @@ static struct resource s5pc100_iis0_resource[] = {
|
|||
.end = DMACH_I2S0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[3] = {
|
||||
.start = DMACH_I2S0S_TX,
|
||||
.end = DMACH_I2S0S_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5pc100_device_iis0 = {
|
||||
.name = "s3c64xx-iis-v4",
|
||||
.id = -1,
|
||||
.name = "samsung-i2s",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s5pc100_iis0_resource),
|
||||
.resource = s5pc100_iis0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2s_pdata,
|
||||
.platform_data = &i2sv5_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static const char *rclksrc_v3[] = {
|
||||
[0] = "iis",
|
||||
[1] = "sclk_audio",
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata i2sv3_pdata = {
|
||||
.cfg_gpio = s5pc100_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.src_clk = rclksrc_v3,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -93,12 +121,12 @@ static struct resource s5pc100_iis1_resource[] = {
|
|||
};
|
||||
|
||||
struct platform_device s5pc100_device_iis1 = {
|
||||
.name = "s3c64xx-iis",
|
||||
.name = "samsung-i2s",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(s5pc100_iis1_resource),
|
||||
.resource = s5pc100_iis1_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2s_pdata,
|
||||
.platform_data = &i2sv3_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -121,12 +149,12 @@ static struct resource s5pc100_iis2_resource[] = {
|
|||
};
|
||||
|
||||
struct platform_device s5pc100_device_iis2 = {
|
||||
.name = "s3c64xx-iis",
|
||||
.name = "samsung-i2s",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(s5pc100_iis2_resource),
|
||||
.resource = s5pc100_iis2_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2s_pdata,
|
||||
.platform_data = &i2sv3_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -253,7 +281,7 @@ static struct s3c_audio_pdata s3c_ac97_pdata = {
|
|||
static u64 s5pc100_ac97_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
struct platform_device s5pc100_device_ac97 = {
|
||||
.name = "s3c-ac97",
|
||||
.name = "samsung-ac97",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(s5pc100_ac97_resource),
|
||||
.resource = s5pc100_ac97_resource,
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ static struct s3c2410_uartcfg smdkc100_uartcfgs[] __initdata = {
|
|||
|
||||
/* I2C0 */
|
||||
static struct i2c_board_info i2c_devs0[] __initdata = {
|
||||
{I2C_BOARD_INFO("wm8580", 0x1b),},
|
||||
};
|
||||
|
||||
/* I2C1 */
|
||||
|
|
@ -190,6 +191,7 @@ static struct platform_device *smdkc100_devices[] __initdata = {
|
|||
&s3c_device_ts,
|
||||
&s3c_device_wdt,
|
||||
&smdkc100_lcd_powerdev,
|
||||
&samsung_asoc_dma,
|
||||
&s5pc100_device_iis0,
|
||||
&samsung_device_keypad,
|
||||
&s5pc100_device_ac97,
|
||||
|
|
|
|||
|
|
@ -467,20 +467,20 @@ static struct clk init_clocks_disable[] = {
|
|||
.enable = s5pv210_clk_ip3_ctrl,
|
||||
.ctrlbit = (1<<21),
|
||||
}, {
|
||||
.name = "i2s_v50",
|
||||
.name = "iis",
|
||||
.id = 0,
|
||||
.parent = &clk_p,
|
||||
.enable = s5pv210_clk_ip3_ctrl,
|
||||
.ctrlbit = (1<<4),
|
||||
}, {
|
||||
.name = "i2s_v32",
|
||||
.id = 0,
|
||||
.name = "iis",
|
||||
.id = 1,
|
||||
.parent = &clk_p,
|
||||
.enable = s5pv210_clk_ip3_ctrl,
|
||||
.ctrlbit = (1 << 5),
|
||||
}, {
|
||||
.name = "i2s_v32",
|
||||
.id = 1,
|
||||
.name = "iis",
|
||||
.id = 2,
|
||||
.parent = &clk_p,
|
||||
.enable = s5pv210_clk_ip3_ctrl,
|
||||
.ctrlbit = (1 << 6),
|
||||
|
|
|
|||
|
|
@ -19,22 +19,24 @@
|
|||
#include <mach/dma.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
static const char *rclksrc[] = {
|
||||
[0] = "busclk",
|
||||
[1] = "i2sclk",
|
||||
};
|
||||
|
||||
static int s5pv210_cfg_i2s(struct platform_device *pdev)
|
||||
{
|
||||
/* configure GPIO for i2s port */
|
||||
switch (pdev->id) {
|
||||
case 0:
|
||||
s3c_gpio_cfgpin_range(S5PV210_GPI(0), 7, S3C_GPIO_SFN(2));
|
||||
break;
|
||||
case 1:
|
||||
s3c_gpio_cfgpin_range(S5PV210_GPC0(0), 5, S3C_GPIO_SFN(2));
|
||||
break;
|
||||
|
||||
case 2:
|
||||
s3c_gpio_cfgpin_range(S5PV210_GPC1(0), 5, S3C_GPIO_SFN(4));
|
||||
break;
|
||||
|
||||
case -1:
|
||||
s3c_gpio_cfgpin_range(S5PV210_GPI(0), 7, S3C_GPIO_SFN(2));
|
||||
break;
|
||||
|
||||
default:
|
||||
printk(KERN_ERR "Invalid Device %d\n", pdev->id);
|
||||
return -EINVAL;
|
||||
|
|
@ -43,8 +45,15 @@ static int s5pv210_cfg_i2s(struct platform_device *pdev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static struct s3c_audio_pdata s3c_i2s_pdata = {
|
||||
static struct s3c_audio_pdata i2sv5_pdata = {
|
||||
.cfg_gpio = s5pv210_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI
|
||||
| QUIRK_NEED_RSTCLR,
|
||||
.src_clk = rclksrc,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5pv210_iis0_resource[] = {
|
||||
|
|
@ -63,15 +72,34 @@ static struct resource s5pv210_iis0_resource[] = {
|
|||
.end = DMACH_I2S0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[3] = {
|
||||
.start = DMACH_I2S0S_TX,
|
||||
.end = DMACH_I2S0S_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5pv210_device_iis0 = {
|
||||
.name = "s3c64xx-iis-v4",
|
||||
.id = -1,
|
||||
.name = "samsung-i2s",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s5pv210_iis0_resource),
|
||||
.resource = s5pv210_iis0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2s_pdata,
|
||||
.platform_data = &i2sv5_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static const char *rclksrc_v3[] = {
|
||||
[0] = "iis",
|
||||
[1] = "audio-bus",
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata i2sv3_pdata = {
|
||||
.cfg_gpio = s5pv210_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.src_clk = rclksrc_v3,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -94,12 +122,12 @@ static struct resource s5pv210_iis1_resource[] = {
|
|||
};
|
||||
|
||||
struct platform_device s5pv210_device_iis1 = {
|
||||
.name = "s3c64xx-iis",
|
||||
.name = "samsung-i2s",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(s5pv210_iis1_resource),
|
||||
.resource = s5pv210_iis1_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2s_pdata,
|
||||
.platform_data = &i2sv3_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -122,12 +150,12 @@ static struct resource s5pv210_iis2_resource[] = {
|
|||
};
|
||||
|
||||
struct platform_device s5pv210_device_iis2 = {
|
||||
.name = "s3c64xx-iis",
|
||||
.name = "samsung-i2s",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(s5pv210_iis2_resource),
|
||||
.resource = s5pv210_iis2_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_i2s_pdata,
|
||||
.platform_data = &i2sv3_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
@ -283,7 +311,7 @@ static struct s3c_audio_pdata s3c_ac97_pdata = {
|
|||
static u64 s5pv210_ac97_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
struct platform_device s5pv210_device_ac97 = {
|
||||
.name = "s3c-ac97",
|
||||
.name = "samsung-ac97",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(s5pv210_ac97_resource),
|
||||
.resource = s5pv210_ac97_resource,
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ if ARCH_S5PV310
|
|||
|
||||
config CPU_S5PV310
|
||||
bool
|
||||
select S3C_PL330_DMA
|
||||
help
|
||||
Enable S5PV310 CPU support
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ obj- :=
|
|||
# Core support for S5PV310 system
|
||||
|
||||
obj-$(CONFIG_CPU_S5PV310) += cpu.o init.o clock.o irq-combiner.o
|
||||
obj-$(CONFIG_CPU_S5PV310) += setup-i2c0.o time.o gpiolib.o irq-eint.o
|
||||
obj-$(CONFIG_CPU_S5PV310) += setup-i2c0.o time.o gpiolib.o irq-eint.o dma.o
|
||||
|
||||
obj-$(CONFIG_SMP) += platsmp.o headsmp.o
|
||||
obj-$(CONFIG_LOCAL_TIMERS) += localtimer.o
|
||||
|
|
@ -27,6 +27,7 @@ obj-$(CONFIG_MACH_UNIVERSAL_C210) += mach-universal_c210.o
|
|||
|
||||
# device support
|
||||
|
||||
obj-y += dev-audio.o
|
||||
obj-$(CONFIG_S5PV310_SETUP_I2C1) += setup-i2c1.o
|
||||
obj-$(CONFIG_S5PV310_SETUP_I2C2) += setup-i2c2.o
|
||||
obj-$(CONFIG_S5PV310_SETUP_I2C3) += setup-i2c3.o
|
||||
|
|
|
|||
364
arch/arm/mach-s5pv310/dev-audio.c
Normal file
364
arch/arm/mach-s5pv310/dev-audio.c
Normal file
|
|
@ -0,0 +1,364 @@
|
|||
/* linux/arch/arm/mach-s5pv310/dev-audio.c
|
||||
*
|
||||
* Copyright (c) 2010 Samsung Electronics Co. Ltd
|
||||
* Jaswinder Singh <jassi.brar@samsung.com>
|
||||
*
|
||||
* 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/platform_device.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/gpio.h>
|
||||
|
||||
#include <plat/gpio-cfg.h>
|
||||
#include <plat/audio.h>
|
||||
|
||||
#include <mach/map.h>
|
||||
#include <mach/dma.h>
|
||||
#include <mach/irqs.h>
|
||||
|
||||
static const char *rclksrc[] = {
|
||||
[0] = "busclk",
|
||||
[1] = "i2sclk",
|
||||
};
|
||||
|
||||
static int s5pv310_cfg_i2s(struct platform_device *pdev)
|
||||
{
|
||||
/* configure GPIO for i2s port */
|
||||
switch (pdev->id) {
|
||||
case 0:
|
||||
s3c_gpio_cfgpin_range(S5PV310_GPZ(0), 7, S3C_GPIO_SFN(2));
|
||||
break;
|
||||
case 1:
|
||||
s3c_gpio_cfgpin_range(S5PV310_GPC0(0), 5, S3C_GPIO_SFN(2));
|
||||
break;
|
||||
case 2:
|
||||
s3c_gpio_cfgpin_range(S5PV310_GPC1(0), 5, S3C_GPIO_SFN(4));
|
||||
break;
|
||||
default:
|
||||
printk(KERN_ERR "Invalid Device %d\n", pdev->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct s3c_audio_pdata i2sv5_pdata = {
|
||||
.cfg_gpio = s5pv310_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.quirks = QUIRK_PRI_6CHAN | QUIRK_SEC_DAI
|
||||
| QUIRK_NEED_RSTCLR,
|
||||
.src_clk = rclksrc,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5pv310_i2s0_resource[] = {
|
||||
[0] = {
|
||||
.start = S5PV310_PA_I2S0,
|
||||
.end = S5PV310_PA_I2S0 + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = DMACH_I2S0_TX,
|
||||
.end = DMACH_I2S0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[2] = {
|
||||
.start = DMACH_I2S0_RX,
|
||||
.end = DMACH_I2S0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[3] = {
|
||||
.start = DMACH_I2S0S_TX,
|
||||
.end = DMACH_I2S0S_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5pv310_device_i2s0 = {
|
||||
.name = "samsung-i2s",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s5pv310_i2s0_resource),
|
||||
.resource = s5pv310_i2s0_resource,
|
||||
.dev = {
|
||||
.platform_data = &i2sv5_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static const char *rclksrc_v3[] = {
|
||||
[0] = "sclk_i2s",
|
||||
[1] = "no_such_clock",
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata i2sv3_pdata = {
|
||||
.cfg_gpio = s5pv310_cfg_i2s,
|
||||
.type = {
|
||||
.i2s = {
|
||||
.quirks = QUIRK_NO_MUXPSR,
|
||||
.src_clk = rclksrc_v3,
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5pv310_i2s1_resource[] = {
|
||||
[0] = {
|
||||
.start = S5PV310_PA_I2S1,
|
||||
.end = S5PV310_PA_I2S1 + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = DMACH_I2S1_TX,
|
||||
.end = DMACH_I2S1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[2] = {
|
||||
.start = DMACH_I2S1_RX,
|
||||
.end = DMACH_I2S1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5pv310_device_i2s1 = {
|
||||
.name = "samsung-i2s",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(s5pv310_i2s1_resource),
|
||||
.resource = s5pv310_i2s1_resource,
|
||||
.dev = {
|
||||
.platform_data = &i2sv3_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5pv310_i2s2_resource[] = {
|
||||
[0] = {
|
||||
.start = S5PV310_PA_I2S2,
|
||||
.end = S5PV310_PA_I2S2 + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = DMACH_I2S2_TX,
|
||||
.end = DMACH_I2S2_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[2] = {
|
||||
.start = DMACH_I2S2_RX,
|
||||
.end = DMACH_I2S2_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5pv310_device_i2s2 = {
|
||||
.name = "samsung-i2s",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(s5pv310_i2s2_resource),
|
||||
.resource = s5pv310_i2s2_resource,
|
||||
.dev = {
|
||||
.platform_data = &i2sv3_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
/* PCM Controller platform_devices */
|
||||
|
||||
static int s5pv310_pcm_cfg_gpio(struct platform_device *pdev)
|
||||
{
|
||||
switch (pdev->id) {
|
||||
case 0:
|
||||
s3c_gpio_cfgpin_range(S5PV310_GPZ(0), 5, S3C_GPIO_SFN(3));
|
||||
break;
|
||||
case 1:
|
||||
s3c_gpio_cfgpin_range(S5PV310_GPC0(0), 5, S3C_GPIO_SFN(3));
|
||||
break;
|
||||
case 2:
|
||||
s3c_gpio_cfgpin_range(S5PV310_GPC1(0), 5, S3C_GPIO_SFN(3));
|
||||
break;
|
||||
default:
|
||||
printk(KERN_DEBUG "Invalid PCM Controller number!");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct s3c_audio_pdata s3c_pcm_pdata = {
|
||||
.cfg_gpio = s5pv310_pcm_cfg_gpio,
|
||||
};
|
||||
|
||||
static struct resource s5pv310_pcm0_resource[] = {
|
||||
[0] = {
|
||||
.start = S5PV310_PA_PCM0,
|
||||
.end = S5PV310_PA_PCM0 + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = DMACH_PCM0_TX,
|
||||
.end = DMACH_PCM0_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[2] = {
|
||||
.start = DMACH_PCM0_RX,
|
||||
.end = DMACH_PCM0_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5pv310_device_pcm0 = {
|
||||
.name = "samsung-pcm",
|
||||
.id = 0,
|
||||
.num_resources = ARRAY_SIZE(s5pv310_pcm0_resource),
|
||||
.resource = s5pv310_pcm0_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_pcm_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5pv310_pcm1_resource[] = {
|
||||
[0] = {
|
||||
.start = S5PV310_PA_PCM1,
|
||||
.end = S5PV310_PA_PCM1 + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = DMACH_PCM1_TX,
|
||||
.end = DMACH_PCM1_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[2] = {
|
||||
.start = DMACH_PCM1_RX,
|
||||
.end = DMACH_PCM1_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5pv310_device_pcm1 = {
|
||||
.name = "samsung-pcm",
|
||||
.id = 1,
|
||||
.num_resources = ARRAY_SIZE(s5pv310_pcm1_resource),
|
||||
.resource = s5pv310_pcm1_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_pcm_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
static struct resource s5pv310_pcm2_resource[] = {
|
||||
[0] = {
|
||||
.start = S5PV310_PA_PCM2,
|
||||
.end = S5PV310_PA_PCM2 + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = DMACH_PCM2_TX,
|
||||
.end = DMACH_PCM2_TX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[2] = {
|
||||
.start = DMACH_PCM2_RX,
|
||||
.end = DMACH_PCM2_RX,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
struct platform_device s5pv310_device_pcm2 = {
|
||||
.name = "samsung-pcm",
|
||||
.id = 2,
|
||||
.num_resources = ARRAY_SIZE(s5pv310_pcm2_resource),
|
||||
.resource = s5pv310_pcm2_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_pcm_pdata,
|
||||
},
|
||||
};
|
||||
|
||||
/* AC97 Controller platform devices */
|
||||
|
||||
static int s5pv310_ac97_cfg_gpio(struct platform_device *pdev)
|
||||
{
|
||||
return s3c_gpio_cfgpin_range(S5PV310_GPC0(0), 5, S3C_GPIO_SFN(4));
|
||||
}
|
||||
|
||||
static struct resource s5pv310_ac97_resource[] = {
|
||||
[0] = {
|
||||
.start = S5PV310_PA_AC97,
|
||||
.end = S5PV310_PA_AC97 + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = DMACH_AC97_PCMOUT,
|
||||
.end = DMACH_AC97_PCMOUT,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[2] = {
|
||||
.start = DMACH_AC97_PCMIN,
|
||||
.end = DMACH_AC97_PCMIN,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[3] = {
|
||||
.start = DMACH_AC97_MICIN,
|
||||
.end = DMACH_AC97_MICIN,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
[4] = {
|
||||
.start = IRQ_AC97,
|
||||
.end = IRQ_AC97,
|
||||
.flags = IORESOURCE_IRQ,
|
||||
},
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata s3c_ac97_pdata = {
|
||||
.cfg_gpio = s5pv310_ac97_cfg_gpio,
|
||||
};
|
||||
|
||||
static u64 s5pv310_ac97_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
struct platform_device s5pv310_device_ac97 = {
|
||||
.name = "samsung-ac97",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(s5pv310_ac97_resource),
|
||||
.resource = s5pv310_ac97_resource,
|
||||
.dev = {
|
||||
.platform_data = &s3c_ac97_pdata,
|
||||
.dma_mask = &s5pv310_ac97_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
};
|
||||
|
||||
/* S/PDIF Controller platform_device */
|
||||
|
||||
static int s5pv310_spdif_cfg_gpio(struct platform_device *pdev)
|
||||
{
|
||||
s3c_gpio_cfgpin_range(S5PV310_GPC1(0), 2, S3C_GPIO_SFN(3));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct resource s5pv310_spdif_resource[] = {
|
||||
[0] = {
|
||||
.start = S5PV310_PA_SPDIF,
|
||||
.end = S5PV310_PA_SPDIF + 0x100 - 1,
|
||||
.flags = IORESOURCE_MEM,
|
||||
},
|
||||
[1] = {
|
||||
.start = DMACH_SPDIF,
|
||||
.end = DMACH_SPDIF,
|
||||
.flags = IORESOURCE_DMA,
|
||||
},
|
||||
};
|
||||
|
||||
static struct s3c_audio_pdata samsung_spdif_pdata = {
|
||||
.cfg_gpio = s5pv310_spdif_cfg_gpio,
|
||||
};
|
||||
|
||||
static u64 s5pv310_spdif_dmamask = DMA_BIT_MASK(32);
|
||||
|
||||
struct platform_device s5pv310_device_spdif = {
|
||||
.name = "samsung-spdif",
|
||||
.id = -1,
|
||||
.num_resources = ARRAY_SIZE(s5pv310_spdif_resource),
|
||||
.resource = s5pv310_spdif_resource,
|
||||
.dev = {
|
||||
.platform_data = &samsung_spdif_pdata,
|
||||
.dma_mask = &s5pv310_spdif_dmamask,
|
||||
.coherent_dma_mask = DMA_BIT_MASK(32),
|
||||
},
|
||||
};
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue