Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
636f7858
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
636f7858
编写于
7月 26, 2011
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/asoc' into for-linus
上级
56487c27
a0c27ab2
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
86 addition
and
47 deletion
+86
-47
include/sound/soc-dapm.h
include/sound/soc-dapm.h
+6
-0
sound/soc/codecs/sgtl5000.c
sound/soc/codecs/sgtl5000.c
+32
-38
sound/soc/codecs/wm8962.c
sound/soc/codecs/wm8962.c
+3
-3
sound/soc/davinci/davinci-vcif.c
sound/soc/davinci/davinci-vcif.c
+5
-4
sound/soc/samsung/i2s.c
sound/soc/samsung/i2s.c
+7
-0
sound/soc/soc-core.c
sound/soc/soc-core.c
+3
-2
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+30
-0
未找到文件。
include/sound/soc-dapm.h
浏览文件 @
636f7858
...
...
@@ -266,6 +266,12 @@
.get = snd_soc_dapm_get_enum_virt, \
.put = snd_soc_dapm_put_enum_virt, \
.private_value = (unsigned long)&xenum }
#define SOC_DAPM_ENUM_EXT(xname, xenum, xget, xput) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.info = snd_soc_info_enum_double, \
.get = xget, \
.put = xput, \
.private_value = (unsigned long)&xenum }
#define SOC_DAPM_VALUE_ENUM(xname, xenum) \
{ .iface = SNDRV_CTL_ELEM_IFACE_MIXER, .name = xname, \
.info = snd_soc_info_enum_double, \
...
...
sound/soc/codecs/sgtl5000.c
浏览文件 @
636f7858
...
...
@@ -907,6 +907,7 @@ static int ldo_regulator_register(struct snd_soc_codec *codec,
struct
regulator_init_data
*
init_data
,
int
voltage
)
{
dev_err
(
codec
->
dev
,
"this setup needs regulator support in the kernel
\n
"
);
return
-
EINVAL
;
}
...
...
@@ -1218,6 +1219,34 @@ static int sgtl5000_set_power_regs(struct snd_soc_codec *codec)
return
0
;
}
static
int
sgtl5000_replace_vddd_with_ldo
(
struct
snd_soc_codec
*
codec
)
{
struct
sgtl5000_priv
*
sgtl5000
=
snd_soc_codec_get_drvdata
(
codec
);
int
ret
;
/* set internal ldo to 1.2v */
ret
=
ldo_regulator_register
(
codec
,
&
ldo_init_data
,
LDO_VOLTAGE
);
if
(
ret
)
{
dev_err
(
codec
->
dev
,
"Failed to register vddd internal supplies: %d
\n
"
,
ret
);
return
ret
;
}
sgtl5000
->
supplies
[
VDDD
].
supply
=
LDO_CONSUMER_NAME
;
ret
=
regulator_bulk_get
(
codec
->
dev
,
ARRAY_SIZE
(
sgtl5000
->
supplies
),
sgtl5000
->
supplies
);
if
(
ret
)
{
ldo_regulator_remove
(
codec
);
dev_err
(
codec
->
dev
,
"Failed to request supplies: %d
\n
"
,
ret
);
return
ret
;
}
dev_info
(
codec
->
dev
,
"Using internal LDO instead of VDDD
\n
"
);
return
0
;
}
static
int
sgtl5000_enable_regulators
(
struct
snd_soc_codec
*
codec
)
{
u16
reg
;
...
...
@@ -1235,30 +1264,9 @@ static int sgtl5000_enable_regulators(struct snd_soc_codec *codec)
if
(
!
ret
)
external_vddd
=
1
;
else
{
/* set internal ldo to 1.2v */
int
voltage
=
LDO_VOLTAGE
;
ret
=
ldo_regulator_register
(
codec
,
&
ldo_init_data
,
voltage
);
if
(
ret
)
{
dev_err
(
codec
->
dev
,
"Failed to register vddd internal supplies: %d
\n
"
,
ret
);
return
ret
;
}
sgtl5000
->
supplies
[
VDDD
].
supply
=
LDO_CONSUMER_NAME
;
ret
=
regulator_bulk_get
(
codec
->
dev
,
ARRAY_SIZE
(
sgtl5000
->
supplies
),
sgtl5000
->
supplies
);
if
(
ret
)
{
ldo_regulator_remove
(
codec
);
dev_err
(
codec
->
dev
,
"Failed to request supplies: %d
\n
"
,
ret
);
ret
=
sgtl5000_replace_vddd_with_ldo
(
codec
);
if
(
ret
)
return
ret
;
}
}
ret
=
regulator_bulk_enable
(
ARRAY_SIZE
(
sgtl5000
->
supplies
),
...
...
@@ -1287,7 +1295,6 @@ static int sgtl5000_enable_regulators(struct snd_soc_codec *codec)
* roll back to use internal LDO
*/
if
(
external_vddd
&&
rev
>=
0x11
)
{
int
voltage
=
LDO_VOLTAGE
;
/* disable all regulator first */
regulator_bulk_disable
(
ARRAY_SIZE
(
sgtl5000
->
supplies
),
sgtl5000
->
supplies
);
...
...
@@ -1295,23 +1302,10 @@ static int sgtl5000_enable_regulators(struct snd_soc_codec *codec)
regulator_bulk_free
(
ARRAY_SIZE
(
sgtl5000
->
supplies
),
sgtl5000
->
supplies
);
ret
=
ldo_regulator_register
(
codec
,
&
ldo_init_data
,
voltage
);
ret
=
sgtl5000_replace_vddd_with_ldo
(
codec
);
if
(
ret
)
return
ret
;
sgtl5000
->
supplies
[
VDDD
].
supply
=
LDO_CONSUMER_NAME
;
ret
=
regulator_bulk_get
(
codec
->
dev
,
ARRAY_SIZE
(
sgtl5000
->
supplies
),
sgtl5000
->
supplies
);
if
(
ret
)
{
ldo_regulator_remove
(
codec
);
dev_err
(
codec
->
dev
,
"Failed to request supplies: %d
\n
"
,
ret
);
return
ret
;
}
ret
=
regulator_bulk_enable
(
ARRAY_SIZE
(
sgtl5000
->
supplies
),
sgtl5000
->
supplies
);
if
(
ret
)
...
...
sound/soc/codecs/wm8962.c
浏览文件 @
636f7858
...
...
@@ -3409,6 +3409,9 @@ static irqreturn_t wm8962_irq(int irq, void *data)
active
=
snd_soc_read
(
codec
,
WM8962_INTERRUPT_STATUS_2
);
active
&=
~
mask
;
/* Acknowledge the interrupts */
snd_soc_write
(
codec
,
WM8962_INTERRUPT_STATUS_2
,
active
);
if
(
active
&
WM8962_FLL_LOCK_EINT
)
{
dev_dbg
(
codec
->
dev
,
"FLL locked
\n
"
);
complete
(
&
wm8962
->
fll_lock
);
...
...
@@ -3433,9 +3436,6 @@ static irqreturn_t wm8962_irq(int irq, void *data)
msecs_to_jiffies
(
250
));
}
/* Acknowledge the interrupts */
snd_soc_write
(
codec
,
WM8962_INTERRUPT_STATUS_2
,
active
);
return
IRQ_HANDLED
;
}
...
...
sound/soc/davinci/davinci-vcif.c
浏览文件 @
636f7858
...
...
@@ -62,9 +62,9 @@ static void davinci_vcif_start(struct snd_pcm_substream *substream)
w
=
readl
(
davinci_vc
->
base
+
DAVINCI_VC_CTRL
);
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
MOD_REG_BIT
(
w
,
DAVINCI_VC_CTRL_RSTDAC
,
1
);
MOD_REG_BIT
(
w
,
DAVINCI_VC_CTRL_RSTDAC
,
0
);
else
MOD_REG_BIT
(
w
,
DAVINCI_VC_CTRL_RSTADC
,
1
);
MOD_REG_BIT
(
w
,
DAVINCI_VC_CTRL_RSTADC
,
0
);
writel
(
w
,
davinci_vc
->
base
+
DAVINCI_VC_CTRL
);
}
...
...
@@ -80,9 +80,9 @@ static void davinci_vcif_stop(struct snd_pcm_substream *substream)
/* Reset transmitter/receiver and sample rate/frame sync generators */
w
=
readl
(
davinci_vc
->
base
+
DAVINCI_VC_CTRL
);
if
(
substream
->
stream
==
SNDRV_PCM_STREAM_PLAYBACK
)
MOD_REG_BIT
(
w
,
DAVINCI_VC_CTRL_RSTDAC
,
0
);
MOD_REG_BIT
(
w
,
DAVINCI_VC_CTRL_RSTDAC
,
1
);
else
MOD_REG_BIT
(
w
,
DAVINCI_VC_CTRL_RSTADC
,
0
);
MOD_REG_BIT
(
w
,
DAVINCI_VC_CTRL_RSTADC
,
1
);
writel
(
w
,
davinci_vc
->
base
+
DAVINCI_VC_CTRL
);
}
...
...
@@ -159,6 +159,7 @@ static int davinci_vcif_trigger(struct snd_pcm_substream *substream, int cmd,
case
SNDRV_PCM_TRIGGER_RESUME
:
case
SNDRV_PCM_TRIGGER_PAUSE_RELEASE
:
davinci_vcif_start
(
substream
);
break
;
case
SNDRV_PCM_TRIGGER_STOP
:
case
SNDRV_PCM_TRIGGER_SUSPEND
:
case
SNDRV_PCM_TRIGGER_PAUSE_PUSH
:
...
...
sound/soc/samsung/i2s.c
浏览文件 @
636f7858
...
...
@@ -21,6 +21,7 @@
#include <plat/audio.h>
#include "dma.h"
#include "idma.h"
#include "i2s.h"
#include "i2s-regs.h"
...
...
@@ -60,6 +61,7 @@ struct i2s_dai {
/* DMA parameters */
struct
s3c_dma_params
dma_playback
;
struct
s3c_dma_params
dma_capture
;
struct
s3c_dma_params
idma_playback
;
u32
quirks
;
u32
suspend_i2smod
;
u32
suspend_i2scon
;
...
...
@@ -877,6 +879,10 @@ static int samsung_i2s_dai_probe(struct snd_soc_dai *dai)
if
(
i2s
->
quirks
&
QUIRK_NEED_RSTCLR
)
writel
(
CON_RSTCLR
,
i2s
->
addr
+
I2SCON
);
if
(
i2s
->
quirks
&
QUIRK_SEC_DAI
)
idma_reg_addr_init
((
void
*
)
i2s
->
addr
,
i2s
->
sec_dai
->
idma_playback
.
dma_addr
);
probe_exit:
/* Reset any constraint on RFS and BFS */
i2s
->
rfs
=
0
;
...
...
@@ -1077,6 +1083,7 @@ static __devinit int samsung_i2s_probe(struct platform_device *pdev)
sec_dai
->
dma_playback
.
dma_size
=
4
;
sec_dai
->
base
=
regs_base
;
sec_dai
->
quirks
=
quirks
;
sec_dai
->
idma_playback
.
dma_addr
=
i2s_cfg
->
idma_addr
;
sec_dai
->
pri_dai
=
pri_dai
;
pri_dai
->
sec_dai
=
sec_dai
;
}
...
...
sound/soc/soc-core.c
浏览文件 @
636f7858
...
...
@@ -577,6 +577,7 @@ int snd_soc_suspend(struct device *dev)
case
SND_SOC_BIAS_OFF
:
codec
->
driver
->
suspend
(
codec
,
PMSG_SUSPEND
);
codec
->
suspended
=
1
;
codec
->
cache_sync
=
1
;
break
;
default:
dev_dbg
(
codec
->
dev
,
"CODEC is on over suspend
\n
"
);
...
...
@@ -1140,7 +1141,7 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num, int order)
}
}
cpu_dai
->
probed
=
1
;
/* mark cpu_dai as probed and add to card
cpu_
dai list */
/* mark cpu_dai as probed and add to card dai list */
list_add
(
&
cpu_dai
->
card_list
,
&
card
->
dai_dev_list
);
}
...
...
@@ -1171,7 +1172,7 @@ static int soc_probe_dai_link(struct snd_soc_card *card, int num, int order)
}
}
/* mark c
pu_dai as probed and add to card cpu_
dai list */
/* mark c
odec_dai as probed and add to card
dai list */
codec_dai
->
probed
=
1
;
list_add
(
&
codec_dai
->
card_list
,
&
card
->
dai_dev_list
);
}
...
...
sound/soc/soc-dapm.c
浏览文件 @
636f7858
...
...
@@ -124,6 +124,36 @@ static inline struct snd_soc_dapm_widget *dapm_cnew_widget(
return
kmemdup
(
_widget
,
sizeof
(
*
_widget
),
GFP_KERNEL
);
}
/* get snd_card from DAPM context */
static
inline
struct
snd_card
*
dapm_get_snd_card
(
struct
snd_soc_dapm_context
*
dapm
)
{
if
(
dapm
->
codec
)
return
dapm
->
codec
->
card
->
snd_card
;
else
if
(
dapm
->
platform
)
return
dapm
->
platform
->
card
->
snd_card
;
else
BUG
();
/* unreachable */
return
NULL
;
}
/* get soc_card from DAPM context */
static
inline
struct
snd_soc_card
*
dapm_get_soc_card
(
struct
snd_soc_dapm_context
*
dapm
)
{
if
(
dapm
->
codec
)
return
dapm
->
codec
->
card
;
else
if
(
dapm
->
platform
)
return
dapm
->
platform
->
card
;
else
BUG
();
/* unreachable */
return
NULL
;
}
static
int
soc_widget_read
(
struct
snd_soc_dapm_widget
*
w
,
int
reg
)
{
if
(
w
->
codec
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录