Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
a2fbbbf1
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看板
提交
a2fbbbf1
编写于
6月 03, 2014
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branches 'asoc/topic/wm8804' and 'asoc/topic/wm9713' into asoc-next
上级
32539443
06109f47
a7f0b839
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
5 deletion
+19
-5
sound/soc/codecs/wm8804.c
sound/soc/codecs/wm8804.c
+14
-3
sound/soc/codecs/wm8804.h
sound/soc/codecs/wm8804.h
+4
-0
sound/soc/codecs/wm9713.c
sound/soc/codecs/wm9713.c
+1
-2
未找到文件。
sound/soc/codecs/wm8804.c
浏览文件 @
a2fbbbf1
...
...
@@ -63,6 +63,7 @@ struct wm8804_priv {
struct
regmap
*
regmap
;
struct
regulator_bulk_data
supplies
[
WM8804_NUM_SUPPLIES
];
struct
notifier_block
disable_nb
[
WM8804_NUM_SUPPLIES
];
int
mclk_div
;
};
static
int
txsrc_get
(
struct
snd_kcontrol
*
kcontrol
,
...
...
@@ -318,7 +319,7 @@ static struct {
#define FIXED_PLL_SIZE ((1ULL << 22) * 10)
static
int
pll_factors
(
struct
pll_div
*
pll_div
,
unsigned
int
target
,
unsigned
int
source
)
unsigned
int
source
,
unsigned
int
mclk_div
)
{
u64
Kpart
;
unsigned
long
int
K
,
Ndiv
,
Nmod
,
tmp
;
...
...
@@ -330,7 +331,8 @@ static int pll_factors(struct pll_div *pll_div, unsigned int target,
*/
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
post_table
);
i
++
)
{
tmp
=
target
*
post_table
[
i
].
div
;
if
(
tmp
>=
90000000
&&
tmp
<=
100000000
)
{
if
((
tmp
>=
90000000
&&
tmp
<=
100000000
)
&&
(
mclk_div
==
post_table
[
i
].
mclkdiv
))
{
pll_div
->
freqmode
=
post_table
[
i
].
freqmode
;
pll_div
->
mclkdiv
=
post_table
[
i
].
mclkdiv
;
target
*=
post_table
[
i
].
div
;
...
...
@@ -387,8 +389,12 @@ static int wm8804_set_pll(struct snd_soc_dai *dai, int pll_id,
}
else
{
int
ret
;
struct
pll_div
pll_div
;
struct
wm8804_priv
*
wm8804
;
ret
=
pll_factors
(
&
pll_div
,
freq_out
,
freq_in
);
wm8804
=
snd_soc_codec_get_drvdata
(
codec
);
ret
=
pll_factors
(
&
pll_div
,
freq_out
,
freq_in
,
wm8804
->
mclk_div
);
if
(
ret
)
return
ret
;
...
...
@@ -452,6 +458,7 @@ static int wm8804_set_clkdiv(struct snd_soc_dai *dai,
int
div_id
,
int
div
)
{
struct
snd_soc_codec
*
codec
;
struct
wm8804_priv
*
wm8804
;
codec
=
dai
->
codec
;
switch
(
div_id
)
{
...
...
@@ -459,6 +466,10 @@ static int wm8804_set_clkdiv(struct snd_soc_dai *dai,
snd_soc_update_bits
(
codec
,
WM8804_PLL5
,
0x30
,
(
div
&
0x3
)
<<
4
);
break
;
case
WM8804_MCLK_DIV
:
wm8804
=
snd_soc_codec_get_drvdata
(
codec
);
wm8804
->
mclk_div
=
div
;
break
;
default:
dev_err
(
dai
->
dev
,
"Unknown clock divider: %d
\n
"
,
div_id
);
return
-
EINVAL
;
...
...
sound/soc/codecs/wm8804.h
浏览文件 @
a2fbbbf1
...
...
@@ -57,5 +57,9 @@
#define WM8804_CLKOUT_SRC_OSCCLK 4
#define WM8804_CLKOUT_DIV 1
#define WM8804_MCLK_DIV 2
#define WM8804_MCLKDIV_256FS 0
#define WM8804_MCLKDIV_128FS 1
#endif
/* _WM8804_H */
sound/soc/codecs/wm9713.c
浏览文件 @
a2fbbbf1
...
...
@@ -74,8 +74,7 @@ static const char *wm9713_rec_src[] =
"Mono Out"
,
"Zh"
};
static
const
char
*
wm9713_rec_gain
[]
=
{
"+1.5dB Steps"
,
"+0.75dB Steps"
};
static
const
char
*
wm9713_alc_select
[]
=
{
"None"
,
"Left"
,
"Right"
,
"Stereo"
};
static
const
char
*
wm9713_mono_pga
[]
=
{
"Vmid"
,
"Zh"
,
"Mono"
,
"Inv"
,
"Mono Vmid"
,
"Inv Vmid"
};
static
const
char
*
wm9713_mono_pga
[]
=
{
"Vmid"
,
"Zh"
,
"Mono"
,
"Inv"
};
static
const
char
*
wm9713_spk_pga
[]
=
{
"Vmid"
,
"Zh"
,
"Headphone"
,
"Speaker"
,
"Inv"
,
"Headphone Vmid"
,
"Speaker Vmid"
,
"Inv Vmid"
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录