Diff
Modified: trunk/sound/soc/blackfin/Makefile (3900 => 3901)
--- trunk/sound/soc/blackfin/Makefile 2007-11-20 01:33:32 UTC (rev 3900)
+++ trunk/sound/soc/blackfin/Makefile 2007-11-20 04:06:23 UTC (rev 3901)
@@ -8,12 +8,12 @@
obj-$(CONFIG_SND_BF5XX_SOC_I2S) += snd-soc-bf5xx-i2s.o
# Blackfin Machine Support
-snd-soc-bf548-ezkit-objs := bf548-ezkit.o
+snd-ad1981-objs := bf548-ezkit.o
snd-ad1981-objs := bf5xx-board.o
snd-soc-bf5xx-wm8750-objs := bf5xx-wm8750.o
snd-soc-bf5xx-wm8731-objs := bf5xx-wm8731.o
-obj-$(CONFIG_SND_BF5XX_SOC_BF548_EZKIT) += snd-soc-bf548-ezkit.o
+obj-$(CONFIG_SND_BF5XX_SOC_BF548_EZKIT) += snd-ad1981.o
obj-$(CONFIG_SND_BF5XX_SOC_BF5xx) += snd-ad1981.o
obj-$(CONFIG_SND_BF5XX_SOC_WM8750) += snd-soc-bf5xx-wm8750.o
obj-$(CONFIG_SND_BF5XX_SOC_WM8731) += snd-soc-bf5xx-wm8731.o
Modified: trunk/sound/soc/blackfin/bf548-ezkit.c (3900 => 3901)
--- trunk/sound/soc/blackfin/bf548-ezkit.c 2007-11-20 01:33:32 UTC (rev 3900)
+++ trunk/sound/soc/blackfin/bf548-ezkit.c 2007-11-20 04:06:23 UTC (rev 3901)
@@ -31,50 +31,6 @@
#include "bf5xx-pcm.h"
#include "bf5xx-ac97.h"
-#define PIN_REQ_SPORT_0 {P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, \
- P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0}
-
-#define PIN_REQ_SPORT_1 {P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, \
- P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0}
-
-#define PIN_REQ_SPORT_2 {P_SPORT2_TFS, P_SPORT2_DTPRI, P_SPORT2_TSCLK, P_SPORT2_RFS, \
- P_SPORT2_DRPRI, P_SPORT2_RSCLK, 0}
-
-#define PIN_REQ_SPORT_3 {P_SPORT3_TFS, P_SPORT3_DTPRI, P_SPORT3_TSCLK, P_SPORT3_RFS, \
- P_SPORT3_DRPRI, P_SPORT3_RSCLK, 0}
-
-
-static int sport_num = CONFIG_SND_BF5XX_SPORT_NUM;
-
-static struct sport_param sport_params[4] = {
- {
- .dma_rx_chan = CH_SPORT0_RX,
- .dma_tx_chan = CH_SPORT0_TX,
- .err_irq = IRQ_SPORT0_ERR,
- .regs = (struct sport_register*)SPORT0_TCR1,
- },
- {
- .dma_rx_chan = CH_SPORT1_RX,
- .dma_tx_chan = CH_SPORT1_TX,
- .err_irq = IRQ_SPORT1_ERR,
- .regs = (struct sport_register*)SPORT1_TCR1,
- },
- {
- .dma_rx_chan = CH_SPORT2_RX,
- .dma_tx_chan = CH_SPORT2_TX,
- .err_irq = IRQ_SPORT2_ERR,
- .regs = (struct sport_register*)SPORT2_TCR1,
- },
- {
- .dma_rx_chan = CH_SPORT3_RX,
- .dma_tx_chan = CH_SPORT3_TX,
- .err_irq = IRQ_SPORT3_ERR,
- .regs = (struct sport_register*)SPORT3_TCR1,
- }
-};
-
-struct sport_device *sport_handle;
-
static struct snd_soc_machine bf548_ezkit;
static int bf548_ezkit_startup(struct snd_pcm_substream *substream)
@@ -102,36 +58,6 @@
static int bf548_probe(struct platform_device *pdev)
{
-
- u16 sport_req[][7] = {PIN_REQ_SPORT_0, PIN_REQ_SPORT_1,
- PIN_REQ_SPORT_2, PIN_REQ_SPORT_3};
-
- if (peripheral_request_list(&sport_req[sport_num][0], "soc-audio")) {
- printk(KERN_ERR "Requesting Peripherals faild\n");
- return -EFAULT;
- }
-
- /* Request PB3 as reset pin */
- if (gpio_request(GPIO_PB3, NULL)) {
- printk(KERN_ERR "Failed to request PB3 for reset\n");
- peripheral_free_list(&sport_req[sport_num][0]);
- return -1;
- }
- gpio_direction_output(GPIO_PB3);
- gpio_set_value(GPIO_PB3, 1);
-
- sport_handle = sport_init(&sport_params[sport_num], 2, \
- 10 * sizeof(struct ac97_frame), NULL);
- if (!sport_handle) {
- peripheral_free_list(&sport_req[sport_num][0]);
- gpio_free(GPIO_PB3);
- return -ENODEV;
- }
-
- sport_set_multichannel(sport_handle, 16, 0x1F, 1);
- sport_config_rx(sport_handle, IRFS, 0xF, 0, (16*16-1));
- sport_config_tx(sport_handle, ITFS, 0xF, 0, (16*16-1));
-
return 0;
}
Modified: trunk/sound/soc/blackfin/bf5xx-ac97.c (3900 => 3901)
--- trunk/sound/soc/blackfin/bf5xx-ac97.c 2007-11-20 01:33:32 UTC (rev 3900)
+++ trunk/sound/soc/blackfin/bf5xx-ac97.c 2007-11-20 04:06:23 UTC (rev 3901)
@@ -33,16 +33,56 @@
#include "bf5xx-sport.h"
#include "bf5xx-ac97.h"
+#ifdef CONFIG_BF548
+#define PIN_REQ_SPORT_0 {P_SPORT0_TFS, P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, \
+ P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0}
+#define PIN_REQ_SPORT_1 {P_SPORT1_TFS, P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, \
+ P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0}
+
+#define PIN_REQ_SPORT_2 {P_SPORT2_TFS, P_SPORT2_DTPRI, P_SPORT2_TSCLK, P_SPORT2_RFS, \
+ P_SPORT2_DRPRI, P_SPORT2_RSCLK, 0}
+
+#define PIN_REQ_SPORT_3 {P_SPORT3_TFS, P_SPORT3_DTPRI, P_SPORT3_TSCLK, P_SPORT3_RFS, \
+ P_SPORT3_DRPRI, P_SPORT3_RSCLK, 0}
+#else
#define PIN_REQ_SPORT_0 {P_SPORT0_DTPRI, P_SPORT0_TSCLK, P_SPORT0_RFS, \
P_SPORT0_DRPRI, P_SPORT0_RSCLK, 0}
-
#define PIN_REQ_SPORT_1 {P_SPORT1_DTPRI, P_SPORT1_TSCLK, P_SPORT1_RFS, \
P_SPORT1_DRPRI, P_SPORT1_RSCLK, 0}
+#endif
static int *cmd_count;
static int sport_num = CONFIG_SND_BF5XX_SPORT_NUM;
+#ifdef CONFIG_BF548
+static struct sport_param sport_params[4] = {
+ {
+ .dma_rx_chan = CH_SPORT0_RX,
+ .dma_tx_chan = CH_SPORT0_TX,
+ .err_irq = IRQ_SPORT0_ERR,
+ .regs = (struct sport_register *)SPORT0_TCR1,
+ },
+ {
+ .dma_rx_chan = CH_SPORT1_RX,
+ .dma_tx_chan = CH_SPORT1_TX,
+ .err_irq = IRQ_SPORT1_ERR,
+ .regs = (struct sport_register *)SPORT1_TCR1,
+ },
+ {
+ .dma_rx_chan = CH_SPORT2_RX,
+ .dma_tx_chan = CH_SPORT2_TX,
+ .err_irq = IRQ_SPORT2_ERR,
+ .regs = (struct sport_register *)SPORT2_TCR1,
+ },
+ {
+ .dma_rx_chan = CH_SPORT3_RX,
+ .dma_tx_chan = CH_SPORT3_TX,
+ .err_irq = IRQ_SPORT3_ERR,
+ .regs = (struct sport_register *)SPORT3_TCR1,
+ }
+};
+#else
static struct sport_param sport_params[2] = {
{
.dma_rx_chan = CH_SPORT0_RX,
@@ -57,6 +97,7 @@
.regs = (struct sport_register *)SPORT1_TCR1,
}
};
+#endif
struct sport_device *sport_handle;
EXPORT_SYMBOL(sport_handle);
@@ -241,7 +282,12 @@
static int bf5xx_ac97_probe(struct platform_device *pdev)
{
+#ifdef CONFIG_BF548
+ u16 sport_req[][7] = {PIN_REQ_SPORT_0, PIN_REQ_SPORT_1,
+ PIN_REQ_SPORT_2, PIN_REQ_SPORT_3};
+#else
u16 sport_req[][7] = {PIN_REQ_SPORT_0, PIN_REQ_SPORT_1};
+#endif
cmd_count = (int *)get_zeroed_page(GFP_KERNEL);
if (cmd_count == NULL)
return -ENOMEM;