Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a0334c50
K
Kernel
项目概览
openeuler
/
Kernel
大约 1 年 前同步成功
通知
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,发现更多精彩内容 >>
提交
a0334c50
编写于
4月 01, 2011
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fix/asoc' into for-linus
上级
12ff414e
f8852b12
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
39 addition
and
27 deletion
+39
-27
include/sound/soc-dapm.h
include/sound/soc-dapm.h
+8
-8
sound/soc/codecs/tlv320dac33.c
sound/soc/codecs/tlv320dac33.c
+20
-12
sound/soc/codecs/twl6040.c
sound/soc/codecs/twl6040.c
+3
-1
sound/soc/imx/imx-pcm-dma-mx2.c
sound/soc/imx/imx-pcm-dma-mx2.c
+7
-2
sound/soc/imx/imx-ssi.h
sound/soc/imx/imx-ssi.h
+0
-3
sound/soc/pxa/corgi.c
sound/soc/pxa/corgi.c
+1
-1
未找到文件。
include/sound/soc-dapm.h
浏览文件 @
a0334c50
...
@@ -45,25 +45,25 @@
...
@@ -45,25 +45,25 @@
/* platform domain */
/* platform domain */
#define SND_SOC_DAPM_INPUT(wname) \
#define SND_SOC_DAPM_INPUT(wname) \
{ .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \
{ .id = snd_soc_dapm_input, .name = wname, .kcontrols = NULL, \
.num_kcontrols = 0}
.num_kcontrols = 0
, .reg = SND_SOC_NOPM
}
#define SND_SOC_DAPM_OUTPUT(wname) \
#define SND_SOC_DAPM_OUTPUT(wname) \
{ .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \
{ .id = snd_soc_dapm_output, .name = wname, .kcontrols = NULL, \
.num_kcontrols = 0}
.num_kcontrols = 0
, .reg = SND_SOC_NOPM
}
#define SND_SOC_DAPM_MIC(wname, wevent) \
#define SND_SOC_DAPM_MIC(wname, wevent) \
{ .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \
{ .id = snd_soc_dapm_mic, .name = wname, .kcontrols = NULL, \
.num_kcontrols = 0, .event = wevent, \
.num_kcontrols = 0, .
reg = SND_SOC_NOPM, .
event = wevent, \
.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD}
.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_POST_PMD}
#define SND_SOC_DAPM_HP(wname, wevent) \
#define SND_SOC_DAPM_HP(wname, wevent) \
{ .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \
{ .id = snd_soc_dapm_hp, .name = wname, .kcontrols = NULL, \
.num_kcontrols = 0, .event = wevent, \
.num_kcontrols = 0, .
reg = SND_SOC_NOPM, .
event = wevent, \
.event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}
.event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}
#define SND_SOC_DAPM_SPK(wname, wevent) \
#define SND_SOC_DAPM_SPK(wname, wevent) \
{ .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \
{ .id = snd_soc_dapm_spk, .name = wname, .kcontrols = NULL, \
.num_kcontrols = 0, .event = wevent, \
.num_kcontrols = 0, .
reg = SND_SOC_NOPM, .
event = wevent, \
.event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}
.event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}
#define SND_SOC_DAPM_LINE(wname, wevent) \
#define SND_SOC_DAPM_LINE(wname, wevent) \
{ .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \
{ .id = snd_soc_dapm_line, .name = wname, .kcontrols = NULL, \
.num_kcontrols = 0, .event = wevent, \
.num_kcontrols = 0, .
reg = SND_SOC_NOPM, .
event = wevent, \
.event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}
.event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_PRE_PMD}
/* path domain */
/* path domain */
...
@@ -189,11 +189,11 @@
...
@@ -189,11 +189,11 @@
/* events that are pre and post DAPM */
/* events that are pre and post DAPM */
#define SND_SOC_DAPM_PRE(wname, wevent) \
#define SND_SOC_DAPM_PRE(wname, wevent) \
{ .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \
{ .id = snd_soc_dapm_pre, .name = wname, .kcontrols = NULL, \
.num_kcontrols = 0, .event = wevent, \
.num_kcontrols = 0, .
reg = SND_SOC_NOPM, .
event = wevent, \
.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD}
.event_flags = SND_SOC_DAPM_PRE_PMU | SND_SOC_DAPM_PRE_PMD}
#define SND_SOC_DAPM_POST(wname, wevent) \
#define SND_SOC_DAPM_POST(wname, wevent) \
{ .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \
{ .id = snd_soc_dapm_post, .name = wname, .kcontrols = NULL, \
.num_kcontrols = 0, .event = wevent, \
.num_kcontrols = 0, .
reg = SND_SOC_NOPM, .
event = wevent, \
.event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD}
.event_flags = SND_SOC_DAPM_POST_PMU | SND_SOC_DAPM_POST_PMD}
/* stream domain */
/* stream domain */
...
...
sound/soc/codecs/tlv320dac33.c
浏览文件 @
a0334c50
...
@@ -324,6 +324,10 @@ static void dac33_init_chip(struct snd_soc_codec *codec)
...
@@ -324,6 +324,10 @@ static void dac33_init_chip(struct snd_soc_codec *codec)
dac33_write
(
codec
,
DAC33_OUT_AMP_CTRL
,
dac33_write
(
codec
,
DAC33_OUT_AMP_CTRL
,
dac33_read_reg_cache
(
codec
,
DAC33_OUT_AMP_CTRL
));
dac33_read_reg_cache
(
codec
,
DAC33_OUT_AMP_CTRL
));
dac33_write
(
codec
,
DAC33_LDAC_PWR_CTRL
,
dac33_read_reg_cache
(
codec
,
DAC33_LDAC_PWR_CTRL
));
dac33_write
(
codec
,
DAC33_RDAC_PWR_CTRL
,
dac33_read_reg_cache
(
codec
,
DAC33_RDAC_PWR_CTRL
));
}
}
static
inline
int
dac33_read_id
(
struct
snd_soc_codec
*
codec
)
static
inline
int
dac33_read_id
(
struct
snd_soc_codec
*
codec
)
...
@@ -670,6 +674,7 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
...
@@ -670,6 +674,7 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
{
{
struct
snd_soc_codec
*
codec
=
dac33
->
codec
;
struct
snd_soc_codec
*
codec
=
dac33
->
codec
;
unsigned
int
delay
;
unsigned
int
delay
;
unsigned
long
flags
;
switch
(
dac33
->
fifo_mode
)
{
switch
(
dac33
->
fifo_mode
)
{
case
DAC33_FIFO_MODE1
:
case
DAC33_FIFO_MODE1
:
...
@@ -677,10 +682,10 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
...
@@ -677,10 +682,10 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
DAC33_THRREG
(
dac33
->
nsample
));
DAC33_THRREG
(
dac33
->
nsample
));
/* Take the timestamps */
/* Take the timestamps */
spin_lock_irq
(
&
dac33
->
lock
);
spin_lock_irq
save
(
&
dac33
->
lock
,
flags
);
dac33
->
t_stamp2
=
ktime_to_us
(
ktime_get
());
dac33
->
t_stamp2
=
ktime_to_us
(
ktime_get
());
dac33
->
t_stamp1
=
dac33
->
t_stamp2
;
dac33
->
t_stamp1
=
dac33
->
t_stamp2
;
spin_unlock_irq
(
&
dac33
->
lock
);
spin_unlock_irq
restore
(
&
dac33
->
lock
,
flags
);
dac33_write16
(
codec
,
DAC33_PREFILL_MSB
,
dac33_write16
(
codec
,
DAC33_PREFILL_MSB
,
DAC33_THRREG
(
dac33
->
alarm_threshold
));
DAC33_THRREG
(
dac33
->
alarm_threshold
));
...
@@ -692,11 +697,11 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
...
@@ -692,11 +697,11 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
break
;
break
;
case
DAC33_FIFO_MODE7
:
case
DAC33_FIFO_MODE7
:
/* Take the timestamp */
/* Take the timestamp */
spin_lock_irq
(
&
dac33
->
lock
);
spin_lock_irq
save
(
&
dac33
->
lock
,
flags
);
dac33
->
t_stamp1
=
ktime_to_us
(
ktime_get
());
dac33
->
t_stamp1
=
ktime_to_us
(
ktime_get
());
/* Move back the timestamp with drain time */
/* Move back the timestamp with drain time */
dac33
->
t_stamp1
-=
dac33
->
mode7_us_to_lthr
;
dac33
->
t_stamp1
-=
dac33
->
mode7_us_to_lthr
;
spin_unlock_irq
(
&
dac33
->
lock
);
spin_unlock_irq
restore
(
&
dac33
->
lock
,
flags
);
dac33_write16
(
codec
,
DAC33_PREFILL_MSB
,
dac33_write16
(
codec
,
DAC33_PREFILL_MSB
,
DAC33_THRREG
(
DAC33_MODE7_MARGIN
));
DAC33_THRREG
(
DAC33_MODE7_MARGIN
));
...
@@ -714,13 +719,14 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
...
@@ -714,13 +719,14 @@ static inline void dac33_prefill_handler(struct tlv320dac33_priv *dac33)
static
inline
void
dac33_playback_handler
(
struct
tlv320dac33_priv
*
dac33
)
static
inline
void
dac33_playback_handler
(
struct
tlv320dac33_priv
*
dac33
)
{
{
struct
snd_soc_codec
*
codec
=
dac33
->
codec
;
struct
snd_soc_codec
*
codec
=
dac33
->
codec
;
unsigned
long
flags
;
switch
(
dac33
->
fifo_mode
)
{
switch
(
dac33
->
fifo_mode
)
{
case
DAC33_FIFO_MODE1
:
case
DAC33_FIFO_MODE1
:
/* Take the timestamp */
/* Take the timestamp */
spin_lock_irq
(
&
dac33
->
lock
);
spin_lock_irq
save
(
&
dac33
->
lock
,
flags
);
dac33
->
t_stamp2
=
ktime_to_us
(
ktime_get
());
dac33
->
t_stamp2
=
ktime_to_us
(
ktime_get
());
spin_unlock_irq
(
&
dac33
->
lock
);
spin_unlock_irq
restore
(
&
dac33
->
lock
,
flags
);
dac33_write16
(
codec
,
DAC33_NSAMPLE_MSB
,
dac33_write16
(
codec
,
DAC33_NSAMPLE_MSB
,
DAC33_THRREG
(
dac33
->
nsample
));
DAC33_THRREG
(
dac33
->
nsample
));
...
@@ -773,10 +779,11 @@ static irqreturn_t dac33_interrupt_handler(int irq, void *dev)
...
@@ -773,10 +779,11 @@ static irqreturn_t dac33_interrupt_handler(int irq, void *dev)
{
{
struct
snd_soc_codec
*
codec
=
dev
;
struct
snd_soc_codec
*
codec
=
dev
;
struct
tlv320dac33_priv
*
dac33
=
snd_soc_codec_get_drvdata
(
codec
);
struct
tlv320dac33_priv
*
dac33
=
snd_soc_codec_get_drvdata
(
codec
);
unsigned
long
flags
;
spin_lock
(
&
dac33
->
lock
);
spin_lock
_irqsave
(
&
dac33
->
lock
,
flags
);
dac33
->
t_stamp1
=
ktime_to_us
(
ktime_get
());
dac33
->
t_stamp1
=
ktime_to_us
(
ktime_get
());
spin_unlock
(
&
dac33
->
lock
);
spin_unlock
_irqrestore
(
&
dac33
->
lock
,
flags
);
/* Do not schedule the workqueue in Mode7 */
/* Do not schedule the workqueue in Mode7 */
if
(
dac33
->
fifo_mode
!=
DAC33_FIFO_MODE7
)
if
(
dac33
->
fifo_mode
!=
DAC33_FIFO_MODE7
)
...
@@ -1173,15 +1180,16 @@ static snd_pcm_sframes_t dac33_dai_delay(
...
@@ -1173,15 +1180,16 @@ static snd_pcm_sframes_t dac33_dai_delay(
unsigned
int
time_delta
,
uthr
;
unsigned
int
time_delta
,
uthr
;
int
samples_out
,
samples_in
,
samples
;
int
samples_out
,
samples_in
,
samples
;
snd_pcm_sframes_t
delay
=
0
;
snd_pcm_sframes_t
delay
=
0
;
unsigned
long
flags
;
switch
(
dac33
->
fifo_mode
)
{
switch
(
dac33
->
fifo_mode
)
{
case
DAC33_FIFO_BYPASS
:
case
DAC33_FIFO_BYPASS
:
break
;
break
;
case
DAC33_FIFO_MODE1
:
case
DAC33_FIFO_MODE1
:
spin_lock
(
&
dac33
->
lock
);
spin_lock
_irqsave
(
&
dac33
->
lock
,
flags
);
t0
=
dac33
->
t_stamp1
;
t0
=
dac33
->
t_stamp1
;
t1
=
dac33
->
t_stamp2
;
t1
=
dac33
->
t_stamp2
;
spin_unlock
(
&
dac33
->
lock
);
spin_unlock
_irqrestore
(
&
dac33
->
lock
,
flags
);
t_now
=
ktime_to_us
(
ktime_get
());
t_now
=
ktime_to_us
(
ktime_get
());
/* We have not started to fill the FIFO yet, delay is 0 */
/* We have not started to fill the FIFO yet, delay is 0 */
...
@@ -1246,10 +1254,10 @@ static snd_pcm_sframes_t dac33_dai_delay(
...
@@ -1246,10 +1254,10 @@ static snd_pcm_sframes_t dac33_dai_delay(
}
}
break
;
break
;
case
DAC33_FIFO_MODE7
:
case
DAC33_FIFO_MODE7
:
spin_lock
(
&
dac33
->
lock
);
spin_lock
_irqsave
(
&
dac33
->
lock
,
flags
);
t0
=
dac33
->
t_stamp1
;
t0
=
dac33
->
t_stamp1
;
uthr
=
dac33
->
uthr
;
uthr
=
dac33
->
uthr
;
spin_unlock
(
&
dac33
->
lock
);
spin_unlock
_irqrestore
(
&
dac33
->
lock
,
flags
);
t_now
=
ktime_to_us
(
ktime_get
());
t_now
=
ktime_to_us
(
ktime_get
());
/* We have not started to fill the FIFO yet, delay is 0 */
/* We have not started to fill the FIFO yet, delay is 0 */
...
...
sound/soc/codecs/twl6040.c
浏览文件 @
a0334c50
...
@@ -1629,8 +1629,10 @@ static int twl6040_probe(struct snd_soc_codec *codec)
...
@@ -1629,8 +1629,10 @@ static int twl6040_probe(struct snd_soc_codec *codec)
priv
->
naudint
=
naudint
;
priv
->
naudint
=
naudint
;
priv
->
workqueue
=
create_singlethread_workqueue
(
"twl6040-codec"
);
priv
->
workqueue
=
create_singlethread_workqueue
(
"twl6040-codec"
);
if
(
!
priv
->
workqueue
)
if
(
!
priv
->
workqueue
)
{
ret
=
-
ENOMEM
;
goto
work_err
;
goto
work_err
;
}
INIT_DELAYED_WORK
(
&
priv
->
delayed_work
,
twl6040_accessory_work
);
INIT_DELAYED_WORK
(
&
priv
->
delayed_work
,
twl6040_accessory_work
);
...
...
sound/soc/imx/imx-pcm-dma-mx2.c
浏览文件 @
a0334c50
...
@@ -110,12 +110,12 @@ static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream,
...
@@ -110,12 +110,12 @@ static int imx_ssi_dma_alloc(struct snd_pcm_substream *substream,
slave_config
.
direction
=
DMA_TO_DEVICE
;
slave_config
.
direction
=
DMA_TO_DEVICE
;
slave_config
.
dst_addr
=
dma_params
->
dma_addr
;
slave_config
.
dst_addr
=
dma_params
->
dma_addr
;
slave_config
.
dst_addr_width
=
buswidth
;
slave_config
.
dst_addr_width
=
buswidth
;
slave_config
.
dst_maxburst
=
dma_params
->
burstsize
;
slave_config
.
dst_maxburst
=
dma_params
->
burstsize
*
buswidth
;
}
else
{
}
else
{
slave_config
.
direction
=
DMA_FROM_DEVICE
;
slave_config
.
direction
=
DMA_FROM_DEVICE
;
slave_config
.
src_addr
=
dma_params
->
dma_addr
;
slave_config
.
src_addr
=
dma_params
->
dma_addr
;
slave_config
.
src_addr_width
=
buswidth
;
slave_config
.
src_addr_width
=
buswidth
;
slave_config
.
src_maxburst
=
dma_params
->
burstsize
;
slave_config
.
src_maxburst
=
dma_params
->
burstsize
*
buswidth
;
}
}
ret
=
dmaengine_slave_config
(
iprtd
->
dma_chan
,
&
slave_config
);
ret
=
dmaengine_slave_config
(
iprtd
->
dma_chan
,
&
slave_config
);
...
@@ -303,6 +303,11 @@ static struct snd_soc_platform_driver imx_soc_platform_mx2 = {
...
@@ -303,6 +303,11 @@ static struct snd_soc_platform_driver imx_soc_platform_mx2 = {
static
int
__devinit
imx_soc_platform_probe
(
struct
platform_device
*
pdev
)
static
int
__devinit
imx_soc_platform_probe
(
struct
platform_device
*
pdev
)
{
{
struct
imx_ssi
*
ssi
=
platform_get_drvdata
(
pdev
);
ssi
->
dma_params_tx
.
burstsize
=
6
;
ssi
->
dma_params_rx
.
burstsize
=
4
;
return
snd_soc_register_platform
(
&
pdev
->
dev
,
&
imx_soc_platform_mx2
);
return
snd_soc_register_platform
(
&
pdev
->
dev
,
&
imx_soc_platform_mx2
);
}
}
...
...
sound/soc/imx/imx-ssi.h
浏览文件 @
a0334c50
...
@@ -234,7 +234,4 @@ void imx_pcm_free(struct snd_pcm *pcm);
...
@@ -234,7 +234,4 @@ void imx_pcm_free(struct snd_pcm *pcm);
*/
*/
#define IMX_SSI_DMABUF_SIZE (64 * 1024)
#define IMX_SSI_DMABUF_SIZE (64 * 1024)
#define DMA_RXFIFO_BURST 0x4
#define DMA_TXFIFO_BURST 0x6
#endif
/* _IMX_SSI_H */
#endif
/* _IMX_SSI_H */
sound/soc/pxa/corgi.c
浏览文件 @
a0334c50
...
@@ -310,7 +310,7 @@ static struct snd_soc_dai_link corgi_dai = {
...
@@ -310,7 +310,7 @@ static struct snd_soc_dai_link corgi_dai = {
.
cpu_dai_name
=
"pxa2xx-i2s"
,
.
cpu_dai_name
=
"pxa2xx-i2s"
,
.
codec_dai_name
=
"wm8731-hifi"
,
.
codec_dai_name
=
"wm8731-hifi"
,
.
platform_name
=
"pxa-pcm-audio"
,
.
platform_name
=
"pxa-pcm-audio"
,
.
codec_name
=
"wm8731-codec
-0.
001b"
,
.
codec_name
=
"wm8731-codec
.0-
001b"
,
.
init
=
corgi_wm8731_init
,
.
init
=
corgi_wm8731_init
,
.
ops
=
&
corgi_ops
,
.
ops
=
&
corgi_ops
,
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录