Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
cb42e0f7
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看板
提交
cb42e0f7
编写于
8月 30, 2015
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'asoc/topic/rt5645' into asoc-next
上级
ca945cf9
f2988afe
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
244 addition
and
272 deletion
+244
-272
include/sound/soc.h
include/sound/soc.h
+3
-7
sound/soc/codecs/rt5645.c
sound/soc/codecs/rt5645.c
+209
-206
sound/soc/codecs/rt5645.h
sound/soc/codecs/rt5645.h
+1
-26
sound/soc/codecs/tas571x.c
sound/soc/codecs/tas571x.c
+1
-1
sound/soc/intel/boards/cht_bsw_max98090_ti.c
sound/soc/intel/boards/cht_bsw_max98090_ti.c
+7
-11
sound/soc/omap/omap3pandora.c
sound/soc/omap/omap3pandora.c
+2
-4
sound/soc/soc-core.c
sound/soc/soc-core.c
+12
-11
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+9
-6
未找到文件。
include/sound/soc.h
浏览文件 @
cb42e0f7
...
...
@@ -791,7 +791,6 @@ struct snd_soc_component {
/* Don't use these, use snd_soc_component_get_dapm() */
struct
snd_soc_dapm_context
dapm
;
struct
snd_soc_dapm_context
*
dapm_ptr
;
const
struct
snd_kcontrol_new
*
controls
;
unsigned
int
num_controls
;
...
...
@@ -831,9 +830,6 @@ struct snd_soc_codec {
/* component */
struct
snd_soc_component
component
;
/* Don't access this directly, use snd_soc_codec_get_dapm() */
struct
snd_soc_dapm_context
dapm
;
#ifdef CONFIG_DEBUG_FS
struct
dentry
*
debugfs_reg
;
#endif
...
...
@@ -1276,7 +1272,7 @@ static inline struct snd_soc_component *snd_soc_dapm_to_component(
static
inline
struct
snd_soc_codec
*
snd_soc_dapm_to_codec
(
struct
snd_soc_dapm_context
*
dapm
)
{
return
container_of
(
dapm
,
struct
snd_soc_codec
,
dapm
);
return
snd_soc_component_to_codec
(
snd_soc_dapm_to_component
(
dapm
)
);
}
/**
...
...
@@ -1301,7 +1297,7 @@ static inline struct snd_soc_platform *snd_soc_dapm_to_platform(
static
inline
struct
snd_soc_dapm_context
*
snd_soc_component_get_dapm
(
struct
snd_soc_component
*
component
)
{
return
component
->
dapm_ptr
;
return
&
component
->
dapm
;
}
/**
...
...
@@ -1313,7 +1309,7 @@ static inline struct snd_soc_dapm_context *snd_soc_component_get_dapm(
static
inline
struct
snd_soc_dapm_context
*
snd_soc_codec_get_dapm
(
struct
snd_soc_codec
*
codec
)
{
return
&
codec
->
dapm
;
return
snd_soc_component_get_dapm
(
&
codec
->
component
)
;
}
/**
...
...
sound/soc/codecs/rt5645.c
浏览文件 @
cb42e0f7
此差异已折叠。
点击以展开。
sound/soc/codecs/rt5645.h
浏览文件 @
cb42e0f7
...
...
@@ -2115,6 +2115,7 @@ enum {
#define RT5645_JD_PSV_MODE (0x1 << 12)
#define RT5645_IRQ_CLK_GATE_CTRL (0x1 << 11)
#define RT5645_MICINDET_MANU (0x1 << 7)
#define RT5645_RING2_SLEEVE_GND (0x1 << 5)
/* Vendor ID (0xfd) */
#define RT5645_VER_C 0x2
...
...
@@ -2181,32 +2182,6 @@ enum {
int
rt5645_sel_asrc_clk_src
(
struct
snd_soc_codec
*
codec
,
unsigned
int
filter_mask
,
unsigned
int
clk_src
);
struct
rt5645_priv
{
struct
snd_soc_codec
*
codec
;
struct
rt5645_platform_data
pdata
;
struct
regmap
*
regmap
;
struct
i2c_client
*
i2c
;
struct
gpio_desc
*
gpiod_hp_det
;
struct
snd_soc_jack
*
hp_jack
;
struct
snd_soc_jack
*
mic_jack
;
struct
snd_soc_jack
*
btn_jack
;
struct
delayed_work
jack_detect_work
;
int
codec_type
;
int
sysclk
;
int
sysclk_src
;
int
lrck
[
RT5645_AIFS
];
int
bclk
[
RT5645_AIFS
];
int
master
[
RT5645_AIFS
];
int
pll_src
;
int
pll_in
;
int
pll_out
;
int
jack_type
;
bool
en_button_func
;
};
int
rt5645_set_jack_detect
(
struct
snd_soc_codec
*
codec
,
struct
snd_soc_jack
*
hp_jack
,
struct
snd_soc_jack
*
mic_jack
,
struct
snd_soc_jack
*
btn_jack
);
...
...
sound/soc/codecs/tas571x.c
浏览文件 @
cb42e0f7
...
...
@@ -179,7 +179,7 @@ static int tas571x_set_bias_level(struct snd_soc_codec *codec,
case
SND_SOC_BIAS_PREPARE
:
break
;
case
SND_SOC_BIAS_STANDBY
:
if
(
codec
->
dapm
.
bias_level
==
SND_SOC_BIAS_OFF
)
{
if
(
snd_soc_codec_get_bias_level
(
codec
)
==
SND_SOC_BIAS_OFF
)
{
if
(
!
IS_ERR
(
priv
->
mclk
))
{
ret
=
clk_prepare_enable
(
priv
->
mclk
);
if
(
ret
)
{
...
...
sound/soc/intel/boards/cht_bsw_max98090_ti.c
浏览文件 @
cb42e0f7
...
...
@@ -104,21 +104,17 @@ static int cht_aif1_hw_params(struct snd_pcm_substream *substream,
static
int
cht_ti_jack_event
(
struct
notifier_block
*
nb
,
unsigned
long
event
,
void
*
data
)
{
struct
snd_soc_jack
*
jack
=
(
struct
snd_soc_jack
*
)
data
;
struct
snd_soc_dai
*
codec_dai
=
jack
->
card
->
rtd
->
codec_dai
;
struct
snd_soc_codec
*
codec
=
codec_dai
->
codec
;
struct
snd_soc_dapm_context
*
dapm
=
&
jack
->
card
->
dapm
;
if
(
event
&
SND_JACK_MICROPHONE
)
{
snd_soc_dapm_force_enable_pin
(
&
codec
->
dapm
,
"SHDN"
);
snd_soc_dapm_force_enable_pin
(
&
codec
->
dapm
,
"MICBIAS"
);
snd_soc_dapm_sync
(
&
codec
->
dapm
);
snd_soc_dapm_force_enable_pin
(
dapm
,
"SHDN"
);
snd_soc_dapm_force_enable_pin
(
dapm
,
"MICBIAS"
);
snd_soc_dapm_sync
(
dapm
);
}
else
{
snd_soc_dapm_disable_pin
(
&
codec
->
dapm
,
"MICBIAS"
);
snd_soc_dapm_disable_pin
(
&
codec
->
dapm
,
"SHDN"
);
snd_soc_dapm_sync
(
&
codec
->
dapm
);
snd_soc_dapm_disable_pin
(
dapm
,
"MICBIAS"
);
snd_soc_dapm_disable_pin
(
dapm
,
"SHDN"
);
snd_soc_dapm_sync
(
dapm
);
}
return
0
;
...
...
sound/soc/omap/omap3pandora.c
浏览文件 @
cb42e0f7
...
...
@@ -154,8 +154,7 @@ static const struct snd_soc_dapm_route omap3pandora_map[] = {
static
int
omap3pandora_out_init
(
struct
snd_soc_pcm_runtime
*
rtd
)
{
struct
snd_soc_codec
*
codec
=
rtd
->
codec
;
struct
snd_soc_dapm_context
*
dapm
=
&
codec
->
dapm
;
struct
snd_soc_dapm_context
*
dapm
=
&
rtd
->
card
->
dapm
;
/* All TWL4030 output pins are floating */
snd_soc_dapm_nc_pin
(
dapm
,
"EARPIECE"
);
...
...
@@ -174,8 +173,7 @@ static int omap3pandora_out_init(struct snd_soc_pcm_runtime *rtd)
static
int
omap3pandora_in_init
(
struct
snd_soc_pcm_runtime
*
rtd
)
{
struct
snd_soc_codec
*
codec
=
rtd
->
codec
;
struct
snd_soc_dapm_context
*
dapm
=
&
codec
->
dapm
;
struct
snd_soc_dapm_context
*
dapm
=
&
rtd
->
card
->
dapm
;
/* Not comnnected */
snd_soc_dapm_nc_pin
(
dapm
,
"HSMIC"
);
...
...
sound/soc/soc-core.c
浏览文件 @
cb42e0f7
...
...
@@ -654,10 +654,12 @@ int snd_soc_suspend(struct device *dev)
/* suspend all CODECs */
list_for_each_entry
(
codec
,
&
card
->
codec_dev_list
,
card_list
)
{
struct
snd_soc_dapm_context
*
dapm
=
snd_soc_codec_get_dapm
(
codec
);
/* If there are paths active then the CODEC will be held with
* bias _ON and should not be suspended. */
if
(
!
codec
->
suspended
)
{
switch
(
codec
->
dapm
.
bias_level
)
{
switch
(
snd_soc_dapm_get_bias_level
(
dapm
)
)
{
case
SND_SOC_BIAS_STANDBY
:
/*
* If the CODEC is capable of idle
...
...
@@ -665,7 +667,7 @@ int snd_soc_suspend(struct device *dev)
* means it's doing something,
* otherwise fall through.
*/
if
(
codec
->
dapm
.
idle_bias_off
)
{
if
(
dapm
->
idle_bias_off
)
{
dev_dbg
(
codec
->
dev
,
"ASoC: idle_bias_off CODEC on over suspend
\n
"
);
break
;
...
...
@@ -2662,10 +2664,7 @@ static int snd_soc_component_initialize(struct snd_soc_component *component,
component
->
probe
=
component
->
driver
->
probe
;
component
->
remove
=
component
->
driver
->
remove
;
if
(
!
component
->
dapm_ptr
)
component
->
dapm_ptr
=
&
component
->
dapm
;
dapm
=
component
->
dapm_ptr
;
dapm
=
&
component
->
dapm
;
dapm
->
dev
=
dev
;
dapm
->
component
=
component
;
dapm
->
bias_level
=
SND_SOC_BIAS_OFF
;
...
...
@@ -3047,6 +3046,7 @@ int snd_soc_register_codec(struct device *dev,
struct
snd_soc_dai_driver
*
dai_drv
,
int
num_dai
)
{
struct
snd_soc_dapm_context
*
dapm
;
struct
snd_soc_codec
*
codec
;
struct
snd_soc_dai
*
dai
;
int
ret
,
i
;
...
...
@@ -3057,7 +3057,6 @@ int snd_soc_register_codec(struct device *dev,
if
(
codec
==
NULL
)
return
-
ENOMEM
;
codec
->
component
.
dapm_ptr
=
&
codec
->
dapm
;
codec
->
component
.
codec
=
codec
;
ret
=
snd_soc_component_initialize
(
&
codec
->
component
,
...
...
@@ -3087,12 +3086,14 @@ int snd_soc_register_codec(struct device *dev,
if
(
codec_drv
->
read
)
codec
->
component
.
read
=
snd_soc_codec_drv_read
;
codec
->
component
.
ignore_pmdown_time
=
codec_drv
->
ignore_pmdown_time
;
codec
->
dapm
.
idle_bias_off
=
codec_drv
->
idle_bias_off
;
codec
->
dapm
.
suspend_bias_off
=
codec_drv
->
suspend_bias_off
;
dapm
=
snd_soc_codec_get_dapm
(
codec
);
dapm
->
idle_bias_off
=
codec_drv
->
idle_bias_off
;
dapm
->
suspend_bias_off
=
codec_drv
->
suspend_bias_off
;
if
(
codec_drv
->
seq_notifier
)
codec
->
dapm
.
seq_notifier
=
codec_drv
->
seq_notifier
;
dapm
->
seq_notifier
=
codec_drv
->
seq_notifier
;
if
(
codec_drv
->
set_bias_level
)
codec
->
dapm
.
set_bias_level
=
snd_soc_codec_set_bias_level
;
dapm
->
set_bias_level
=
snd_soc_codec_set_bias_level
;
codec
->
dev
=
dev
;
codec
->
driver
=
codec_drv
;
codec
->
component
.
val_bytes
=
codec_drv
->
reg_word_size
;
...
...
sound/soc/soc-dapm.c
浏览文件 @
cb42e0f7
...
...
@@ -2163,14 +2163,16 @@ int snd_soc_dapm_mixer_update_power(struct snd_soc_dapm_context *dapm,
}
EXPORT_SYMBOL_GPL
(
snd_soc_dapm_mixer_update_power
);
static
ssize_t
dapm_widget_show_codec
(
struct
snd_soc_codec
*
codec
,
char
*
buf
)
static
ssize_t
dapm_widget_show_component
(
struct
snd_soc_component
*
cmpnt
,
char
*
buf
)
{
struct
snd_soc_dapm_context
*
dapm
=
snd_soc_component_get_dapm
(
cmpnt
);
struct
snd_soc_dapm_widget
*
w
;
int
count
=
0
;
char
*
state
=
"not set"
;
list_for_each_entry
(
w
,
&
c
odec
->
component
.
card
->
widgets
,
list
)
{
if
(
w
->
dapm
!=
&
codec
->
dapm
)
list_for_each_entry
(
w
,
&
c
mpnt
->
card
->
widgets
,
list
)
{
if
(
w
->
dapm
!=
dapm
)
continue
;
/* only display widgets that burnm power */
...
...
@@ -2198,7 +2200,7 @@ static ssize_t dapm_widget_show_codec(struct snd_soc_codec *codec, char *buf)
}
}
switch
(
codec
->
dapm
.
bias_level
)
{
switch
(
snd_soc_dapm_get_bias_level
(
dapm
)
)
{
case
SND_SOC_BIAS_ON
:
state
=
"On"
;
break
;
...
...
@@ -2227,8 +2229,9 @@ static ssize_t dapm_widget_show(struct device *dev,
mutex_lock
(
&
rtd
->
card
->
dapm_mutex
);
for
(
i
=
0
;
i
<
rtd
->
num_codecs
;
i
++
)
{
struct
snd_soc_codec
*
codec
=
rtd
->
codec_dais
[
i
]
->
codec
;
count
+=
dapm_widget_show_codec
(
codec
,
buf
+
count
);
struct
snd_soc_component
*
cmpnt
=
rtd
->
codec_dais
[
i
]
->
component
;
count
+=
dapm_widget_show_component
(
cmpnt
,
buf
+
count
);
}
mutex_unlock
(
&
rtd
->
card
->
dapm_mutex
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录