Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
e8fd86ef
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e8fd86ef
编写于
7月 09, 2011
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/asoc' into for-linus
上级
abaead6a
18361bbe
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
45 addition
and
35 deletion
+45
-35
sound/soc/blackfin/bf5xx-i2s-pcm.c
sound/soc/blackfin/bf5xx-i2s-pcm.c
+11
-2
sound/soc/codecs/ak4642.c
sound/soc/codecs/ak4642.c
+1
-1
sound/soc/codecs/tlv320aic26.c
sound/soc/codecs/tlv320aic26.c
+11
-3
sound/soc/codecs/tlv320aic3x.c
sound/soc/codecs/tlv320aic3x.c
+8
-1
sound/soc/codecs/wm8731.c
sound/soc/codecs/wm8731.c
+3
-26
sound/soc/codecs/wm8994.c
sound/soc/codecs/wm8994.c
+2
-0
sound/soc/soc-core.c
sound/soc/soc-core.c
+3
-2
sound/soc/tegra/tegra_i2s.c
sound/soc/tegra/tegra_i2s.c
+6
-0
未找到文件。
sound/soc/blackfin/bf5xx-i2s-pcm.c
浏览文件 @
e8fd86ef
...
...
@@ -138,11 +138,20 @@ static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream)
pr_debug
(
"%s enter
\n
"
,
__func__
);
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
{
diff
=
sport_curr_offset_tx
(
sport
);
frames
=
bytes_to_frames
(
substream
->
runtime
,
diff
);
}
else
{
diff
=
sport_curr_offset_rx
(
sport
);
frames
=
bytes_to_frames
(
substream
->
runtime
,
diff
);
}
/*
* TX at least can report one frame beyond the end of the
* buffer if we hit the wraparound case - clamp to within the
* buffer as the ALSA APIs require.
*/
if
(
diff
==
snd_pcm_lib_buffer_bytes
(
substream
))
diff
=
0
;
frames
=
bytes_to_frames
(
substream
->
runtime
,
diff
);
return
frames
;
}
...
...
sound/soc/codecs/ak4642.c
浏览文件 @
e8fd86ef
...
...
@@ -357,7 +357,7 @@ static int ak4642_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
default:
return
-
EINVAL
;
}
snd_soc_update_bits
(
codec
,
PW_MGMT2
,
MS
,
data
);
snd_soc_update_bits
(
codec
,
PW_MGMT2
,
MS
|
MCKO
|
PMPLL
,
data
);
snd_soc_update_bits
(
codec
,
MD_CTL1
,
BCKO_MASK
,
bcko
);
/* format type */
...
...
sound/soc/codecs/tlv320aic26.c
浏览文件 @
e8fd86ef
...
...
@@ -161,10 +161,18 @@ static int aic26_hw_params(struct snd_pcm_substream *substream,
dev_dbg
(
&
aic26
->
spi
->
dev
,
"bad format
\n
"
);
return
-
EINVAL
;
}
/* Configure PLL */
/**
* Configure PLL
* fsref = (mclk * PLLM) / 2048
* where PLLM = J.DDDD (DDDD register ranges from 0 to 9999, decimal)
*/
pval
=
1
;
jval
=
(
fsref
==
44100
)
?
7
:
8
;
dval
=
(
fsref
==
44100
)
?
5264
:
1920
;
/* compute J portion of multiplier */
jval
=
fsref
/
(
aic26
->
mclk
/
2048
);
/* compute fractional DDDD component of multiplier */
dval
=
fsref
-
(
jval
*
(
aic26
->
mclk
/
2048
));
dval
=
(
10000
*
dval
)
/
(
aic26
->
mclk
/
2048
);
dev_dbg
(
&
aic26
->
spi
->
dev
,
"Setting PLLM to %d.%04d
\n
"
,
jval
,
dval
);
qval
=
0
;
reg
=
0x8000
|
qval
<<
11
|
pval
<<
8
|
jval
<<
2
;
aic26_reg_write
(
codec
,
AIC26_REG_PLL_PROG1
,
reg
);
...
...
sound/soc/codecs/tlv320aic3x.c
浏览文件 @
e8fd86ef
...
...
@@ -1114,12 +1114,19 @@ static int aic3x_set_power(struct snd_soc_codec *codec, int power)
/* Sync reg_cache with the hardware */
codec
->
cache_only
=
0
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
aic3x_reg
);
i
++
)
for
(
i
=
AIC3X_SAMPLE_RATE_SEL_REG
;
i
<
ARRAY_SIZE
(
aic3x_reg
);
i
++
)
snd_soc_write
(
codec
,
i
,
cache
[
i
]);
if
(
aic3x
->
model
==
AIC3X_MODEL_3007
)
aic3x_init_3007
(
codec
);
codec
->
cache_sync
=
0
;
}
else
{
/*
* Do soft reset to this codec instance in order to clear
* possible VDD leakage currents in case the supply regulators
* remain on
*/
snd_soc_write
(
codec
,
AIC3X_RESET
,
SOFT_RESET
);
codec
->
cache_sync
=
1
;
aic3x
->
power
=
0
;
/* HW writes are needless when bias is off */
codec
->
cache_only
=
1
;
...
...
sound/soc/codecs/wm8731.c
浏览文件 @
e8fd86ef
...
...
@@ -175,6 +175,7 @@ static const struct snd_kcontrol_new wm8731_input_mux_controls =
SOC_DAPM_ENUM
(
"Input Select"
,
wm8731_insel_enum
);
static
const
struct
snd_soc_dapm_widget
wm8731_dapm_widgets
[]
=
{
SND_SOC_DAPM_SUPPLY
(
"ACTIVE"
,
WM8731_ACTIVE
,
0
,
0
,
NULL
,
0
),
SND_SOC_DAPM_SUPPLY
(
"OSC"
,
WM8731_PWR
,
5
,
1
,
NULL
,
0
),
SND_SOC_DAPM_MIXER
(
"Output Mixer"
,
WM8731_PWR
,
4
,
1
,
&
wm8731_output_mixer_controls
[
0
],
...
...
@@ -204,6 +205,8 @@ static int wm8731_check_osc(struct snd_soc_dapm_widget *source,
static
const
struct
snd_soc_dapm_route
wm8731_intercon
[]
=
{
{
"DAC"
,
NULL
,
"OSC"
,
wm8731_check_osc
},
{
"ADC"
,
NULL
,
"OSC"
,
wm8731_check_osc
},
{
"DAC"
,
NULL
,
"ACTIVE"
},
{
"ADC"
,
NULL
,
"ACTIVE"
},
/* output mixer */
{
"Output Mixer"
,
"Line Bypass Switch"
,
"Line Input"
},
...
...
@@ -315,29 +318,6 @@ static int wm8731_hw_params(struct snd_pcm_substream *substream,
return
0
;
}
static
int
wm8731_pcm_prepare
(
struct
snd_pcm_substream
*
substream
,
struct
snd_soc_dai
*
dai
)
{
struct
snd_soc_codec
*
codec
=
dai
->
codec
;
/* set active */
snd_soc_write
(
codec
,
WM8731_ACTIVE
,
0x0001
);
return
0
;
}
static
void
wm8731_shutdown
(
struct
snd_pcm_substream
*
substream
,
struct
snd_soc_dai
*
dai
)
{
struct
snd_soc_codec
*
codec
=
dai
->
codec
;
/* deactivate */
if
(
!
codec
->
active
)
{
udelay
(
50
);
snd_soc_write
(
codec
,
WM8731_ACTIVE
,
0x0
);
}
}
static
int
wm8731_mute
(
struct
snd_soc_dai
*
dai
,
int
mute
)
{
struct
snd_soc_codec
*
codec
=
dai
->
codec
;
...
...
@@ -480,7 +460,6 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec,
snd_soc_write
(
codec
,
WM8731_PWR
,
reg
|
0x0040
);
break
;
case
SND_SOC_BIAS_OFF
:
snd_soc_write
(
codec
,
WM8731_ACTIVE
,
0x0
);
snd_soc_write
(
codec
,
WM8731_PWR
,
0xffff
);
regulator_bulk_disable
(
ARRAY_SIZE
(
wm8731
->
supplies
),
wm8731
->
supplies
);
...
...
@@ -496,9 +475,7 @@ static int wm8731_set_bias_level(struct snd_soc_codec *codec,
SNDRV_PCM_FMTBIT_S24_LE)
static
struct
snd_soc_dai_ops
wm8731_dai_ops
=
{
.
prepare
=
wm8731_pcm_prepare
,
.
hw_params
=
wm8731_hw_params
,
.
shutdown
=
wm8731_shutdown
,
.
digital_mute
=
wm8731_mute
,
.
set_sysclk
=
wm8731_set_dai_sysclk
,
.
set_fmt
=
wm8731_set_dai_fmt
,
...
...
sound/soc/codecs/wm8994.c
浏览文件 @
e8fd86ef
...
...
@@ -1713,6 +1713,8 @@ static int _wm8994_set_fll(struct snd_soc_codec *codec, int id, int src,
snd_soc_update_bits
(
codec
,
WM8994_FLL1_CONTROL_1
+
reg_offset
,
WM8994_FLL1_ENA
|
WM8994_FLL1_FRAC
,
reg
);
msleep
(
5
);
}
wm8994
->
fll
[
id
].
in
=
freq_in
;
...
...
sound/soc/soc-core.c
浏览文件 @
e8fd86ef
...
...
@@ -1929,8 +1929,9 @@ static void snd_soc_instantiate_card(struct snd_soc_card *card)
"%s"
,
card
->
name
);
snprintf
(
card
->
snd_card
->
longname
,
sizeof
(
card
->
snd_card
->
longname
),
"%s"
,
card
->
long_name
?
card
->
long_name
:
card
->
name
);
snprintf
(
card
->
snd_card
->
driver
,
sizeof
(
card
->
snd_card
->
driver
),
"%s"
,
card
->
driver_name
?
card
->
driver_name
:
card
->
name
);
if
(
card
->
driver_name
)
strlcpy
(
card
->
snd_card
->
driver
,
card
->
driver_name
,
sizeof
(
card
->
snd_card
->
driver
));
if
(
card
->
late_probe
)
{
ret
=
card
->
late_probe
(
card
);
...
...
sound/soc/tegra/tegra_i2s.c
浏览文件 @
e8fd86ef
...
...
@@ -222,12 +222,18 @@ static int tegra_i2s_hw_params(struct snd_pcm_substream *substream,
if
(
i2sclock
%
(
2
*
srate
))
reg
|=
TEGRA_I2S_TIMING_NON_SYM_ENABLE
;
if
(
!
i2s
->
clk_refs
)
clk_enable
(
i2s
->
clk_i2s
);
tegra_i2s_write
(
i2s
,
TEGRA_I2S_TIMING
,
reg
);
tegra_i2s_write
(
i2s
,
TEGRA_I2S_FIFO_SCR
,
TEGRA_I2S_FIFO_SCR_FIFO2_ATN_LVL_FOUR_SLOTS
|
TEGRA_I2S_FIFO_SCR_FIFO1_ATN_LVL_FOUR_SLOTS
);
if
(
!
i2s
->
clk_refs
)
clk_disable
(
i2s
->
clk_i2s
);
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录