Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
d6b24507
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
163
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
d6b24507
编写于
1月 11, 2012
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-3.3' of
git://git.kernel.org/pub/scm/linux/kernel/git/lrg/asoc
into topic/asoc
上级
7a748e43
e48b46ba
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
86 addition
and
7 deletion
+86
-7
sound/soc/codecs/cx20442.c
sound/soc/codecs/cx20442.c
+46
-2
sound/soc/codecs/twl6040.c
sound/soc/codecs/twl6040.c
+23
-0
sound/soc/codecs/twl6040.h
sound/soc/codecs/twl6040.h
+1
-0
sound/soc/omap/am3517evm.c
sound/soc/omap/am3517evm.c
+1
-0
sound/soc/omap/ams-delta.c
sound/soc/omap/ams-delta.c
+4
-5
sound/soc/omap/igep0020.c
sound/soc/omap/igep0020.c
+1
-0
sound/soc/omap/n810.c
sound/soc/omap/n810.c
+1
-0
sound/soc/omap/omap3evm.c
sound/soc/omap/omap3evm.c
+1
-0
sound/soc/omap/omap3pandora.c
sound/soc/omap/omap3pandora.c
+1
-0
sound/soc/omap/omap4-hdmi-card.c
sound/soc/omap/omap4-hdmi-card.c
+1
-0
sound/soc/omap/osk5912.c
sound/soc/omap/osk5912.c
+1
-0
sound/soc/omap/overo.c
sound/soc/omap/overo.c
+1
-0
sound/soc/omap/rx51.c
sound/soc/omap/rx51.c
+1
-0
sound/soc/omap/sdp3430.c
sound/soc/omap/sdp3430.c
+1
-0
sound/soc/omap/sdp4430.c
sound/soc/omap/sdp4430.c
+1
-0
sound/soc/omap/zoom2.c
sound/soc/omap/zoom2.c
+1
-0
未找到文件。
sound/soc/codecs/cx20442.c
浏览文件 @
d6b24507
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
#include <linux/tty.h>
#include <linux/tty.h>
#include <linux/slab.h>
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/module.h>
#include <linux/regulator/consumer.h>
#include <sound/core.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/initval.h>
...
@@ -25,8 +26,8 @@
...
@@ -25,8 +26,8 @@
struct
cx20442_priv
{
struct
cx20442_priv
{
enum
snd_soc_control_type
control_type
;
void
*
control_data
;
void
*
control_data
;
struct
regulator
*
por
;
};
};
#define CX20442_PM 0x0
#define CX20442_PM 0x0
...
@@ -324,6 +325,38 @@ static struct snd_soc_dai_driver cx20442_dai = {
...
@@ -324,6 +325,38 @@ static struct snd_soc_dai_driver cx20442_dai = {
},
},
};
};
static
int
cx20442_set_bias_level
(
struct
snd_soc_codec
*
codec
,
enum
snd_soc_bias_level
level
)
{
struct
cx20442_priv
*
cx20442
=
snd_soc_codec_get_drvdata
(
codec
);
int
err
=
0
;
switch
(
level
)
{
case
SND_SOC_BIAS_PREPARE
:
if
(
codec
->
dapm
.
bias_level
!=
SND_SOC_BIAS_STANDBY
)
break
;
if
(
IS_ERR
(
cx20442
->
por
))
err
=
PTR_ERR
(
cx20442
->
por
);
else
err
=
regulator_enable
(
cx20442
->
por
);
break
;
case
SND_SOC_BIAS_STANDBY
:
if
(
codec
->
dapm
.
bias_level
!=
SND_SOC_BIAS_PREPARE
)
break
;
if
(
IS_ERR
(
cx20442
->
por
))
err
=
PTR_ERR
(
cx20442
->
por
);
else
err
=
regulator_disable
(
cx20442
->
por
);
break
;
default:
break
;
}
if
(
!
err
)
codec
->
dapm
.
bias_level
=
level
;
return
err
;
}
static
int
cx20442_codec_probe
(
struct
snd_soc_codec
*
codec
)
static
int
cx20442_codec_probe
(
struct
snd_soc_codec
*
codec
)
{
{
struct
cx20442_priv
*
cx20442
;
struct
cx20442_priv
*
cx20442
;
...
@@ -331,9 +364,13 @@ static int cx20442_codec_probe(struct snd_soc_codec *codec)
...
@@ -331,9 +364,13 @@ static int cx20442_codec_probe(struct snd_soc_codec *codec)
cx20442
=
kzalloc
(
sizeof
(
struct
cx20442_priv
),
GFP_KERNEL
);
cx20442
=
kzalloc
(
sizeof
(
struct
cx20442_priv
),
GFP_KERNEL
);
if
(
cx20442
==
NULL
)
if
(
cx20442
==
NULL
)
return
-
ENOMEM
;
return
-
ENOMEM
;
snd_soc_codec_set_drvdata
(
codec
,
cx20442
);
cx20442
->
por
=
regulator_get
(
codec
->
dev
,
"POR"
);
if
(
IS_ERR
(
cx20442
->
por
))
dev_warn
(
codec
->
dev
,
"failed to get the regulator"
);
cx20442
->
control_data
=
NULL
;
cx20442
->
control_data
=
NULL
;
snd_soc_codec_set_drvdata
(
codec
,
cx20442
);
codec
->
hw_write
=
NULL
;
codec
->
hw_write
=
NULL
;
codec
->
card
->
pop_time
=
0
;
codec
->
card
->
pop_time
=
0
;
...
@@ -350,6 +387,12 @@ static int cx20442_codec_remove(struct snd_soc_codec *codec)
...
@@ -350,6 +387,12 @@ static int cx20442_codec_remove(struct snd_soc_codec *codec)
tty_hangup
(
tty
);
tty_hangup
(
tty
);
}
}
if
(
!
IS_ERR
(
cx20442
->
por
))
{
/* should be already in STANDBY, hence disabled */
regulator_put
(
cx20442
->
por
);
}
snd_soc_codec_set_drvdata
(
codec
,
NULL
);
kfree
(
cx20442
);
kfree
(
cx20442
);
return
0
;
return
0
;
}
}
...
@@ -359,6 +402,7 @@ static const u8 cx20442_reg;
...
@@ -359,6 +402,7 @@ static const u8 cx20442_reg;
static
struct
snd_soc_codec_driver
cx20442_codec_dev
=
{
static
struct
snd_soc_codec_driver
cx20442_codec_dev
=
{
.
probe
=
cx20442_codec_probe
,
.
probe
=
cx20442_codec_probe
,
.
remove
=
cx20442_codec_remove
,
.
remove
=
cx20442_codec_remove
,
.
set_bias_level
=
cx20442_set_bias_level
,
.
reg_cache_default
=
&
cx20442_reg
,
.
reg_cache_default
=
&
cx20442_reg
,
.
reg_cache_size
=
1
,
.
reg_cache_size
=
1
,
.
reg_word_size
=
sizeof
(
u8
),
.
reg_word_size
=
sizeof
(
u8
),
...
...
sound/soc/codecs/twl6040.c
浏览文件 @
d6b24507
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
#include <sound/pcm.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/soc.h>
#include <sound/soc-dapm.h>
#include <sound/initval.h>
#include <sound/initval.h>
#include <sound/tlv.h>
#include <sound/tlv.h>
...
@@ -1012,6 +1013,28 @@ static int twl6040_pll_put_enum(struct snd_kcontrol *kcontrol,
...
@@ -1012,6 +1013,28 @@ static int twl6040_pll_put_enum(struct snd_kcontrol *kcontrol,
return
0
;
return
0
;
}
}
int
twl6040_get_dl1_gain
(
struct
snd_soc_codec
*
codec
)
{
struct
snd_soc_dapm_context
*
dapm
=
&
codec
->
dapm
;
if
(
snd_soc_dapm_get_pin_status
(
dapm
,
"EP"
))
return
-
1
;
/* -1dB */
if
(
snd_soc_dapm_get_pin_status
(
dapm
,
"HSOR"
)
||
snd_soc_dapm_get_pin_status
(
dapm
,
"HSOL"
))
{
u8
val
=
snd_soc_read
(
codec
,
TWL6040_REG_HSLCTL
);
if
(
val
&
TWL6040_HSDACMODE
)
/* HSDACL in LP mode */
return
-
8
;
/* -8dB */
else
/* HSDACL in HP mode */
return
-
1
;
/* -1dB */
}
return
0
;
/* 0dB */
}
EXPORT_SYMBOL_GPL
(
twl6040_get_dl1_gain
);
int
twl6040_get_clk_id
(
struct
snd_soc_codec
*
codec
)
int
twl6040_get_clk_id
(
struct
snd_soc_codec
*
codec
)
{
{
struct
twl6040_data
*
priv
=
snd_soc_codec_get_drvdata
(
codec
);
struct
twl6040_data
*
priv
=
snd_soc_codec_get_drvdata
(
codec
);
...
...
sound/soc/codecs/twl6040.h
浏览文件 @
d6b24507
...
@@ -34,6 +34,7 @@ enum twl6040_trim {
...
@@ -34,6 +34,7 @@ enum twl6040_trim {
#define TWL6040_HSF_TRIM_LEFT(x) (x & 0x0f)
#define TWL6040_HSF_TRIM_LEFT(x) (x & 0x0f)
#define TWL6040_HSF_TRIM_RIGHT(x) ((x >> 4) & 0x0f)
#define TWL6040_HSF_TRIM_RIGHT(x) ((x >> 4) & 0x0f)
int
twl6040_get_dl1_gain
(
struct
snd_soc_codec
*
codec
);
void
twl6040_hs_jack_detect
(
struct
snd_soc_codec
*
codec
,
void
twl6040_hs_jack_detect
(
struct
snd_soc_codec
*
codec
,
struct
snd_soc_jack
*
jack
,
int
report
);
struct
snd_soc_jack
*
jack
,
int
report
);
int
twl6040_get_clk_id
(
struct
snd_soc_codec
*
codec
);
int
twl6040_get_clk_id
(
struct
snd_soc_codec
*
codec
);
...
...
sound/soc/omap/am3517evm.c
浏览文件 @
d6b24507
...
@@ -107,6 +107,7 @@ static struct snd_soc_dai_link am3517evm_dai = {
...
@@ -107,6 +107,7 @@ static struct snd_soc_dai_link am3517evm_dai = {
/* Audio machine driver */
/* Audio machine driver */
static
struct
snd_soc_card
snd_soc_am3517evm
=
{
static
struct
snd_soc_card
snd_soc_am3517evm
=
{
.
name
=
"am3517evm"
,
.
name
=
"am3517evm"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
&
am3517evm_dai
,
.
dai_link
=
&
am3517evm_dai
,
.
num_links
=
1
,
.
num_links
=
1
,
...
...
sound/soc/omap/ams-delta.c
浏览文件 @
d6b24507
...
@@ -431,22 +431,20 @@ static int ams_delta_set_bias_level(struct snd_soc_card *card,
...
@@ -431,22 +431,20 @@ static int ams_delta_set_bias_level(struct snd_soc_card *card,
struct
snd_soc_dapm_context
*
dapm
,
struct
snd_soc_dapm_context
*
dapm
,
enum
snd_soc_bias_level
level
)
enum
snd_soc_bias_level
level
)
{
{
struct
snd_soc_codec
*
codec
=
card
->
rtd
->
codec
;
switch
(
level
)
{
switch
(
level
)
{
case
SND_SOC_BIAS_ON
:
case
SND_SOC_BIAS_ON
:
case
SND_SOC_BIAS_PREPARE
:
case
SND_SOC_BIAS_PREPARE
:
case
SND_SOC_BIAS_STANDBY
:
case
SND_SOC_BIAS_STANDBY
:
if
(
c
odec
->
dapm
.
bias_level
==
SND_SOC_BIAS_OFF
)
if
(
c
ard
->
dapm
.
bias_level
==
SND_SOC_BIAS_OFF
)
ams_delta_latch2_write
(
AMS_DELTA_LATCH2_MODEM_NRESET
,
ams_delta_latch2_write
(
AMS_DELTA_LATCH2_MODEM_NRESET
,
AMS_DELTA_LATCH2_MODEM_NRESET
);
AMS_DELTA_LATCH2_MODEM_NRESET
);
break
;
break
;
case
SND_SOC_BIAS_OFF
:
case
SND_SOC_BIAS_OFF
:
if
(
c
odec
->
dapm
.
bias_level
!=
SND_SOC_BIAS_OFF
)
if
(
c
ard
->
dapm
.
bias_level
!=
SND_SOC_BIAS_OFF
)
ams_delta_latch2_write
(
AMS_DELTA_LATCH2_MODEM_NRESET
,
ams_delta_latch2_write
(
AMS_DELTA_LATCH2_MODEM_NRESET
,
0
);
0
);
}
}
c
odec
->
dapm
.
bias_level
=
level
;
c
ard
->
dapm
.
bias_level
=
level
;
return
0
;
return
0
;
}
}
...
@@ -597,6 +595,7 @@ static struct snd_soc_dai_link ams_delta_dai_link = {
...
@@ -597,6 +595,7 @@ static struct snd_soc_dai_link ams_delta_dai_link = {
/* Audio card driver */
/* Audio card driver */
static
struct
snd_soc_card
ams_delta_audio_card
=
{
static
struct
snd_soc_card
ams_delta_audio_card
=
{
.
name
=
"AMS_DELTA"
,
.
name
=
"AMS_DELTA"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
&
ams_delta_dai_link
,
.
dai_link
=
&
ams_delta_dai_link
,
.
num_links
=
1
,
.
num_links
=
1
,
.
set_bias_level
=
ams_delta_set_bias_level
,
.
set_bias_level
=
ams_delta_set_bias_level
,
...
...
sound/soc/omap/igep0020.c
浏览文件 @
d6b24507
...
@@ -72,6 +72,7 @@ static struct snd_soc_dai_link igep2_dai = {
...
@@ -72,6 +72,7 @@ static struct snd_soc_dai_link igep2_dai = {
/* Audio machine driver */
/* Audio machine driver */
static
struct
snd_soc_card
snd_soc_card_igep2
=
{
static
struct
snd_soc_card
snd_soc_card_igep2
=
{
.
name
=
"igep2"
,
.
name
=
"igep2"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
&
igep2_dai
,
.
dai_link
=
&
igep2_dai
,
.
num_links
=
1
,
.
num_links
=
1
,
};
};
...
...
sound/soc/omap/n810.c
浏览文件 @
d6b24507
...
@@ -289,6 +289,7 @@ static struct snd_soc_dai_link n810_dai = {
...
@@ -289,6 +289,7 @@ static struct snd_soc_dai_link n810_dai = {
/* Audio machine driver */
/* Audio machine driver */
static
struct
snd_soc_card
snd_soc_n810
=
{
static
struct
snd_soc_card
snd_soc_n810
=
{
.
name
=
"N810"
,
.
name
=
"N810"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
&
n810_dai
,
.
dai_link
=
&
n810_dai
,
.
num_links
=
1
,
.
num_links
=
1
,
...
...
sound/soc/omap/omap3evm.c
浏览文件 @
d6b24507
...
@@ -70,6 +70,7 @@ static struct snd_soc_dai_link omap3evm_dai = {
...
@@ -70,6 +70,7 @@ static struct snd_soc_dai_link omap3evm_dai = {
/* Audio machine driver */
/* Audio machine driver */
static
struct
snd_soc_card
snd_soc_omap3evm
=
{
static
struct
snd_soc_card
snd_soc_omap3evm
=
{
.
name
=
"omap3evm"
,
.
name
=
"omap3evm"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
&
omap3evm_dai
,
.
dai_link
=
&
omap3evm_dai
,
.
num_links
=
1
,
.
num_links
=
1
,
};
};
...
...
sound/soc/omap/omap3pandora.c
浏览文件 @
d6b24507
...
@@ -233,6 +233,7 @@ static struct snd_soc_dai_link omap3pandora_dai[] = {
...
@@ -233,6 +233,7 @@ static struct snd_soc_dai_link omap3pandora_dai[] = {
/* SoC card */
/* SoC card */
static
struct
snd_soc_card
snd_soc_card_omap3pandora
=
{
static
struct
snd_soc_card
snd_soc_card_omap3pandora
=
{
.
name
=
"omap3pandora"
,
.
name
=
"omap3pandora"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
omap3pandora_dai
,
.
dai_link
=
omap3pandora_dai
,
.
num_links
=
ARRAY_SIZE
(
omap3pandora_dai
),
.
num_links
=
ARRAY_SIZE
(
omap3pandora_dai
),
};
};
...
...
sound/soc/omap/omap4-hdmi-card.c
浏览文件 @
d6b24507
...
@@ -74,6 +74,7 @@ static struct snd_soc_dai_link omap4_hdmi_dai = {
...
@@ -74,6 +74,7 @@ static struct snd_soc_dai_link omap4_hdmi_dai = {
static
struct
snd_soc_card
snd_soc_omap4_hdmi
=
{
static
struct
snd_soc_card
snd_soc_omap4_hdmi
=
{
.
name
=
"OMAP4HDMI"
,
.
name
=
"OMAP4HDMI"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
&
omap4_hdmi_dai
,
.
dai_link
=
&
omap4_hdmi_dai
,
.
num_links
=
1
,
.
num_links
=
1
,
};
};
...
...
sound/soc/omap/osk5912.c
浏览文件 @
d6b24507
...
@@ -108,6 +108,7 @@ static struct snd_soc_dai_link osk_dai = {
...
@@ -108,6 +108,7 @@ static struct snd_soc_dai_link osk_dai = {
/* Audio machine driver */
/* Audio machine driver */
static
struct
snd_soc_card
snd_soc_card_osk
=
{
static
struct
snd_soc_card
snd_soc_card_osk
=
{
.
name
=
"OSK5912"
,
.
name
=
"OSK5912"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
&
osk_dai
,
.
dai_link
=
&
osk_dai
,
.
num_links
=
1
,
.
num_links
=
1
,
...
...
sound/soc/omap/overo.c
浏览文件 @
d6b24507
...
@@ -72,6 +72,7 @@ static struct snd_soc_dai_link overo_dai = {
...
@@ -72,6 +72,7 @@ static struct snd_soc_dai_link overo_dai = {
/* Audio machine driver */
/* Audio machine driver */
static
struct
snd_soc_card
snd_soc_card_overo
=
{
static
struct
snd_soc_card
snd_soc_card_overo
=
{
.
name
=
"overo"
,
.
name
=
"overo"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
&
overo_dai
,
.
dai_link
=
&
overo_dai
,
.
num_links
=
1
,
.
num_links
=
1
,
};
};
...
...
sound/soc/omap/rx51.c
浏览文件 @
d6b24507
...
@@ -383,6 +383,7 @@ static struct snd_soc_codec_conf rx51_codec_conf[] = {
...
@@ -383,6 +383,7 @@ static struct snd_soc_codec_conf rx51_codec_conf[] = {
/* Audio card */
/* Audio card */
static
struct
snd_soc_card
rx51_sound_card
=
{
static
struct
snd_soc_card
rx51_sound_card
=
{
.
name
=
"RX-51"
,
.
name
=
"RX-51"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
rx51_dai
,
.
dai_link
=
rx51_dai
,
.
num_links
=
ARRAY_SIZE
(
rx51_dai
),
.
num_links
=
ARRAY_SIZE
(
rx51_dai
),
.
aux_dev
=
rx51_aux_dev
,
.
aux_dev
=
rx51_aux_dev
,
...
...
sound/soc/omap/sdp3430.c
浏览文件 @
d6b24507
...
@@ -213,6 +213,7 @@ static struct snd_soc_dai_link sdp3430_dai[] = {
...
@@ -213,6 +213,7 @@ static struct snd_soc_dai_link sdp3430_dai[] = {
/* Audio machine driver */
/* Audio machine driver */
static
struct
snd_soc_card
snd_soc_sdp3430
=
{
static
struct
snd_soc_card
snd_soc_sdp3430
=
{
.
name
=
"SDP3430"
,
.
name
=
"SDP3430"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
sdp3430_dai
,
.
dai_link
=
sdp3430_dai
,
.
num_links
=
ARRAY_SIZE
(
sdp3430_dai
),
.
num_links
=
ARRAY_SIZE
(
sdp3430_dai
),
...
...
sound/soc/omap/sdp4430.c
浏览文件 @
d6b24507
...
@@ -226,6 +226,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
...
@@ -226,6 +226,7 @@ static struct snd_soc_dai_link sdp4430_dai[] = {
/* Audio machine driver */
/* Audio machine driver */
static
struct
snd_soc_card
snd_soc_sdp4430
=
{
static
struct
snd_soc_card
snd_soc_sdp4430
=
{
.
name
=
"SDP4430"
,
.
name
=
"SDP4430"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
sdp4430_dai
,
.
dai_link
=
sdp4430_dai
,
.
num_links
=
ARRAY_SIZE
(
sdp4430_dai
),
.
num_links
=
ARRAY_SIZE
(
sdp4430_dai
),
...
...
sound/soc/omap/zoom2.c
浏览文件 @
d6b24507
...
@@ -157,6 +157,7 @@ static struct snd_soc_dai_link zoom2_dai[] = {
...
@@ -157,6 +157,7 @@ static struct snd_soc_dai_link zoom2_dai[] = {
/* Audio machine driver */
/* Audio machine driver */
static
struct
snd_soc_card
snd_soc_zoom2
=
{
static
struct
snd_soc_card
snd_soc_zoom2
=
{
.
name
=
"Zoom2"
,
.
name
=
"Zoom2"
,
.
owner
=
THIS_MODULE
,
.
dai_link
=
zoom2_dai
,
.
dai_link
=
zoom2_dai
,
.
num_links
=
ARRAY_SIZE
(
zoom2_dai
),
.
num_links
=
ARRAY_SIZE
(
zoom2_dai
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录