Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xiphi1978
linux
提交
78fcce4d
L
linux
项目概览
xiphi1978
/
linux
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
78fcce4d
编写于
6月 23, 2014
作者:
T
Takashi Iwai
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'for-linus' into for-next
上级
7f0f2048
8d42fda9
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
189 addition
and
116 deletion
+189
-116
include/sound/core.h
include/sound/core.h
+2
-0
sound/core/control.c
sound/core/control.c
+51
-27
sound/core/init.c
sound/core/init.c
+1
-0
sound/soc/codecs/Kconfig
sound/soc/codecs/Kconfig
+10
-2
sound/soc/codecs/Makefile
sound/soc/codecs/Makefile
+4
-0
sound/soc/codecs/sigmadsp-i2c.c
sound/soc/codecs/sigmadsp-i2c.c
+35
-0
sound/soc/codecs/sigmadsp-regmap.c
sound/soc/codecs/sigmadsp-regmap.c
+36
-0
sound/soc/codecs/sigmadsp.c
sound/soc/codecs/sigmadsp.c
+2
-63
sound/soc/codecs/sigmadsp.h
sound/soc/codecs/sigmadsp.h
+20
-0
sound/soc/fsl/fsl_dma.c
sound/soc/fsl/fsl_dma.c
+2
-2
sound/soc/fsl/fsl_spdif.c
sound/soc/fsl/fsl_spdif.c
+3
-3
sound/soc/pxa/Kconfig
sound/soc/pxa/Kconfig
+6
-5
sound/soc/sh/rcar/core.c
sound/soc/sh/rcar/core.c
+1
-1
sound/soc/soc-dapm.c
sound/soc/soc-dapm.c
+16
-13
未找到文件。
include/sound/core.h
浏览文件 @
78fcce4d
...
...
@@ -116,6 +116,8 @@ struct snd_card {
int
user_ctl_count
;
/* count of all user controls */
struct
list_head
controls
;
/* all controls for this card */
struct
list_head
ctl_files
;
/* active control files */
struct
mutex
user_ctl_lock
;
/* protects user controls against
concurrent access */
struct
snd_info_entry
*
proc_root
;
/* root for soundcard specific files */
struct
snd_info_entry
*
proc_id
;
/* the card id */
...
...
sound/core/control.c
浏览文件 @
78fcce4d
...
...
@@ -288,6 +288,10 @@ static bool snd_ctl_remove_numid_conflict(struct snd_card *card,
{
struct
snd_kcontrol
*
kctl
;
/* Make sure that the ids assigned to the control do not wrap around */
if
(
card
->
last_numid
>=
UINT_MAX
-
count
)
card
->
last_numid
=
0
;
list_for_each_entry
(
kctl
,
&
card
->
controls
,
list
)
{
if
(
kctl
->
id
.
numid
<
card
->
last_numid
+
1
+
count
&&
kctl
->
id
.
numid
+
kctl
->
count
>
card
->
last_numid
+
1
)
{
...
...
@@ -330,6 +334,7 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol)
{
struct
snd_ctl_elem_id
id
;
unsigned
int
idx
;
unsigned
int
count
;
int
err
=
-
EINVAL
;
if
(
!
kcontrol
)
...
...
@@ -337,6 +342,9 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol)
if
(
snd_BUG_ON
(
!
card
||
!
kcontrol
->
info
))
goto
error
;
id
=
kcontrol
->
id
;
if
(
id
.
index
>
UINT_MAX
-
kcontrol
->
count
)
goto
error
;
down_write
(
&
card
->
controls_rwsem
);
if
(
snd_ctl_find_id
(
card
,
&
id
))
{
up_write
(
&
card
->
controls_rwsem
);
...
...
@@ -358,8 +366,9 @@ int snd_ctl_add(struct snd_card *card, struct snd_kcontrol *kcontrol)
card
->
controls_count
+=
kcontrol
->
count
;
kcontrol
->
id
.
numid
=
card
->
last_numid
+
1
;
card
->
last_numid
+=
kcontrol
->
count
;
count
=
kcontrol
->
count
;
up_write
(
&
card
->
controls_rwsem
);
for
(
idx
=
0
;
idx
<
kcontrol
->
count
;
idx
++
,
id
.
index
++
,
id
.
numid
++
)
for
(
idx
=
0
;
idx
<
count
;
idx
++
,
id
.
index
++
,
id
.
numid
++
)
snd_ctl_notify
(
card
,
SNDRV_CTL_EVENT_MASK_ADD
,
&
id
);
return
0
;
...
...
@@ -388,6 +397,7 @@ int snd_ctl_replace(struct snd_card *card, struct snd_kcontrol *kcontrol,
bool
add_on_replace
)
{
struct
snd_ctl_elem_id
id
;
unsigned
int
count
;
unsigned
int
idx
;
struct
snd_kcontrol
*
old
;
int
ret
;
...
...
@@ -423,8 +433,9 @@ int snd_ctl_replace(struct snd_card *card, struct snd_kcontrol *kcontrol,
card
->
controls_count
+=
kcontrol
->
count
;
kcontrol
->
id
.
numid
=
card
->
last_numid
+
1
;
card
->
last_numid
+=
kcontrol
->
count
;
count
=
kcontrol
->
count
;
up_write
(
&
card
->
controls_rwsem
);
for
(
idx
=
0
;
idx
<
kcontrol
->
count
;
idx
++
,
id
.
index
++
,
id
.
numid
++
)
for
(
idx
=
0
;
idx
<
count
;
idx
++
,
id
.
index
++
,
id
.
numid
++
)
snd_ctl_notify
(
card
,
SNDRV_CTL_EVENT_MASK_ADD
,
&
id
);
return
0
;
...
...
@@ -897,9 +908,9 @@ static int snd_ctl_elem_write(struct snd_card *card, struct snd_ctl_file *file,
result
=
kctl
->
put
(
kctl
,
control
);
}
if
(
result
>
0
)
{
struct
snd_ctl_elem_id
id
=
control
->
id
;
up_read
(
&
card
->
controls_rwsem
);
snd_ctl_notify
(
card
,
SNDRV_CTL_EVENT_MASK_VALUE
,
&
control
->
id
);
snd_ctl_notify
(
card
,
SNDRV_CTL_EVENT_MASK_VALUE
,
&
id
);
return
0
;
}
}
...
...
@@ -991,6 +1002,7 @@ static int snd_ctl_elem_unlock(struct snd_ctl_file *file,
struct
user_element
{
struct
snd_ctl_elem_info
info
;
struct
snd_card
*
card
;
void
*
elem_data
;
/* element data */
unsigned
long
elem_data_size
;
/* size of element data in bytes */
void
*
tlv_data
;
/* TLV data */
...
...
@@ -1034,7 +1046,9 @@ static int snd_ctl_elem_user_get(struct snd_kcontrol *kcontrol,
{
struct
user_element
*
ue
=
kcontrol
->
private_data
;
mutex_lock
(
&
ue
->
card
->
user_ctl_lock
);
memcpy
(
&
ucontrol
->
value
,
ue
->
elem_data
,
ue
->
elem_data_size
);
mutex_unlock
(
&
ue
->
card
->
user_ctl_lock
);
return
0
;
}
...
...
@@ -1043,10 +1057,12 @@ static int snd_ctl_elem_user_put(struct snd_kcontrol *kcontrol,
{
int
change
;
struct
user_element
*
ue
=
kcontrol
->
private_data
;
mutex_lock
(
&
ue
->
card
->
user_ctl_lock
);
change
=
memcmp
(
&
ucontrol
->
value
,
ue
->
elem_data
,
ue
->
elem_data_size
)
!=
0
;
if
(
change
)
memcpy
(
ue
->
elem_data
,
&
ucontrol
->
value
,
ue
->
elem_data_size
);
mutex_unlock
(
&
ue
->
card
->
user_ctl_lock
);
return
change
;
}
...
...
@@ -1066,19 +1082,32 @@ static int snd_ctl_elem_user_tlv(struct snd_kcontrol *kcontrol,
new_data
=
memdup_user
(
tlv
,
size
);
if
(
IS_ERR
(
new_data
))
return
PTR_ERR
(
new_data
);
mutex_lock
(
&
ue
->
card
->
user_ctl_lock
);
change
=
ue
->
tlv_data_size
!=
size
;
if
(
!
change
)
change
=
memcmp
(
ue
->
tlv_data
,
new_data
,
size
);
kfree
(
ue
->
tlv_data
);
ue
->
tlv_data
=
new_data
;
ue
->
tlv_data_size
=
size
;
mutex_unlock
(
&
ue
->
card
->
user_ctl_lock
);
}
else
{
if
(
!
ue
->
tlv_data_size
||
!
ue
->
tlv_data
)
return
-
ENXIO
;
if
(
size
<
ue
->
tlv_data_size
)
return
-
ENOSPC
;
int
ret
=
0
;
mutex_lock
(
&
ue
->
card
->
user_ctl_lock
);
if
(
!
ue
->
tlv_data_size
||
!
ue
->
tlv_data
)
{
ret
=
-
ENXIO
;
goto
err_unlock
;
}
if
(
size
<
ue
->
tlv_data_size
)
{
ret
=
-
ENOSPC
;
goto
err_unlock
;
}
if
(
copy_to_user
(
tlv
,
ue
->
tlv_data
,
ue
->
tlv_data_size
))
return
-
EFAULT
;
ret
=
-
EFAULT
;
err_unlock:
mutex_unlock
(
&
ue
->
card
->
user_ctl_lock
);
if
(
ret
)
return
ret
;
}
return
change
;
}
...
...
@@ -1136,8 +1165,6 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
struct
user_element
*
ue
;
int
idx
,
err
;
if
(
!
replace
&&
card
->
user_ctl_count
>=
MAX_USER_CONTROLS
)
return
-
ENOMEM
;
if
(
info
->
count
<
1
)
return
-
EINVAL
;
access
=
info
->
access
==
0
?
SNDRV_CTL_ELEM_ACCESS_READWRITE
:
...
...
@@ -1146,21 +1173,16 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
SNDRV_CTL_ELEM_ACCESS_TLV_READWRITE
));
info
->
id
.
numid
=
0
;
memset
(
&
kctl
,
0
,
sizeof
(
kctl
));
down_write
(
&
card
->
controls_rwsem
);
_kctl
=
snd_ctl_find_id
(
card
,
&
info
->
id
);
err
=
0
;
if
(
_kctl
)
{
if
(
replace
)
err
=
snd_ctl_remove
(
card
,
_kctl
);
else
err
=
-
EBUSY
;
}
else
{
if
(
replace
)
err
=
-
ENOENT
;
if
(
replace
)
{
err
=
snd_ctl_remove_user_ctl
(
file
,
&
info
->
id
);
if
(
err
)
return
err
;
}
up_write
(
&
card
->
controls_rwsem
);
if
(
err
<
0
)
return
err
;
if
(
card
->
user_ctl_count
>=
MAX_USER_CONTROLS
)
return
-
ENOMEM
;
memcpy
(
&
kctl
.
id
,
&
info
->
id
,
sizeof
(
info
->
id
));
kctl
.
count
=
info
->
owner
?
info
->
owner
:
1
;
access
|=
SNDRV_CTL_ELEM_ACCESS_USER
;
...
...
@@ -1210,6 +1232,7 @@ static int snd_ctl_elem_add(struct snd_ctl_file *file,
ue
=
kzalloc
(
sizeof
(
struct
user_element
)
+
private_size
,
GFP_KERNEL
);
if
(
ue
==
NULL
)
return
-
ENOMEM
;
ue
->
card
=
card
;
ue
->
info
=
*
info
;
ue
->
info
.
access
=
0
;
ue
->
elem_data
=
(
char
*
)
ue
+
sizeof
(
*
ue
);
...
...
@@ -1321,8 +1344,9 @@ static int snd_ctl_tlv_ioctl(struct snd_ctl_file *file,
}
err
=
kctl
->
tlv
.
c
(
kctl
,
op_flag
,
tlv
.
length
,
_tlv
->
tlv
);
if
(
err
>
0
)
{
struct
snd_ctl_elem_id
id
=
kctl
->
id
;
up_read
(
&
card
->
controls_rwsem
);
snd_ctl_notify
(
card
,
SNDRV_CTL_EVENT_MASK_TLV
,
&
kctl
->
id
);
snd_ctl_notify
(
card
,
SNDRV_CTL_EVENT_MASK_TLV
,
&
id
);
return
0
;
}
}
else
{
...
...
sound/core/init.c
浏览文件 @
78fcce4d
...
...
@@ -232,6 +232,7 @@ int snd_card_new(struct device *parent, int idx, const char *xid,
INIT_LIST_HEAD
(
&
card
->
devices
);
init_rwsem
(
&
card
->
controls_rwsem
);
rwlock_init
(
&
card
->
ctl_files_rwlock
);
mutex_init
(
&
card
->
user_ctl_lock
);
INIT_LIST_HEAD
(
&
card
->
controls
);
INIT_LIST_HEAD
(
&
card
->
ctl_files
);
spin_lock_init
(
&
card
->
files_lock
);
...
...
sound/soc/codecs/Kconfig
浏览文件 @
78fcce4d
...
...
@@ -225,11 +225,11 @@ config SND_SOC_ADAU1373
config SND_SOC_ADAU1701
tristate "Analog Devices ADAU1701 CODEC"
depends on I2C
select SND_SOC_SIGMADSP
select SND_SOC_SIGMADSP
_I2C
config SND_SOC_ADAU17X1
tristate
select SND_SOC_SIGMADSP
select SND_SOC_SIGMADSP
_REGMAP
config SND_SOC_ADAU1761
tristate
...
...
@@ -476,6 +476,14 @@ config SND_SOC_SIGMADSP
tristate
select CRC32
config SND_SOC_SIGMADSP_I2C
tristate
select SND_SOC_SIGMADSP
config SND_SOC_SIGMADSP_REGMAP
tristate
select SND_SOC_SIGMADSP
config SND_SOC_SIRF_AUDIO_CODEC
tristate "SiRF SoC internal audio codec"
select REGMAP_MMIO
...
...
sound/soc/codecs/Makefile
浏览文件 @
78fcce4d
...
...
@@ -77,6 +77,8 @@ snd-soc-sgtl5000-objs := sgtl5000.o
snd-soc-alc5623-objs
:=
alc5623.o
snd-soc-alc5632-objs
:=
alc5632.o
snd-soc-sigmadsp-objs
:=
sigmadsp.o
snd-soc-sigmadsp-i2c-objs
:=
sigmadsp-i2c.o
snd-soc-sigmadsp-regmap-objs
:=
sigmadsp-regmap.o
snd-soc-si476x-objs
:=
si476x.o
snd-soc-sirf-audio-codec-objs
:=
sirf-audio-codec.o
snd-soc-sn95031-objs
:=
sn95031.o
...
...
@@ -240,6 +242,8 @@ obj-$(CONFIG_SND_SOC_RT5651) += snd-soc-rt5651.o
obj-$(CONFIG_SND_SOC_RT5677)
+=
snd-soc-rt5677.o
obj-$(CONFIG_SND_SOC_SGTL5000)
+=
snd-soc-sgtl5000.o
obj-$(CONFIG_SND_SOC_SIGMADSP)
+=
snd-soc-sigmadsp.o
obj-$(CONFIG_SND_SOC_SIGMADSP_I2C)
+=
snd-soc-sigmadsp-i2c.o
obj-$(CONFIG_SND_SOC_SIGMADSP_REGMAP)
+=
snd-soc-sigmadsp-regmap.o
obj-$(CONFIG_SND_SOC_SI476X)
+=
snd-soc-si476x.o
obj-$(CONFIG_SND_SOC_SN95031)
+=
snd-soc-sn95031.o
obj-$(CONFIG_SND_SOC_SPDIF)
+=
snd-soc-spdif-rx.o snd-soc-spdif-tx.o
...
...
sound/soc/codecs/sigmadsp-i2c.c
0 → 100644
浏览文件 @
78fcce4d
/*
* Load Analog Devices SigmaStudio firmware files
*
* Copyright 2009-2011 Analog Devices Inc.
*
* Licensed under the GPL-2 or later.
*/
#include <linux/i2c.h>
#include <linux/export.h>
#include <linux/module.h>
#include "sigmadsp.h"
static
int
sigma_action_write_i2c
(
void
*
control_data
,
const
struct
sigma_action
*
sa
,
size_t
len
)
{
return
i2c_master_send
(
control_data
,
(
const
unsigned
char
*
)
&
sa
->
addr
,
len
);
}
int
process_sigma_firmware
(
struct
i2c_client
*
client
,
const
char
*
name
)
{
struct
sigma_firmware
ssfw
;
ssfw
.
control_data
=
client
;
ssfw
.
write
=
sigma_action_write_i2c
;
return
_process_sigma_firmware
(
&
client
->
dev
,
&
ssfw
,
name
);
}
EXPORT_SYMBOL
(
process_sigma_firmware
);
MODULE_AUTHOR
(
"Lars-Peter Clausen <lars@metafoo.de>"
);
MODULE_DESCRIPTION
(
"SigmaDSP I2C firmware loader"
);
MODULE_LICENSE
(
"GPL"
);
sound/soc/codecs/sigmadsp-regmap.c
0 → 100644
浏览文件 @
78fcce4d
/*
* Load Analog Devices SigmaStudio firmware files
*
* Copyright 2009-2011 Analog Devices Inc.
*
* Licensed under the GPL-2 or later.
*/
#include <linux/regmap.h>
#include <linux/export.h>
#include <linux/module.h>
#include "sigmadsp.h"
static
int
sigma_action_write_regmap
(
void
*
control_data
,
const
struct
sigma_action
*
sa
,
size_t
len
)
{
return
regmap_raw_write
(
control_data
,
be16_to_cpu
(
sa
->
addr
),
sa
->
payload
,
len
-
2
);
}
int
process_sigma_firmware_regmap
(
struct
device
*
dev
,
struct
regmap
*
regmap
,
const
char
*
name
)
{
struct
sigma_firmware
ssfw
;
ssfw
.
control_data
=
regmap
;
ssfw
.
write
=
sigma_action_write_regmap
;
return
_process_sigma_firmware
(
dev
,
&
ssfw
,
name
);
}
EXPORT_SYMBOL
(
process_sigma_firmware_regmap
);
MODULE_AUTHOR
(
"Lars-Peter Clausen <lars@metafoo.de>"
);
MODULE_DESCRIPTION
(
"SigmaDSP regmap firmware loader"
);
MODULE_LICENSE
(
"GPL"
);
sound/soc/codecs/sigmadsp.c
浏览文件 @
78fcce4d
...
...
@@ -34,23 +34,6 @@ enum {
SIGMA_ACTION_END
,
};
struct
sigma_action
{
u8
instr
;
u8
len_hi
;
__le16
len
;
__be16
addr
;
unsigned
char
payload
[];
}
__packed
;
struct
sigma_firmware
{
const
struct
firmware
*
fw
;
size_t
pos
;
void
*
control_data
;
int
(
*
write
)(
void
*
control_data
,
const
struct
sigma_action
*
sa
,
size_t
len
);
};
static
inline
u32
sigma_action_len
(
struct
sigma_action
*
sa
)
{
return
(
sa
->
len_hi
<<
16
)
|
le16_to_cpu
(
sa
->
len
);
...
...
@@ -138,7 +121,7 @@ process_sigma_actions(struct sigma_firmware *ssfw)
return
0
;
}
static
int
_process_sigma_firmware
(
struct
device
*
dev
,
int
_process_sigma_firmware
(
struct
device
*
dev
,
struct
sigma_firmware
*
ssfw
,
const
char
*
name
)
{
int
ret
;
...
...
@@ -197,50 +180,6 @@ static int _process_sigma_firmware(struct device *dev,
return
ret
;
}
#if IS_ENABLED(CONFIG_I2C)
static
int
sigma_action_write_i2c
(
void
*
control_data
,
const
struct
sigma_action
*
sa
,
size_t
len
)
{
return
i2c_master_send
(
control_data
,
(
const
unsigned
char
*
)
&
sa
->
addr
,
len
);
}
int
process_sigma_firmware
(
struct
i2c_client
*
client
,
const
char
*
name
)
{
struct
sigma_firmware
ssfw
;
ssfw
.
control_data
=
client
;
ssfw
.
write
=
sigma_action_write_i2c
;
return
_process_sigma_firmware
(
&
client
->
dev
,
&
ssfw
,
name
);
}
EXPORT_SYMBOL
(
process_sigma_firmware
);
#endif
#if IS_ENABLED(CONFIG_REGMAP)
static
int
sigma_action_write_regmap
(
void
*
control_data
,
const
struct
sigma_action
*
sa
,
size_t
len
)
{
return
regmap_raw_write
(
control_data
,
be16_to_cpu
(
sa
->
addr
),
sa
->
payload
,
len
-
2
);
}
int
process_sigma_firmware_regmap
(
struct
device
*
dev
,
struct
regmap
*
regmap
,
const
char
*
name
)
{
struct
sigma_firmware
ssfw
;
ssfw
.
control_data
=
regmap
;
ssfw
.
write
=
sigma_action_write_regmap
;
return
_process_sigma_firmware
(
dev
,
&
ssfw
,
name
);
}
EXPORT_SYMBOL
(
process_sigma_firmware_regmap
);
#endif
EXPORT_SYMBOL_GPL
(
_process_sigma_firmware
);
MODULE_LICENSE
(
"GPL"
);
sound/soc/codecs/sigmadsp.h
浏览文件 @
78fcce4d
...
...
@@ -12,6 +12,26 @@
#include <linux/device.h>
#include <linux/regmap.h>
struct
sigma_action
{
u8
instr
;
u8
len_hi
;
__le16
len
;
__be16
addr
;
unsigned
char
payload
[];
}
__packed
;
struct
sigma_firmware
{
const
struct
firmware
*
fw
;
size_t
pos
;
void
*
control_data
;
int
(
*
write
)(
void
*
control_data
,
const
struct
sigma_action
*
sa
,
size_t
len
);
};
int
_process_sigma_firmware
(
struct
device
*
dev
,
struct
sigma_firmware
*
ssfw
,
const
char
*
name
);
struct
i2c_client
;
extern
int
process_sigma_firmware
(
struct
i2c_client
*
client
,
const
char
*
name
);
...
...
sound/soc/fsl/fsl_dma.c
浏览文件 @
78fcce4d
...
...
@@ -923,8 +923,8 @@ static int fsl_soc_dma_probe(struct platform_device *pdev)
dma
->
dai
.
pcm_free
=
fsl_dma_free_dma_buffers
;
/* Store the SSI-specific information that we need */
dma
->
ssi_stx_phys
=
res
.
start
+
offsetof
(
struct
ccsr_ssi
,
stx0
)
;
dma
->
ssi_srx_phys
=
res
.
start
+
offsetof
(
struct
ccsr_ssi
,
srx0
)
;
dma
->
ssi_stx_phys
=
res
.
start
+
CCSR_SSI_STX0
;
dma
->
ssi_srx_phys
=
res
.
start
+
CCSR_SSI_SRX0
;
iprop
=
of_get_property
(
ssi_np
,
"fsl,fifo-depth"
,
NULL
);
if
(
iprop
)
...
...
sound/soc/fsl/fsl_spdif.c
浏览文件 @
78fcce4d
...
...
@@ -762,7 +762,7 @@ static int fsl_spdif_vbit_get(struct snd_kcontrol *kcontrol,
struct
regmap
*
regmap
=
spdif_priv
->
regmap
;
u32
val
;
val
=
regmap_read
(
regmap
,
REG_SPDIF_SIS
,
&
val
);
regmap_read
(
regmap
,
REG_SPDIF_SIS
,
&
val
);
ucontrol
->
value
.
integer
.
value
[
0
]
=
(
val
&
INT_VAL_NOGOOD
)
!=
0
;
regmap_write
(
regmap
,
REG_SPDIF_SIC
,
INT_VAL_NOGOOD
);
...
...
@@ -1076,7 +1076,7 @@ static u32 fsl_spdif_txclk_caldiv(struct fsl_spdif_priv *spdif_priv,
goto
out
;
}
else
if
(
arate
/
rate
[
index
]
==
1
)
{
/* A little bigger than expect */
sub
=
(
arate
-
rate
[
index
])
*
100000
;
sub
=
(
u64
)(
arate
-
rate
[
index
])
*
100000
;
do_div
(
sub
,
rate
[
index
]);
if
(
sub
>=
savesub
)
continue
;
...
...
@@ -1086,7 +1086,7 @@ static u32 fsl_spdif_txclk_caldiv(struct fsl_spdif_priv *spdif_priv,
spdif_priv
->
txrate
[
index
]
=
arate
;
}
else
if
(
rate
[
index
]
/
arate
==
1
)
{
/* A little smaller than expect */
sub
=
(
rate
[
index
]
-
arate
)
*
100000
;
sub
=
(
u64
)(
rate
[
index
]
-
arate
)
*
100000
;
do_div
(
sub
,
rate
[
index
]);
if
(
sub
>=
savesub
)
continue
;
...
...
sound/soc/pxa/Kconfig
浏览文件 @
78fcce4d
...
...
@@ -11,6 +11,7 @@ config SND_PXA2XX_SOC
config SND_MMP_SOC
bool "Soc Audio for Marvell MMP chips"
depends on ARCH_MMP
select MMP_SRAM
select SND_SOC_GENERIC_DMAENGINE_PCM
select SND_ARM
help
...
...
@@ -40,7 +41,7 @@ config SND_MMP_SOC_SSPA
config SND_PXA2XX_SOC_CORGI
tristate "SoC Audio support for Sharp Zaurus SL-C7x0"
depends on SND_PXA2XX_SOC && PXA_SHARP_C7xx
depends on SND_PXA2XX_SOC && PXA_SHARP_C7xx
&& I2C
select SND_PXA2XX_SOC_I2S
select SND_SOC_WM8731
help
...
...
@@ -49,7 +50,7 @@ config SND_PXA2XX_SOC_CORGI
config SND_PXA2XX_SOC_SPITZ
tristate "SoC Audio support for Sharp Zaurus SL-Cxx00"
depends on SND_PXA2XX_SOC && PXA_SHARP_Cxx00
depends on SND_PXA2XX_SOC && PXA_SHARP_Cxx00
&& I2C
select SND_PXA2XX_SOC_I2S
select SND_SOC_WM8750
help
...
...
@@ -58,7 +59,7 @@ config SND_PXA2XX_SOC_SPITZ
config SND_PXA2XX_SOC_Z2
tristate "SoC Audio support for Zipit Z2"
depends on SND_PXA2XX_SOC && MACH_ZIPIT2
depends on SND_PXA2XX_SOC && MACH_ZIPIT2
&& I2C
select SND_PXA2XX_SOC_I2S
select SND_SOC_WM8750
help
...
...
@@ -66,7 +67,7 @@ config SND_PXA2XX_SOC_Z2
config SND_PXA2XX_SOC_POODLE
tristate "SoC Audio support for Poodle"
depends on SND_PXA2XX_SOC && MACH_POODLE
depends on SND_PXA2XX_SOC && MACH_POODLE
&& I2C
select SND_PXA2XX_SOC_I2S
select SND_SOC_WM8731
help
...
...
@@ -181,7 +182,7 @@ config SND_PXA2XX_SOC_HX4700
config SND_PXA2XX_SOC_MAGICIAN
tristate "SoC Audio support for HTC Magician"
depends on SND_PXA2XX_SOC && MACH_MAGICIAN
depends on SND_PXA2XX_SOC && MACH_MAGICIAN
&& I2C
select SND_PXA2XX_SOC_I2S
select SND_PXA_SOC_SSP
select SND_SOC_UDA1380
...
...
sound/soc/sh/rcar/core.c
浏览文件 @
78fcce4d
...
...
@@ -315,7 +315,7 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
dst_mod
=
mod
[
index
];
}
else
{
src_mod
=
mod
[
index
];
dst_mod
=
mod
[
index
+
1
];
dst_mod
=
mod
[
index
-
1
];
}
index
=
0
;
...
...
sound/soc/soc-dapm.c
浏览文件 @
78fcce4d
...
...
@@ -2755,7 +2755,7 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
unsigned
int
mask
=
(
1
<<
fls
(
max
))
-
1
;
unsigned
int
invert
=
mc
->
invert
;
unsigned
int
val
;
int
connect
,
change
;
int
connect
,
change
,
reg_change
=
0
;
struct
snd_soc_dapm_update
update
;
int
ret
=
0
;
...
...
@@ -2773,20 +2773,23 @@ int snd_soc_dapm_put_volsw(struct snd_kcontrol *kcontrol,
mutex_lock_nested
(
&
card
->
dapm_mutex
,
SND_SOC_DAPM_CLASS_RUNTIME
);
change
=
dapm_kcontrol_set_value
(
kcontrol
,
val
);
if
(
change
)
{
if
(
reg
!=
SND_SOC_NOPM
)
{
mask
=
mask
<<
shift
;
val
=
val
<<
shift
;
if
(
snd_soc_test_bits
(
codec
,
reg
,
mask
,
val
))
{
update
.
kcontrol
=
kcontrol
;
update
.
reg
=
reg
;
update
.
mask
=
mask
;
update
.
val
=
val
;
card
->
update
=
&
update
;
}
if
(
reg
!=
SND_SOC_NOPM
)
{
mask
=
mask
<<
shift
;
val
=
val
<<
shift
;
reg_change
=
snd_soc_test_bits
(
codec
,
reg
,
mask
,
val
);
}
if
(
change
||
reg_change
)
{
if
(
reg_change
)
{
update
.
kcontrol
=
kcontrol
;
update
.
reg
=
reg
;
update
.
mask
=
mask
;
update
.
val
=
val
;
card
->
update
=
&
update
;
}
change
|=
reg_change
;
ret
=
soc_dapm_mixer_update_power
(
card
,
kcontrol
,
connect
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录