Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
2c9ee33d
Commit
2c9ee33d
authored
Sep 23, 2009
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-2.6.32' into for-2.6.33
parents
766df6d9
539d3d8c
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
63 additions
and
97 deletions
+63
-97
sound/soc/blackfin/bf5xx-i2s.c
sound/soc/blackfin/bf5xx-i2s.c
+4
-4
sound/soc/blackfin/bf5xx-tdm.c
sound/soc/blackfin/bf5xx-tdm.c
+4
-4
sound/soc/codecs/ad1836.c
sound/soc/codecs/ad1836.c
+1
-2
sound/soc/codecs/ad1938.c
sound/soc/codecs/ad1938.c
+1
-1
sound/soc/codecs/wm8753.c
sound/soc/codecs/wm8753.c
+1
-0
sound/soc/davinci/davinci-i2s.c
sound/soc/davinci/davinci-i2s.c
+12
-25
sound/soc/davinci/davinci-mcasp.c
sound/soc/davinci/davinci-mcasp.c
+28
-52
sound/soc/davinci/davinci-mcasp.h
sound/soc/davinci/davinci-mcasp.h
+6
-1
sound/soc/davinci/davinci-pcm.c
sound/soc/davinci/davinci-pcm.c
+6
-7
sound/soc/davinci/davinci-pcm.h
sound/soc/davinci/davinci-pcm.h
+0
-1
No files found.
sound/soc/blackfin/bf5xx-i2s.c
View file @
2c9ee33d
...
...
@@ -76,12 +76,12 @@ static struct sport_param sport_params[2] = {
* TFS. When Port G is selected and EMAC then there is a conflict between
* the PHY interrupt line and TFS. Current settings prevent the conflict
* by ignoring the TFS pin when Port G is selected. This allows both
*
ssm2602 using Port G and EMAC
concurrently.
*
codecs and EMAC using Port G
concurrently.
*/
#ifdef CONFIG_BF527_SPORT0_PORTF
#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
#else
#ifdef CONFIG_BF527_SPORT0_PORTG
#define LOCAL_SPORT0_TFS (0)
#else
#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
#endif
static
u16
sport_req
[][
7
]
=
{
{
P_SPORT0_DTPRI
,
P_SPORT0_TSCLK
,
P_SPORT0_RFS
,
...
...
sound/soc/blackfin/bf5xx-tdm.c
View file @
2c9ee33d
...
...
@@ -70,12 +70,12 @@ static struct sport_param sport_params[2] = {
* TFS. When Port G is selected and EMAC then there is a conflict between
* the PHY interrupt line and TFS. Current settings prevent the conflict
* by ignoring the TFS pin when Port G is selected. This allows both
*
ssm2602 using Port G and EMAC
concurrently.
*
codecs and EMAC using Port G
concurrently.
*/
#ifdef CONFIG_BF527_SPORT0_PORTF
#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
#else
#ifdef CONFIG_BF527_SPORT0_PORTG
#define LOCAL_SPORT0_TFS (0)
#else
#define LOCAL_SPORT0_TFS (P_SPORT0_TFS)
#endif
static
u16
sport_req
[][
7
]
=
{
{
P_SPORT0_DTPRI
,
P_SPORT0_TSCLK
,
P_SPORT0_RFS
,
...
...
sound/soc/codecs/ad1836.c
View file @
2c9ee33d
...
...
@@ -251,8 +251,7 @@ static int __devexit ad1836_spi_remove(struct spi_device *spi)
static
struct
spi_driver
ad1836_spi_driver
=
{
.
driver
=
{
.
name
=
"ad1836-spi"
,
.
bus
=
&
spi_bus_type
,
.
name
=
"ad1836"
,
.
owner
=
THIS_MODULE
,
},
.
probe
=
ad1836_spi_probe
,
...
...
sound/soc/codecs/ad1938.c
View file @
2c9ee33d
...
...
@@ -456,7 +456,6 @@ static int __devexit ad1938_spi_remove(struct spi_device *spi)
static
struct
spi_driver
ad1938_spi_driver
=
{
.
driver
=
{
.
name
=
"ad1938"
,
.
bus
=
&
spi_bus_type
,
.
owner
=
THIS_MODULE
,
},
.
probe
=
ad1938_spi_probe
,
...
...
@@ -515,6 +514,7 @@ static int ad1938_register(struct ad1938_priv *ad1938)
codec
->
num_dai
=
1
;
codec
->
write
=
ad1938_write_reg
;
codec
->
read
=
ad1938_read_reg_cache
;
codec
->
set_bias_level
=
ad1938_set_bias_level
;
INIT_LIST_HEAD
(
&
codec
->
dapm_widgets
);
INIT_LIST_HEAD
(
&
codec
->
dapm_paths
);
...
...
sound/soc/codecs/wm8753.c
View file @
2c9ee33d
...
...
@@ -595,6 +595,7 @@ static const struct snd_soc_dapm_route audio_map[] = {
/* Mono Capture mixer-mux */
{
"Capture Right Mixer"
,
"Stereo"
,
"Capture Right Mux"
},
{
"Capture Left Mixer"
,
"Stereo"
,
"Capture Left Mux"
},
{
"Capture Left Mixer"
,
"Analogue Mix Left"
,
"Capture Left Mux"
},
{
"Capture Left Mixer"
,
"Analogue Mix Left"
,
"Capture Right Mux"
},
{
"Capture Right Mixer"
,
"Analogue Mix Right"
,
"Capture Left Mux"
},
...
...
sound/soc/davinci/davinci-i2s.c
View file @
2c9ee33d
...
...
@@ -97,22 +97,19 @@ enum {
DAVINCI_MCBSP_WORD_32
,
};
static
struct
davinci_pcm_dma_params
davinci_i2s_pcm_out
=
{
.
name
=
"I2S PCM Stereo out"
,
};
static
struct
davinci_pcm_dma_params
davinci_i2s_pcm_in
=
{
.
name
=
"I2S PCM Stereo in"
,
};
struct
davinci_mcbsp_dev
{
/*
* dma_params must be first because rtd->dai->cpu_dai->private_data
* is cast to a pointer of an array of struct davinci_pcm_dma_params in
* davinci_pcm_open.
*/
struct
davinci_pcm_dma_params
dma_params
[
2
];
void
__iomem
*
base
;
#define MOD_DSP_A 0
#define MOD_DSP_B 1
int
mode
;
u32
pcr
;
struct
clk
*
clk
;
struct
davinci_pcm_dma_params
*
dma_params
[
2
];
};
static
inline
void
davinci_mcbsp_write_reg
(
struct
davinci_mcbsp_dev
*
dev
,
...
...
@@ -215,14 +212,6 @@ static void davinci_mcbsp_stop(struct davinci_mcbsp_dev *dev, int playback)
toggle_clock
(
dev
,
playback
);
}
static
int
davinci_i2s_startup
(
struct
snd_pcm_substream
*
substream
,
struct
snd_soc_dai
*
cpu_dai
)
{
struct
davinci_mcbsp_dev
*
dev
=
cpu_dai
->
private_data
;
cpu_dai
->
dma_data
=
dev
->
dma_params
[
substream
->
stream
];
return
0
;
}
#define DEFAULT_BITPERSAMPLE 16
static
int
davinci_i2s_set_dai_fmt
(
struct
snd_soc_dai
*
cpu_dai
,
...
...
@@ -353,8 +342,9 @@ static int davinci_i2s_hw_params(struct snd_pcm_substream *substream,
struct
snd_pcm_hw_params
*
params
,
struct
snd_soc_dai
*
dai
)
{
struct
davinci_pcm_dma_params
*
dma_params
=
dai
->
dma_data
;
struct
davinci_mcbsp_dev
*
dev
=
dai
->
private_data
;
struct
davinci_pcm_dma_params
*
dma_params
=
&
dev
->
dma_params
[
substream
->
stream
];
struct
snd_interval
*
i
=
NULL
;
int
mcbsp_word_length
;
unsigned
int
rcr
,
xcr
,
srgr
;
...
...
@@ -472,7 +462,6 @@ static void davinci_i2s_shutdown(struct snd_pcm_substream *substream,
#define DAVINCI_I2S_RATES SNDRV_PCM_RATE_8000_96000
static
struct
snd_soc_dai_ops
davinci_i2s_dai_ops
=
{
.
startup
=
davinci_i2s_startup
,
.
shutdown
=
davinci_i2s_shutdown
,
.
prepare
=
davinci_i2s_prepare
,
.
trigger
=
davinci_i2s_trigger
,
...
...
@@ -534,12 +523,10 @@ static int davinci_i2s_probe(struct platform_device *pdev)
dev
->
base
=
(
void
__iomem
*
)
IO_ADDRESS
(
mem
->
start
);
dev
->
dma_params
[
SNDRV_PCM_STREAM_PLAYBACK
]
=
&
davinci_i2s_pcm_out
;
dev
->
dma_params
[
SNDRV_PCM_STREAM_PLAYBACK
]
->
dma_addr
=
dev
->
dma_params
[
SNDRV_PCM_STREAM_PLAYBACK
].
dma_addr
=
(
dma_addr_t
)(
io_v2p
(
dev
->
base
)
+
DAVINCI_MCBSP_DXR_REG
);
dev
->
dma_params
[
SNDRV_PCM_STREAM_CAPTURE
]
=
&
davinci_i2s_pcm_in
;
dev
->
dma_params
[
SNDRV_PCM_STREAM_CAPTURE
]
->
dma_addr
=
dev
->
dma_params
[
SNDRV_PCM_STREAM_CAPTURE
].
dma_addr
=
(
dma_addr_t
)(
io_v2p
(
dev
->
base
)
+
DAVINCI_MCBSP_DRR_REG
);
/* first TX, then RX */
...
...
@@ -549,7 +536,7 @@ static int davinci_i2s_probe(struct platform_device *pdev)
ret
=
-
ENXIO
;
goto
err_free_mem
;
}
dev
->
dma_params
[
SNDRV_PCM_STREAM_PLAYBACK
]
->
channel
=
res
->
start
;
dev
->
dma_params
[
SNDRV_PCM_STREAM_PLAYBACK
]
.
channel
=
res
->
start
;
res
=
platform_get_resource
(
pdev
,
IORESOURCE_DMA
,
1
);
if
(
!
res
)
{
...
...
@@ -557,7 +544,7 @@ static int davinci_i2s_probe(struct platform_device *pdev)
ret
=
-
ENXIO
;
goto
err_free_mem
;
}
dev
->
dma_params
[
SNDRV_PCM_STREAM_CAPTURE
]
->
channel
=
res
->
start
;
dev
->
dma_params
[
SNDRV_PCM_STREAM_CAPTURE
]
.
channel
=
res
->
start
;
davinci_i2s_dai
.
private_data
=
dev
;
ret
=
snd_soc_register_dai
(
&
davinci_i2s_dai
);
...
...
sound/soc/davinci/davinci-mcasp.c
View file @
2c9ee33d
...
...
@@ -332,14 +332,6 @@ static inline void mcasp_set_ctl_reg(void __iomem *regs, u32 val)
printk
(
KERN_ERR
"GBLCTL write error
\n
"
);
}
static
int
davinci_mcasp_startup
(
struct
snd_pcm_substream
*
substream
,
struct
snd_soc_dai
*
cpu_dai
)
{
struct
davinci_audio_dev
*
dev
=
cpu_dai
->
private_data
;
cpu_dai
->
dma_data
=
dev
->
dma_params
[
substream
->
stream
];
return
0
;
}
static
void
mcasp_start_rx
(
struct
davinci_audio_dev
*
dev
)
{
mcasp_set_ctl_reg
(
dev
->
base
+
DAVINCI_MCASP_GBLCTLR_REG
,
RXHCLKRST
);
...
...
@@ -386,17 +378,17 @@ static void mcasp_start_tx(struct davinci_audio_dev *dev)
static
void
davinci_mcasp_start
(
struct
davinci_audio_dev
*
dev
,
int
stream
)
{
if
(
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
if
(
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
{
if
(
dev
->
txnumevt
)
/* enable FIFO */
mcasp_set_bits
(
dev
->
base
+
DAVINCI_MCASP_WFIFOCTL
,
FIFO_ENABLE
);
mcasp_start_tx
(
dev
);
else
}
else
{
if
(
dev
->
rxnumevt
)
/* enable FIFO */
mcasp_set_bits
(
dev
->
base
+
DAVINCI_MCASP_RFIFOCTL
,
FIFO_ENABLE
);
mcasp_start_rx
(
dev
);
/* enable FIFO */
if
(
dev
->
txnumevt
)
mcasp_set_bits
(
dev
->
base
+
DAVINCI_MCASP_WFIFOCTL
,
FIFO_ENABLE
);
if
(
dev
->
rxnumevt
)
mcasp_set_bits
(
dev
->
base
+
DAVINCI_MCASP_RFIFOCTL
,
FIFO_ENABLE
);
}
}
static
void
mcasp_stop_rx
(
struct
davinci_audio_dev
*
dev
)
...
...
@@ -413,17 +405,17 @@ static void mcasp_stop_tx(struct davinci_audio_dev *dev)
static
void
davinci_mcasp_stop
(
struct
davinci_audio_dev
*
dev
,
int
stream
)
{
if
(
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
if
(
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
{
if
(
dev
->
txnumevt
)
/* disable FIFO */
mcasp_clr_bits
(
dev
->
base
+
DAVINCI_MCASP_WFIFOCTL
,
FIFO_ENABLE
);
mcasp_stop_tx
(
dev
);
else
}
else
{
if
(
dev
->
rxnumevt
)
/* disable FIFO */
mcasp_clr_bits
(
dev
->
base
+
DAVINCI_MCASP_RFIFOCTL
,
FIFO_ENABLE
);
mcasp_stop_rx
(
dev
);
/* disable FIFO */
if
(
dev
->
txnumevt
)
mcasp_clr_bits
(
dev
->
base
+
DAVINCI_MCASP_WFIFOCTL
,
FIFO_ENABLE
);
if
(
dev
->
rxnumevt
)
mcasp_clr_bits
(
dev
->
base
+
DAVINCI_MCASP_RFIFOCTL
,
FIFO_ENABLE
);
}
}
static
int
davinci_mcasp_set_dai_fmt
(
struct
snd_soc_dai
*
cpu_dai
,
...
...
@@ -720,7 +712,7 @@ static int davinci_mcasp_hw_params(struct snd_pcm_substream *substream,
{
struct
davinci_audio_dev
*
dev
=
cpu_dai
->
private_data
;
struct
davinci_pcm_dma_params
*
dma_params
=
dev
->
dma_params
[
substream
->
stream
];
&
dev
->
dma_params
[
substream
->
stream
];
int
word_length
;
u8
numevt
;
...
...
@@ -798,7 +790,6 @@ static int davinci_mcasp_trigger(struct snd_pcm_substream *substream,
}
static
struct
snd_soc_dai_ops
davinci_mcasp_dai_ops
=
{
.
startup
=
davinci_mcasp_startup
,
.
trigger
=
davinci_mcasp_trigger
,
.
hw_params
=
davinci_mcasp_hw_params
,
.
set_fmt
=
davinci_mcasp_set_dai_fmt
,
...
...
@@ -849,20 +840,12 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
struct
resource
*
mem
,
*
ioarea
,
*
res
;
struct
snd_platform_data
*
pdata
;
struct
davinci_audio_dev
*
dev
;
int
count
=
0
;
int
ret
=
0
;
dev
=
kzalloc
(
sizeof
(
struct
davinci_audio_dev
),
GFP_KERNEL
);
if
(
!
dev
)
return
-
ENOMEM
;
dma_data
=
kzalloc
(
sizeof
(
struct
davinci_pcm_dma_params
)
*
2
,
GFP_KERNEL
);
if
(
!
dma_data
)
{
ret
=
-
ENOMEM
;
goto
err_release_dev
;
}
mem
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
if
(
!
mem
)
{
dev_err
(
&
pdev
->
dev
,
"no mem resource?
\n
"
);
...
...
@@ -897,11 +880,10 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
dev
->
txnumevt
=
pdata
->
txnumevt
;
dev
->
rxnumevt
=
pdata
->
rxnumevt
;
dma_data
[
count
].
name
=
"I2S PCM Stereo out"
;
dma_data
[
count
].
eventq_no
=
pdata
->
eventq_no
;
dma_data
[
count
].
dma_addr
=
(
dma_addr_t
)
(
pdata
->
tx_dma_offset
+
dma_data
=
&
dev
->
dma_params
[
SNDRV_PCM_STREAM_PLAYBACK
]
;
dma_data
->
eventq_no
=
pdata
->
eventq_no
;
dma_data
->
dma_addr
=
(
dma_addr_t
)
(
pdata
->
tx_dma_offset
+
io_v2p
(
dev
->
base
));
dev
->
dma_params
[
SNDRV_PCM_STREAM_PLAYBACK
]
=
&
dma_data
[
count
];
/* first TX, then RX */
res
=
platform_get_resource
(
pdev
,
IORESOURCE_DMA
,
0
);
...
...
@@ -910,13 +892,12 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
goto
err_release_region
;
}
dma_data
[
count
].
channel
=
res
->
start
;
count
++
;
dma_data
[
count
].
name
=
"I2S PCM Stereo in"
;
dma_data
[
count
].
eventq_no
=
pdata
->
eventq_no
;
dma_data
[
count
].
dma_addr
=
(
dma_addr_t
)(
pdata
->
rx_dma_offset
+
dma_data
->
channel
=
res
->
start
;
dma_data
=
&
dev
->
dma_params
[
SNDRV_PCM_STREAM_CAPTURE
]
;
dma_data
->
eventq_no
=
pdata
->
eventq_no
;
dma_data
->
dma_addr
=
(
dma_addr_t
)(
pdata
->
rx_dma_offset
+
io_v2p
(
dev
->
base
));
dev
->
dma_params
[
SNDRV_PCM_STREAM_CAPTURE
]
=
&
dma_data
[
count
];
res
=
platform_get_resource
(
pdev
,
IORESOURCE_DMA
,
1
);
if
(
!
res
)
{
...
...
@@ -924,7 +905,7 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
goto
err_release_region
;
}
dma_data
[
count
].
channel
=
res
->
start
;
dma_data
->
channel
=
res
->
start
;
davinci_mcasp_dai
[
pdata
->
op_mode
].
private_data
=
dev
;
davinci_mcasp_dai
[
pdata
->
op_mode
].
dev
=
&
pdev
->
dev
;
ret
=
snd_soc_register_dai
(
&
davinci_mcasp_dai
[
pdata
->
op_mode
]);
...
...
@@ -936,8 +917,6 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
err_release_region:
release_mem_region
(
mem
->
start
,
(
mem
->
end
-
mem
->
start
)
+
1
);
err_release_data:
kfree
(
dma_data
);
err_release_dev:
kfree
(
dev
);
return
ret
;
...
...
@@ -946,7 +925,6 @@ static int davinci_mcasp_probe(struct platform_device *pdev)
static
int
davinci_mcasp_remove
(
struct
platform_device
*
pdev
)
{
struct
snd_platform_data
*
pdata
=
pdev
->
dev
.
platform_data
;
struct
davinci_pcm_dma_params
*
dma_data
;
struct
davinci_audio_dev
*
dev
;
struct
resource
*
mem
;
...
...
@@ -959,8 +937,6 @@ static int davinci_mcasp_remove(struct platform_device *pdev)
mem
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
0
);
release_mem_region
(
mem
->
start
,
(
mem
->
end
-
mem
->
start
)
+
1
);
dma_data
=
dev
->
dma_params
[
SNDRV_PCM_STREAM_PLAYBACK
];
kfree
(
dma_data
);
kfree
(
dev
);
return
0
;
...
...
sound/soc/davinci/davinci-mcasp.h
View file @
2c9ee33d
...
...
@@ -39,10 +39,15 @@ enum {
};
struct
davinci_audio_dev
{
/*
* dma_params must be first because rtd->dai->cpu_dai->private_data
* is cast to a pointer of an array of struct davinci_pcm_dma_params in
* davinci_pcm_open.
*/
struct
davinci_pcm_dma_params
dma_params
[
2
];
void
__iomem
*
base
;
int
sample_rate
;
struct
clk
*
clk
;
struct
davinci_pcm_dma_params
*
dma_params
[
2
];
unsigned
int
codec_fmt
;
/* McASP specific data */
...
...
sound/soc/davinci/davinci-pcm.c
View file @
2c9ee33d
...
...
@@ -126,16 +126,9 @@ static void davinci_pcm_dma_irq(unsigned lch, u16 ch_status, void *data)
static
int
davinci_pcm_dma_request
(
struct
snd_pcm_substream
*
substream
)
{
struct
davinci_runtime_data
*
prtd
=
substream
->
runtime
->
private_data
;
struct
snd_soc_pcm_runtime
*
rtd
=
substream
->
private_data
;
struct
davinci_pcm_dma_params
*
dma_data
=
rtd
->
dai
->
cpu_dai
->
dma_data
;
struct
edmacc_param
p_ram
;
int
ret
;
if
(
!
dma_data
)
return
-
ENODEV
;
prtd
->
params
=
dma_data
;
/* Request master DMA channel */
ret
=
edma_alloc_channel
(
prtd
->
params
->
channel
,
davinci_pcm_dma_irq
,
substream
,
...
...
@@ -244,6 +237,11 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream)
struct
snd_pcm_runtime
*
runtime
=
substream
->
runtime
;
struct
davinci_runtime_data
*
prtd
;
int
ret
=
0
;
struct
snd_soc_pcm_runtime
*
rtd
=
substream
->
private_data
;
struct
davinci_pcm_dma_params
*
pa
=
rtd
->
dai
->
cpu_dai
->
private_data
;
struct
davinci_pcm_dma_params
*
params
=
&
pa
[
substream
->
stream
];
if
(
!
params
)
return
-
ENODEV
;
snd_soc_set_runtime_hwparams
(
substream
,
&
davinci_pcm_hardware
);
/* ensure that buffer size is a multiple of period size */
...
...
@@ -257,6 +255,7 @@ static int davinci_pcm_open(struct snd_pcm_substream *substream)
return
-
ENOMEM
;
spin_lock_init
(
&
prtd
->
lock
);
prtd
->
params
=
params
;
runtime
->
private_data
=
prtd
;
...
...
sound/soc/davinci/davinci-pcm.h
View file @
2c9ee33d
...
...
@@ -17,7 +17,6 @@
struct
davinci_pcm_dma_params
{
char
*
name
;
/* stream identifier */
int
channel
;
/* sync dma channel ID */
unsigned
short
acnt
;
dma_addr_t
dma_addr
;
/* device physical address for DMA */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment