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
492e9176
Commit
492e9176
authored
Jan 18, 2011
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'for-2.6.38' into for-2.6.39
parents
065ae678
c88c2823
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
42 additions
and
116 deletions
+42
-116
sound/soc/blackfin/Kconfig
sound/soc/blackfin/Kconfig
+6
-5
sound/soc/blackfin/bf5xx-ac97.c
sound/soc/blackfin/bf5xx-ac97.c
+2
-2
sound/soc/blackfin/bf5xx-tdm.c
sound/soc/blackfin/bf5xx-tdm.c
+5
-5
sound/soc/codecs/Kconfig
sound/soc/codecs/Kconfig
+1
-1
sound/soc/codecs/wl1273.c
sound/soc/codecs/wl1273.c
+12
-17
sound/soc/codecs/wl1273.h
sound/soc/codecs/wl1273.h
+0
-71
sound/soc/codecs/wm8990.c
sound/soc/codecs/wm8990.c
+5
-5
sound/soc/ep93xx/ep93xx-i2s.c
sound/soc/ep93xx/ep93xx-i2s.c
+9
-9
sound/soc/pxa/z2.c
sound/soc/pxa/z2.c
+2
-1
No files found.
sound/soc/blackfin/Kconfig
View file @
492e9176
config SND_BF5XX_I2S
tristate "SoC I2S Audio for the ADI BF5xx chip"
depends on BLACKFIN
select SND_BF5XX_SOC_SPORT
help
Say Y or M if you want to add support for codecs attached to
the Blackfin SPORT (synchronous serial ports) interface in I2S
...
...
@@ -35,6 +36,7 @@ config SND_BFIN_AD73311_SE
config SND_BF5XX_TDM
tristate "SoC I2S(TDM mode) Audio for the ADI BF5xx chip"
depends on (BLACKFIN && SND_SOC)
select SND_BF5XX_SOC_SPORT
help
Say Y or M if you want to add support for codecs attached to
the Blackfin SPORT (synchronous serial ports) interface in TDM
...
...
@@ -61,6 +63,10 @@ config SND_BF5XX_SOC_AD193X
config SND_BF5XX_AC97
tristate "SoC AC97 Audio for the ADI BF5xx chip"
depends on BLACKFIN
select AC97_BUS
select SND_SOC_AC97_BUS
select SND_BF5XX_SOC_SPORT
select SND_BF5XX_SOC_AC97
help
Say Y or M if you want to add support for codecs attached to
the Blackfin SPORT (synchronous serial ports) interface in slot 16
...
...
@@ -122,17 +128,12 @@ config SND_BF5XX_SOC_SPORT
config SND_BF5XX_SOC_I2S
tristate
select SND_BF5XX_SOC_SPORT
config SND_BF5XX_SOC_TDM
tristate
select SND_BF5XX_SOC_SPORT
config SND_BF5XX_SOC_AC97
tristate
select AC97_BUS
select SND_SOC_AC97_BUS
select SND_BF5XX_SOC_SPORT
config SND_BF5XX_SPORT_NUM
int "Set a SPORT for Sound chip"
...
...
sound/soc/blackfin/bf5xx-ac97.c
View file @
492e9176
...
...
@@ -260,9 +260,9 @@ static int bf5xx_ac97_suspend(struct snd_soc_dai *dai)
pr_debug
(
"%s : sport %d
\n
"
,
__func__
,
dai
->
id
);
if
(
!
dai
->
active
)
return
0
;
if
(
dai
->
capture
.
active
)
if
(
dai
->
capture
_
active
)
sport_rx_stop
(
sport
);
if
(
dai
->
playback
.
active
)
if
(
dai
->
playback
_
active
)
sport_tx_stop
(
sport
);
return
0
;
}
...
...
sound/soc/blackfin/bf5xx-tdm.c
View file @
492e9176
...
...
@@ -210,7 +210,7 @@ static int bf5xx_tdm_set_channel_map(struct snd_soc_dai *dai,
#ifdef CONFIG_PM
static
int
bf5xx_tdm_suspend
(
struct
snd_soc_dai
*
dai
)
{
struct
sport_device
*
sport
=
dai
->
private_data
;
struct
sport_device
*
sport
=
snd_soc_dai_get_drvdata
(
dai
)
;
if
(
!
dai
->
active
)
return
0
;
...
...
@@ -235,13 +235,13 @@ static int bf5xx_tdm_resume(struct snd_soc_dai *dai)
ret
=
-
EBUSY
;
}
ret
=
sport_config_rx
(
sport
,
IRFS
,
0x1F
,
0
,
0
);
ret
=
sport_config_rx
(
sport
,
0
,
0x1F
,
0
,
0
);
if
(
ret
)
{
pr_err
(
"SPORT is busy!
\n
"
);
ret
=
-
EBUSY
;
}
ret
=
sport_config_tx
(
sport
,
ITFS
,
0x1F
,
0
,
0
);
ret
=
sport_config_tx
(
sport
,
0
,
0x1F
,
0
,
0
);
if
(
ret
)
{
pr_err
(
"SPORT is busy!
\n
"
);
ret
=
-
EBUSY
;
...
...
@@ -303,14 +303,14 @@ static int __devinit bfin_tdm_probe(struct platform_device *pdev)
goto
sport_config_err
;
}
ret
=
sport_config_rx
(
sport_handle
,
IRFS
,
0x1F
,
0
,
0
);
ret
=
sport_config_rx
(
sport_handle
,
0
,
0x1F
,
0
,
0
);
if
(
ret
)
{
pr_err
(
"SPORT is busy!
\n
"
);
ret
=
-
EBUSY
;
goto
sport_config_err
;
}
ret
=
sport_config_tx
(
sport_handle
,
ITFS
,
0x1F
,
0
,
0
);
ret
=
sport_config_tx
(
sport_handle
,
0
,
0x1F
,
0
,
0
);
if
(
ret
)
{
pr_err
(
"SPORT is busy!
\n
"
);
ret
=
-
EBUSY
;
...
...
sound/soc/codecs/Kconfig
View file @
492e9176
...
...
@@ -45,7 +45,7 @@ config SND_SOC_ALL_CODECS
select SND_SOC_TWL6040 if TWL4030_CORE
select SND_SOC_UDA134X
select SND_SOC_UDA1380 if I2C
select SND_SOC_WL1273 if
WL1273_CORE
select SND_SOC_WL1273 if
RADIO_WL1273
select SND_SOC_WM2000 if I2C
select SND_SOC_WM8350 if MFD_WM8350
select SND_SOC_WM8400 if MFD_WM8400
...
...
sound/soc/codecs/wl1273.c
View file @
492e9176
...
...
@@ -42,7 +42,7 @@ struct wl1273_priv {
static
int
snd_wl1273_fm_set_i2s_mode
(
struct
wl1273_core
*
core
,
int
rate
,
int
width
)
{
struct
device
*
dev
=
&
core
->
i2c_dev
->
dev
;
struct
device
*
dev
=
&
core
->
client
->
dev
;
int
r
=
0
;
u16
mode
;
...
...
@@ -123,13 +123,13 @@ static int snd_wl1273_fm_set_i2s_mode(struct wl1273_core *core,
dev_dbg
(
dev
,
"mode: 0x%04x
\n
"
,
mode
);
if
(
core
->
i2s_mode
!=
mode
)
{
r
=
wl1273_fm_write_cmd
(
core
,
WL1273_I2S_MODE_CONFIG_SET
,
mode
);
r
=
core
->
write
(
core
,
WL1273_I2S_MODE_CONFIG_SET
,
mode
);
if
(
r
)
goto
out
;
core
->
i2s_mode
=
mode
;
r
=
wl1273_fm_write_cmd
(
core
,
WL1273_AUDIO_ENABLE
,
WL1273_AUDIO_ENABLE_I2S
);
r
=
core
->
write
(
core
,
WL1273_AUDIO_ENABLE
,
WL1273_AUDIO_ENABLE_I2S
);
if
(
r
)
goto
out
;
}
...
...
@@ -142,8 +142,7 @@ static int snd_wl1273_fm_set_i2s_mode(struct wl1273_core *core,
static
int
snd_wl1273_fm_set_channel_number
(
struct
wl1273_core
*
core
,
int
channel_number
)
{
struct
i2c_client
*
client
=
core
->
i2c_dev
;
struct
device
*
dev
=
&
client
->
dev
;
struct
device
*
dev
=
&
core
->
client
->
dev
;
int
r
=
0
;
dev_dbg
(
dev
,
"%s
\n
"
,
__func__
);
...
...
@@ -154,17 +153,13 @@ static int snd_wl1273_fm_set_channel_number(struct wl1273_core *core,
goto
out
;
if
(
channel_number
==
1
&&
core
->
mode
==
WL1273_MODE_RX
)
r
=
wl1273_fm_write_cmd
(
core
,
WL1273_MOST_MODE_SET
,
WL1273_RX_MONO
);
r
=
core
->
write
(
core
,
WL1273_MOST_MODE_SET
,
WL1273_RX_MONO
);
else
if
(
channel_number
==
1
&&
core
->
mode
==
WL1273_MODE_TX
)
r
=
wl1273_fm_write_cmd
(
core
,
WL1273_MONO_SET
,
WL1273_TX_MONO
);
r
=
core
->
write
(
core
,
WL1273_MONO_SET
,
WL1273_TX_MONO
);
else
if
(
channel_number
==
2
&&
core
->
mode
==
WL1273_MODE_RX
)
r
=
wl1273_fm_write_cmd
(
core
,
WL1273_MOST_MODE_SET
,
WL1273_RX_STEREO
);
r
=
core
->
write
(
core
,
WL1273_MOST_MODE_SET
,
WL1273_RX_STEREO
);
else
if
(
channel_number
==
2
&&
core
->
mode
==
WL1273_MODE_TX
)
r
=
wl1273_fm_write_cmd
(
core
,
WL1273_MONO_SET
,
WL1273_TX_STEREO
);
r
=
core
->
write
(
core
,
WL1273_MONO_SET
,
WL1273_TX_STEREO
);
else
r
=
-
EINVAL
;
out:
...
...
@@ -237,7 +232,7 @@ static int snd_wl1273_fm_audio_put(struct snd_kcontrol *kcontrol,
if
(
wl1273
->
core
->
audio_mode
==
val
)
return
0
;
r
=
wl1273
_fm_
set_audio
(
wl1273
->
core
,
val
);
r
=
wl1273
->
core
->
set_audio
(
wl1273
->
core
,
val
);
if
(
r
<
0
)
return
r
;
...
...
@@ -272,8 +267,8 @@ static int snd_wl1273_fm_volume_put(struct snd_kcontrol *kcontrol,
dev_dbg
(
codec
->
dev
,
"%s: enter.
\n
"
,
__func__
);
r
=
wl1273
_fm_
set_volume
(
wl1273
->
core
,
ucontrol
->
value
.
integer
.
value
[
0
]);
r
=
wl1273
->
core
->
set_volume
(
wl1273
->
core
,
ucontrol
->
value
.
integer
.
value
[
0
]);
if
(
r
)
return
r
;
...
...
sound/soc/codecs/wl1273.h
View file @
492e9176
...
...
@@ -25,77 +25,6 @@
#ifndef __WL1273_CODEC_H__
#define __WL1273_CODEC_H__
/* I2S protocol, left channel first, data width 16 bits */
#define WL1273_PCM_DEF_MODE 0x00
/* Rx */
#define WL1273_AUDIO_ENABLE_I2S (1 << 0)
#define WL1273_AUDIO_ENABLE_ANALOG (1 << 1)
/* Tx */
#define WL1273_AUDIO_IO_SET_ANALOG 0
#define WL1273_AUDIO_IO_SET_I2S 1
#define WL1273_POWER_SET_OFF 0
#define WL1273_POWER_SET_FM (1 << 0)
#define WL1273_POWER_SET_RDS (1 << 1)
#define WL1273_POWER_SET_RETENTION (1 << 4)
#define WL1273_PUPD_SET_OFF 0x00
#define WL1273_PUPD_SET_ON 0x01
#define WL1273_PUPD_SET_RETENTION 0x10
/* I2S mode */
#define WL1273_IS2_WIDTH_32 0x0
#define WL1273_IS2_WIDTH_40 0x1
#define WL1273_IS2_WIDTH_22_23 0x2
#define WL1273_IS2_WIDTH_23_22 0x3
#define WL1273_IS2_WIDTH_48 0x4
#define WL1273_IS2_WIDTH_50 0x5
#define WL1273_IS2_WIDTH_60 0x6
#define WL1273_IS2_WIDTH_64 0x7
#define WL1273_IS2_WIDTH_80 0x8
#define WL1273_IS2_WIDTH_96 0x9
#define WL1273_IS2_WIDTH_128 0xa
#define WL1273_IS2_WIDTH 0xf
#define WL1273_IS2_FORMAT_STD (0x0 << 4)
#define WL1273_IS2_FORMAT_LEFT (0x1 << 4)
#define WL1273_IS2_FORMAT_RIGHT (0x2 << 4)
#define WL1273_IS2_FORMAT_USER (0x3 << 4)
#define WL1273_IS2_MASTER (0x0 << 6)
#define WL1273_IS2_SLAVEW (0x1 << 6)
#define WL1273_IS2_TRI_AFTER_SENDING (0x0 << 7)
#define WL1273_IS2_TRI_ALWAYS_ACTIVE (0x1 << 7)
#define WL1273_IS2_SDOWS_RR (0x0 << 8)
#define WL1273_IS2_SDOWS_RF (0x1 << 8)
#define WL1273_IS2_SDOWS_FR (0x2 << 8)
#define WL1273_IS2_SDOWS_FF (0x3 << 8)
#define WL1273_IS2_TRI_OPT (0x0 << 10)
#define WL1273_IS2_TRI_ALWAYS (0x1 << 10)
#define WL1273_IS2_RATE_48K (0x0 << 12)
#define WL1273_IS2_RATE_44_1K (0x1 << 12)
#define WL1273_IS2_RATE_32K (0x2 << 12)
#define WL1273_IS2_RATE_22_05K (0x4 << 12)
#define WL1273_IS2_RATE_16K (0x5 << 12)
#define WL1273_IS2_RATE_12K (0x8 << 12)
#define WL1273_IS2_RATE_11_025 (0x9 << 12)
#define WL1273_IS2_RATE_8K (0xa << 12)
#define WL1273_IS2_RATE (0xf << 12)
#define WL1273_I2S_DEF_MODE (WL1273_IS2_WIDTH_32 | \
WL1273_IS2_FORMAT_STD | \
WL1273_IS2_MASTER | \
WL1273_IS2_TRI_AFTER_SENDING | \
WL1273_IS2_SDOWS_RR | \
WL1273_IS2_TRI_OPT | \
WL1273_IS2_RATE_48K)
int
wl1273_get_format
(
struct
snd_soc_codec
*
codec
,
unsigned
int
*
fmt
);
#endif
/* End of __WL1273_CODEC_H__ */
sound/soc/codecs/wm8990.c
View file @
492e9176
...
...
@@ -1183,7 +1183,7 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec,
WM8990_VMIDTOG
);
/* Delay to allow output caps to discharge */
msleep
(
msecs_to_jiffies
(
300
)
);
msleep
(
300
);
/* Disable VMIDTOG */
snd_soc_write
(
codec
,
WM8990_ANTIPOP2
,
WM8990_SOFTST
|
...
...
@@ -1195,17 +1195,17 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec,
/* Enable outputs */
snd_soc_write
(
codec
,
WM8990_POWER_MANAGEMENT_1
,
0x1b00
);
msleep
(
msecs_to_jiffies
(
50
)
);
msleep
(
50
);
/* Enable VMID at 2x50k */
snd_soc_write
(
codec
,
WM8990_POWER_MANAGEMENT_1
,
0x1f02
);
msleep
(
msecs_to_jiffies
(
100
)
);
msleep
(
100
);
/* Enable VREF */
snd_soc_write
(
codec
,
WM8990_POWER_MANAGEMENT_1
,
0x1f03
);
msleep
(
msecs_to_jiffies
(
600
)
);
msleep
(
600
);
/* Enable BUFIOEN */
snd_soc_write
(
codec
,
WM8990_ANTIPOP2
,
WM8990_SOFTST
|
...
...
@@ -1250,7 +1250,7 @@ static int wm8990_set_bias_level(struct snd_soc_codec *codec,
/* Disable VMID */
snd_soc_write
(
codec
,
WM8990_POWER_MANAGEMENT_1
,
0x1f01
);
msleep
(
msecs_to_jiffies
(
300
)
);
msleep
(
300
);
/* Enable all output discharge bits */
snd_soc_write
(
codec
,
WM8990_ANTIPOP1
,
WM8990_DIS_LLINE
|
...
...
sound/soc/ep93xx/ep93xx-i2s.c
View file @
492e9176
...
...
@@ -267,14 +267,16 @@ static int ep93xx_i2s_hw_params(struct snd_pcm_substream *substream,
ep93xx_i2s_write_reg
(
info
,
EP93XX_I2S_RXWRDLEN
,
word_len
);
/*
* Calculate the sdiv (bit clock) and lrdiv (left/right clock) values.
* If the lrclk is pulse length is larger than the word size, then the
* bit clock will be gated for the unused bits.
* EP93xx I2S module can be setup so SCLK / LRCLK value can be
* 32, 64, 128. MCLK / SCLK value can be 2 and 4.
* We set LRCLK equal to `rate' and minimum SCLK / LRCLK
* value is 64, because our sample size is 32 bit * 2 channels.
* I2S standard permits us to transmit more bits than
* the codec uses.
*/
div
=
(
clk_get_rate
(
info
->
mclk
)
/
params_rate
(
params
))
*
params_channels
(
params
);
div
=
clk_get_rate
(
info
->
mclk
)
/
params_rate
(
params
);
for
(
sdiv
=
2
;
sdiv
<=
4
;
sdiv
+=
2
)
for
(
lrdiv
=
32
;
lrdiv
<=
128
;
lrdiv
<<=
1
)
for
(
lrdiv
=
64
;
lrdiv
<=
128
;
lrdiv
<<=
1
)
if
(
sdiv
*
lrdiv
==
div
)
{
found
=
1
;
goto
out
;
...
...
@@ -341,9 +343,7 @@ static struct snd_soc_dai_ops ep93xx_i2s_dai_ops = {
.
set_fmt
=
ep93xx_i2s_set_dai_fmt
,
};
#define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S16_LE | \
SNDRV_PCM_FMTBIT_S24_LE | \
SNDRV_PCM_FMTBIT_S32_LE)
#define EP93XX_I2S_FORMATS (SNDRV_PCM_FMTBIT_S32_LE)
static
struct
snd_soc_dai_driver
ep93xx_i2s_dai
=
{
.
symmetric_rates
=
1
,
...
...
sound/soc/pxa/z2.c
View file @
492e9176
...
...
@@ -104,6 +104,7 @@ static struct snd_soc_jack_gpio hs_jack_gpios[] = {
.
name
=
"hsdet-gpio"
,
.
report
=
SND_JACK_HEADSET
,
.
debounce_time
=
200
,
.
invert
=
1
,
},
};
...
...
@@ -192,7 +193,7 @@ static struct snd_soc_dai_link z2_dai = {
.
cpu_dai_name
=
"pxa2xx-i2s"
,
.
codec_dai_name
=
"wm8750-hifi"
,
.
platform_name
=
"pxa-pcm-audio"
,
.
codec_name
=
"wm8750-codec.0-001
a
"
,
.
codec_name
=
"wm8750-codec.0-001
b
"
,
.
init
=
z2_wm8750_init
,
.
ops
=
&
z2_ops
,
};
...
...
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