Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
440a5285
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
153
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
440a5285
编写于
6月 03, 2014
作者:
M
Mark Brown
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branches 'asoc/topic/omap' and 'asoc/topic/rcar' into asoc-next
上级
b12a1906
87c19364
ad32d0c7
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
265 addition
and
36 deletion
+265
-36
Documentation/devicetree/bindings/sound/renesas,rsnd.txt
Documentation/devicetree/bindings/sound/renesas,rsnd.txt
+1
-0
include/sound/omap-pcm.h
include/sound/omap-pcm.h
+0
-0
sound/soc/davinci/davinci-mcasp.c
sound/soc/davinci/davinci-mcasp.c
+1
-1
sound/soc/omap/omap-dmic.c
sound/soc/omap/omap-dmic.c
+1
-1
sound/soc/omap/omap-hdmi.c
sound/soc/omap/omap-hdmi.c
+1
-1
sound/soc/omap/omap-mcbsp.c
sound/soc/omap/omap-mcbsp.c
+1
-1
sound/soc/omap/omap-mcpdm.c
sound/soc/omap/omap-mcpdm.c
+1
-1
sound/soc/sh/rcar/core.c
sound/soc/sh/rcar/core.c
+81
-6
sound/soc/sh/rcar/dvc.c
sound/soc/sh/rcar/dvc.c
+18
-2
sound/soc/sh/rcar/gen.c
sound/soc/sh/rcar/gen.c
+95
-0
sound/soc/sh/rcar/rsnd.h
sound/soc/sh/rcar/rsnd.h
+8
-2
sound/soc/sh/rcar/src.c
sound/soc/sh/rcar/src.c
+35
-15
sound/soc/sh/rcar/ssi.c
sound/soc/sh/rcar/ssi.c
+22
-6
未找到文件。
Documentation/devicetree/bindings/sound/renesas,rsnd.txt
浏览文件 @
440a5285
...
...
@@ -20,6 +20,7 @@ Required properties:
SSI subnode properties:
- interrupts : Should contain SSI interrupt for PIO transfer
- shared-pin : if shared clock pin
- pio-transfer : use PIO transfer mode
SRC subnode properties:
no properties at this point
...
...
sound/soc/omap
/omap-pcm.h
→
include/sound
/omap-pcm.h
浏览文件 @
440a5285
文件已移动
sound/soc/davinci/davinci-mcasp.c
浏览文件 @
440a5285
...
...
@@ -33,10 +33,10 @@
#include <sound/initval.h>
#include <sound/soc.h>
#include <sound/dmaengine_pcm.h>
#include <sound/omap-pcm.h>
#include "davinci-pcm.h"
#include "davinci-mcasp.h"
#include "../omap/omap-pcm.h"
#define MCASP_MAX_AFIFO_DEPTH 64
...
...
sound/soc/omap/omap-dmic.c
浏览文件 @
440a5285
...
...
@@ -40,9 +40,9 @@
#include <sound/initval.h>
#include <sound/soc.h>
#include <sound/dmaengine_pcm.h>
#include <sound/omap-pcm.h>
#include "omap-dmic.h"
#include "omap-pcm.h"
struct
omap_dmic
{
struct
device
*
dev
;
...
...
sound/soc/omap/omap-hdmi.c
浏览文件 @
440a5285
...
...
@@ -34,9 +34,9 @@
#include <sound/asoundef.h>
#include <sound/dmaengine_pcm.h>
#include <video/omapdss.h>
#include <sound/omap-pcm.h>
#include "omap-hdmi.h"
#include "omap-pcm.h"
#define DRV_NAME "omap-hdmi-audio-dai"
...
...
sound/soc/omap/omap-mcbsp.c
浏览文件 @
440a5285
...
...
@@ -34,11 +34,11 @@
#include <sound/initval.h>
#include <sound/soc.h>
#include <sound/dmaengine_pcm.h>
#include <sound/omap-pcm.h>
#include <linux/platform_data/asoc-ti-mcbsp.h>
#include "mcbsp.h"
#include "omap-mcbsp.h"
#include "omap-pcm.h"
#define OMAP_MCBSP_RATES (SNDRV_PCM_RATE_8000_96000)
...
...
sound/soc/omap/omap-mcpdm.c
浏览文件 @
440a5285
...
...
@@ -40,9 +40,9 @@
#include <sound/pcm_params.h>
#include <sound/soc.h>
#include <sound/dmaengine_pcm.h>
#include <sound/omap-pcm.h>
#include "omap-mcpdm.h"
#include "omap-pcm.h"
struct
mcpdm_link_config
{
u32
link_mask
;
/* channel mask for the direction */
...
...
sound/soc/sh/rcar/core.c
浏览文件 @
440a5285
...
...
@@ -255,11 +255,81 @@ int rsnd_dma_available(struct rsnd_dma *dma)
return
!!
dma
->
chan
;
}
#define DMA_NAME_SIZE 16
#define MOD_MAX 4
/* MEM/SSI/SRC/DVC */
static
int
_rsnd_dma_of_name
(
char
*
dma_name
,
struct
rsnd_mod
*
mod
)
{
if
(
mod
)
return
snprintf
(
dma_name
,
DMA_NAME_SIZE
/
2
,
"%s%d"
,
rsnd_mod_name
(
mod
),
rsnd_mod_id
(
mod
));
else
return
snprintf
(
dma_name
,
DMA_NAME_SIZE
/
2
,
"mem"
);
}
static
void
rsnd_dma_of_name
(
struct
rsnd_dma
*
dma
,
int
is_play
,
char
*
dma_name
)
{
struct
rsnd_mod
*
this
=
rsnd_dma_to_mod
(
dma
);
struct
rsnd_dai_stream
*
io
=
rsnd_mod_to_io
(
this
);
struct
rsnd_mod
*
ssi
=
rsnd_io_to_mod_ssi
(
io
);
struct
rsnd_mod
*
src
=
rsnd_io_to_mod_src
(
io
);
struct
rsnd_mod
*
dvc
=
rsnd_io_to_mod_dvc
(
io
);
struct
rsnd_mod
*
mod
[
MOD_MAX
];
struct
rsnd_mod
*
src_mod
,
*
dst_mod
;
int
i
,
index
;
for
(
i
=
0
;
i
<
MOD_MAX
;
i
++
)
mod
[
i
]
=
NULL
;
/*
* in play case...
*
* src -> dst
*
* mem -> SSI
* mem -> SRC -> SSI
* mem -> SRC -> DVC -> SSI
*/
mod
[
0
]
=
NULL
;
/* for "mem" */
index
=
1
;
for
(
i
=
1
;
i
<
MOD_MAX
;
i
++
)
{
if
(
!
src
)
{
mod
[
i
]
=
ssi
;
break
;
}
else
if
(
!
dvc
)
{
mod
[
i
]
=
src
;
src
=
NULL
;
}
else
{
mod
[
i
]
=
dvc
;
dvc
=
NULL
;
}
if
(
mod
[
i
]
==
this
)
index
=
i
;
}
if
(
is_play
)
{
src_mod
=
mod
[
index
-
1
];
dst_mod
=
mod
[
index
];
}
else
{
src_mod
=
mod
[
index
];
dst_mod
=
mod
[
index
+
1
];
}
index
=
0
;
index
=
_rsnd_dma_of_name
(
dma_name
+
index
,
src_mod
);
*
(
dma_name
+
index
++
)
=
'_'
;
index
=
_rsnd_dma_of_name
(
dma_name
+
index
,
dst_mod
);
}
int
rsnd_dma_init
(
struct
rsnd_priv
*
priv
,
struct
rsnd_dma
*
dma
,
int
is_play
,
int
id
)
{
struct
device
*
dev
=
rsnd_priv_to_dev
(
priv
);
struct
dma_slave_config
cfg
;
char
dma_name
[
DMA_NAME_SIZE
];
dma_cap_mask_t
mask
;
int
ret
;
...
...
@@ -271,18 +341,23 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
dma_cap_zero
(
mask
);
dma_cap_set
(
DMA_SLAVE
,
mask
);
if
(
dev
->
of_node
)
rsnd_dma_of_name
(
dma
,
is_play
,
dma_name
);
else
snprintf
(
dma_name
,
DMA_NAME_SIZE
,
is_play
?
"tx"
:
"rx"
);
dev_dbg
(
dev
,
"dma name : %s
\n
"
,
dma_name
);
dma
->
chan
=
dma_request_slave_channel_compat
(
mask
,
shdma_chan_filter
,
(
void
*
)
id
,
dev
,
is_play
?
"tx"
:
"rx"
);
dma_name
);
if
(
!
dma
->
chan
)
{
dev_err
(
dev
,
"can't get dma channel
\n
"
);
return
-
EIO
;
}
cfg
.
slave_id
=
id
;
cfg
.
dst_addr
=
0
;
/* use default addr when playback */
cfg
.
src_addr
=
0
;
/* use default addr when capture */
cfg
.
direction
=
is_play
?
DMA_MEM_TO_DEV
:
DMA_DEV_TO_MEM
;
rsnd_gen_dma_addr
(
priv
,
dma
,
&
cfg
,
is_play
,
id
);
ret
=
dmaengine_slave_config
(
dma
->
chan
,
&
cfg
);
if
(
ret
<
0
)
...
...
@@ -956,7 +1031,7 @@ static int rsnd_probe(struct platform_device *pdev)
return
-
ENODEV
;
}
priv
->
dev
=
dev
;
priv
->
pdev
=
p
dev
;
priv
->
info
=
info
;
spin_lock_init
(
&
priv
->
lock
);
...
...
sound/soc/sh/rcar/dvc.c
浏览文件 @
440a5285
...
...
@@ -13,6 +13,9 @@
#define RSND_DVC_NAME_SIZE 16
#define RSND_DVC_VOLUME_MAX 100
#define RSND_DVC_VOLUME_NUM 2
#define DVC_NAME "dvc"
struct
rsnd_dvc
{
struct
rsnd_dvc_platform_info
*
info
;
/* rcar_snd.h */
struct
rsnd_mod
mod
;
...
...
@@ -43,6 +46,17 @@ static void rsnd_dvc_volume_update(struct rsnd_mod *mod)
rsnd_mod_write
(
mod
,
DVC_VOL1R
,
vol
[
1
]);
}
static
int
rsnd_dvc_probe_gen2
(
struct
rsnd_mod
*
mod
,
struct
rsnd_dai
*
rdai
)
{
struct
rsnd_priv
*
priv
=
rsnd_mod_to_priv
(
mod
);
struct
device
*
dev
=
rsnd_priv_to_dev
(
priv
);
dev_dbg
(
dev
,
"%s (Gen2) is probed
\n
"
,
rsnd_mod_name
(
mod
));
return
0
;
}
static
int
rsnd_dvc_init
(
struct
rsnd_mod
*
dvc_mod
,
struct
rsnd_dai
*
rdai
)
{
...
...
@@ -208,7 +222,8 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
}
static
struct
rsnd_mod_ops
rsnd_dvc_ops
=
{
.
name
=
"dvc (gen2)"
,
.
name
=
DVC_NAME
,
.
probe
=
rsnd_dvc_probe_gen2
,
.
init
=
rsnd_dvc_init
,
.
quit
=
rsnd_dvc_quit
,
.
start
=
rsnd_dvc_start
,
...
...
@@ -255,7 +270,8 @@ int rsnd_dvc_probe(struct platform_device *pdev,
priv
->
dvc
=
dvc
;
for_each_rsnd_dvc
(
dvc
,
priv
,
i
)
{
snprintf
(
name
,
RSND_DVC_NAME_SIZE
,
"dvc.%d"
,
i
);
snprintf
(
name
,
RSND_DVC_NAME_SIZE
,
"%s.%d"
,
DVC_NAME
,
i
);
clk
=
devm_clk_get
(
dev
,
name
);
if
(
IS_ERR
(
clk
))
...
...
sound/soc/sh/rcar/gen.c
浏览文件 @
440a5285
...
...
@@ -155,6 +155,101 @@ static int rsnd_gen_regmap_init(struct rsnd_priv *priv,
return
0
;
}
/*
* DMA read/write register offset
*
* RSND_xxx_I_N for Audio DMAC input
* RSND_xxx_O_N for Audio DMAC output
* RSND_xxx_I_P for Audio DMAC peri peri input
* RSND_xxx_O_P for Audio DMAC peri peri output
*
* ex) R-Car H2 case
* mod / DMAC in / DMAC out / DMAC PP in / DMAC pp out
* SSI : 0xec541000 / 0xec241008 / 0xec24100c / 0xec400000 / 0xec400000
* SCU : 0xec500000 / 0xec000000 / 0xec004000 / 0xec300000 / 0xec304000
* CMD : 0xec500000 / 0xec008000 0xec308000
*/
#define RDMA_SSI_I_N(addr, i) (addr ##_reg - 0x00300000 + (0x40 * i) + 0x8)
#define RDMA_SSI_O_N(addr, i) (addr ##_reg - 0x00300000 + (0x40 * i) + 0xc)
#define RDMA_SSI_I_P(addr, i) (addr ##_reg - 0x00141000 + (0x1000 * i))
#define RDMA_SSI_O_P(addr, i) (addr ##_reg - 0x00141000 + (0x1000 * i))
#define RDMA_SRC_I_N(addr, i) (addr ##_reg - 0x00500000 + (0x400 * i))
#define RDMA_SRC_O_N(addr, i) (addr ##_reg - 0x004fc000 + (0x400 * i))
#define RDMA_SRC_I_P(addr, i) (addr ##_reg - 0x00200000 + (0x400 * i))
#define RDMA_SRC_O_P(addr, i) (addr ##_reg - 0x001fc000 + (0x400 * i))
#define RDMA_CMD_O_N(addr, i) (addr ##_reg - 0x004f8000 + (0x400 * i))
#define RDMA_CMD_O_P(addr, i) (addr ##_reg - 0x001f8000 + (0x400 * i))
void
rsnd_gen_dma_addr
(
struct
rsnd_priv
*
priv
,
struct
rsnd_dma
*
dma
,
struct
dma_slave_config
*
cfg
,
int
is_play
,
int
slave_id
)
{
struct
platform_device
*
pdev
=
rsnd_priv_to_pdev
(
priv
);
struct
device
*
dev
=
rsnd_priv_to_dev
(
priv
);
struct
rsnd_mod
*
mod
=
rsnd_dma_to_mod
(
dma
);
struct
rsnd_dai_stream
*
io
=
rsnd_mod_to_io
(
mod
);
dma_addr_t
ssi_reg
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
RSND_GEN2_SSI
)
->
start
;
dma_addr_t
src_reg
=
platform_get_resource
(
pdev
,
IORESOURCE_MEM
,
RSND_GEN2_SCU
)
->
start
;
int
is_ssi
=
!!
(
rsnd_io_to_mod_ssi
(
io
)
==
mod
);
int
use_src
=
!!
rsnd_io_to_mod_src
(
io
);
int
use_dvc
=
!!
rsnd_io_to_mod_dvc
(
io
);
int
id
=
rsnd_mod_id
(
mod
);
struct
dma_addr
{
dma_addr_t
src_addr
;
dma_addr_t
dst_addr
;
}
dma_addrs
[
2
][
2
][
3
]
=
{
{
/* SRC */
/* Capture */
{{
0
,
0
},
{
RDMA_SRC_O_N
(
src
,
id
),
0
},
{
RDMA_CMD_O_N
(
src
,
id
),
0
}},
/* Playback */
{{
0
,
0
,
},
{
0
,
RDMA_SRC_I_N
(
src
,
id
)
},
{
0
,
RDMA_SRC_I_N
(
src
,
id
)
}}
},
{
/* SSI */
/* Capture */
{{
RDMA_SSI_O_N
(
ssi
,
id
),
0
},
{
RDMA_SSI_O_P
(
ssi
,
id
),
RDMA_SRC_I_P
(
src
,
id
)
},
{
RDMA_SSI_O_P
(
ssi
,
id
),
RDMA_SRC_I_P
(
src
,
id
)
}},
/* Playback */
{{
0
,
RDMA_SSI_I_N
(
ssi
,
id
)
},
{
RDMA_SRC_O_P
(
src
,
id
),
RDMA_SSI_I_P
(
ssi
,
id
)
},
{
RDMA_CMD_O_P
(
src
,
id
),
RDMA_SSI_I_P
(
ssi
,
id
)
}}
}
};
cfg
->
slave_id
=
slave_id
;
cfg
->
src_addr
=
0
;
cfg
->
dst_addr
=
0
;
cfg
->
direction
=
is_play
?
DMA_MEM_TO_DEV
:
DMA_DEV_TO_MEM
;
/*
* gen1 uses default DMA addr
*/
if
(
rsnd_is_gen1
(
priv
))
return
;
/* it shouldn't happen */
if
(
use_dvc
&
!
use_src
)
{
dev_err
(
dev
,
"DVC is selected without SRC
\n
"
);
return
;
}
cfg
->
src_addr
=
dma_addrs
[
is_ssi
][
is_play
][
use_src
+
use_dvc
].
src_addr
;
cfg
->
dst_addr
=
dma_addrs
[
is_ssi
][
is_play
][
use_src
+
use_dvc
].
dst_addr
;
dev_dbg
(
dev
,
"dma%d addr - src : %x / dst : %x
\n
"
,
id
,
cfg
->
src_addr
,
cfg
->
dst_addr
);
}
/*
* Gen2
*/
...
...
sound/soc/sh/rcar/rsnd.h
浏览文件 @
440a5285
...
...
@@ -281,6 +281,11 @@ int rsnd_gen_probe(struct platform_device *pdev,
void
__iomem
*
rsnd_gen_reg_get
(
struct
rsnd_priv
*
priv
,
struct
rsnd_mod
*
mod
,
enum
rsnd_reg
reg
);
void
rsnd_gen_dma_addr
(
struct
rsnd_priv
*
priv
,
struct
rsnd_dma
*
dma
,
struct
dma_slave_config
*
cfg
,
int
is_play
,
int
slave_id
);
#define rsnd_is_gen1(s) (((s)->info->flags & RSND_GEN_MASK) == RSND_GEN1)
#define rsnd_is_gen2(s) (((s)->info->flags & RSND_GEN_MASK) == RSND_GEN2)
...
...
@@ -317,7 +322,7 @@ struct rsnd_of_data {
struct
rsnd_priv
{
struct
device
*
dev
;
struct
platform_device
*
p
dev
;
struct
rcar_snd_info
*
info
;
spinlock_t
lock
;
...
...
@@ -357,7 +362,8 @@ struct rsnd_priv {
int
rdai_nr
;
};
#define rsnd_priv_to_dev(priv) ((priv)->dev)
#define rsnd_priv_to_pdev(priv) ((priv)->pdev)
#define rsnd_priv_to_dev(priv) (&(rsnd_priv_to_pdev(priv)->dev))
#define rsnd_priv_to_info(priv) ((priv)->info)
#define rsnd_lock(priv, flags) spin_lock_irqsave(&priv->lock, flags)
#define rsnd_unlock(priv, flags) spin_unlock_irqrestore(&priv->lock, flags)
...
...
sound/soc/sh/rcar/src.c
浏览文件 @
440a5285
...
...
@@ -10,6 +10,8 @@
*/
#include "rsnd.h"
#define SRC_NAME "src"
struct
rsnd_src
{
struct
rsnd_src_platform_info
*
info
;
/* rcar_snd.h */
struct
rsnd_mod
mod
;
...
...
@@ -268,10 +270,6 @@ static int rsnd_src_stop(struct rsnd_mod *mod,
return
0
;
}
static
struct
rsnd_mod_ops
rsnd_src_non_ops
=
{
.
name
=
"src (non)"
,
};
/*
* Gen1 functions
*/
...
...
@@ -393,6 +391,17 @@ static int rsnd_src_set_convert_rate_gen1(struct rsnd_mod *mod,
return
0
;
}
static
int
rsnd_src_probe_gen1
(
struct
rsnd_mod
*
mod
,
struct
rsnd_dai
*
rdai
)
{
struct
rsnd_priv
*
priv
=
rsnd_mod_to_priv
(
mod
);
struct
device
*
dev
=
rsnd_priv_to_dev
(
priv
);
dev_dbg
(
dev
,
"%s (Gen1) is probed
\n
"
,
rsnd_mod_name
(
mod
));
return
0
;
}
static
int
rsnd_src_init_gen1
(
struct
rsnd_mod
*
mod
,
struct
rsnd_dai
*
rdai
)
{
...
...
@@ -438,7 +447,8 @@ static int rsnd_src_stop_gen1(struct rsnd_mod *mod,
}
static
struct
rsnd_mod_ops
rsnd_src_gen1_ops
=
{
.
name
=
"sru (gen1)"
,
.
name
=
SRC_NAME
,
.
probe
=
rsnd_src_probe_gen1
,
.
init
=
rsnd_src_init_gen1
,
.
quit
=
rsnd_src_quit
,
.
start
=
rsnd_src_start_gen1
,
...
...
@@ -502,6 +512,8 @@ static int rsnd_src_probe_gen2(struct rsnd_mod *mod,
if
(
ret
<
0
)
dev_err
(
dev
,
"SRC DMA failed
\n
"
);
dev_dbg
(
dev
,
"%s (Gen2) is probed
\n
"
,
rsnd_mod_name
(
mod
));
return
ret
;
}
...
...
@@ -562,7 +574,7 @@ static int rsnd_src_stop_gen2(struct rsnd_mod *mod,
}
static
struct
rsnd_mod_ops
rsnd_src_gen2_ops
=
{
.
name
=
"src (gen2)"
,
.
name
=
SRC_NAME
,
.
probe
=
rsnd_src_probe_gen2
,
.
remove
=
rsnd_src_remove_gen2
,
.
init
=
rsnd_src_init_gen2
,
...
...
@@ -598,18 +610,21 @@ static void rsnd_of_parse_src(struct platform_device *pdev,
nr
=
of_get_child_count
(
src_node
);
if
(
!
nr
)
return
;
goto
rsnd_of_parse_src_end
;
src_info
=
devm_kzalloc
(
dev
,
sizeof
(
struct
rsnd_src_platform_info
)
*
nr
,
GFP_KERNEL
);
if
(
!
src_info
)
{
dev_err
(
dev
,
"src info allocation error
\n
"
);
return
;
goto
rsnd_of_parse_src_end
;
}
info
->
src_info
=
src_info
;
info
->
src_info_nr
=
nr
;
rsnd_of_parse_src_end:
of_node_put
(
src_node
);
}
int
rsnd_src_probe
(
struct
platform_device
*
pdev
,
...
...
@@ -624,6 +639,16 @@ int rsnd_src_probe(struct platform_device *pdev,
char
name
[
RSND_SRC_NAME_SIZE
];
int
i
,
nr
;
ops
=
NULL
;
if
(
rsnd_is_gen1
(
priv
))
ops
=
&
rsnd_src_gen1_ops
;
if
(
rsnd_is_gen2
(
priv
))
ops
=
&
rsnd_src_gen2_ops
;
if
(
!
ops
)
{
dev_err
(
dev
,
"unknown Generation
\n
"
);
return
-
EIO
;
}
rsnd_of_parse_src
(
pdev
,
of_data
,
priv
);
/*
...
...
@@ -643,7 +668,8 @@ int rsnd_src_probe(struct platform_device *pdev,
priv
->
src
=
src
;
for_each_rsnd_src
(
src
,
priv
,
i
)
{
snprintf
(
name
,
RSND_SRC_NAME_SIZE
,
"src.%d"
,
i
);
snprintf
(
name
,
RSND_SRC_NAME_SIZE
,
"%s.%d"
,
SRC_NAME
,
i
);
clk
=
devm_clk_get
(
dev
,
name
);
if
(
IS_ERR
(
clk
))
...
...
@@ -652,12 +678,6 @@ int rsnd_src_probe(struct platform_device *pdev,
src
->
info
=
&
info
->
src_info
[
i
];
src
->
clk
=
clk
;
ops
=
&
rsnd_src_non_ops
;
if
(
rsnd_is_gen1
(
priv
))
ops
=
&
rsnd_src_gen1_ops
;
if
(
rsnd_is_gen2
(
priv
))
ops
=
&
rsnd_src_gen2_ops
;
rsnd_mod_init
(
priv
,
&
src
->
mod
,
ops
,
RSND_MOD_SRC
,
i
);
dev_dbg
(
dev
,
"SRC%d probed
\n
"
,
i
);
...
...
sound/soc/sh/rcar/ssi.c
浏览文件 @
440a5285
...
...
@@ -57,6 +57,8 @@
*/
#define CONT (1 << 8)
/* WS Continue Function */
#define SSI_NAME "ssi"
struct
rsnd_ssi
{
struct
clk
*
clk
;
struct
rsnd_ssi_platform_info
*
info
;
/* rcar_snd.h */
...
...
@@ -373,6 +375,8 @@ static int rsnd_ssi_pio_probe(struct rsnd_mod *mod,
if
(
ret
)
dev_err
(
dev
,
"SSI request interrupt failed
\n
"
);
dev_dbg
(
dev
,
"%s (PIO) is probed
\n
"
,
rsnd_mod_name
(
mod
));
return
ret
;
}
...
...
@@ -405,7 +409,7 @@ static int rsnd_ssi_pio_stop(struct rsnd_mod *mod,
}
static
struct
rsnd_mod_ops
rsnd_ssi_pio_ops
=
{
.
name
=
"ssi (pio)"
,
.
name
=
SSI_NAME
,
.
probe
=
rsnd_ssi_pio_probe
,
.
init
=
rsnd_ssi_init
,
.
quit
=
rsnd_ssi_quit
,
...
...
@@ -430,6 +434,8 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
if
(
ret
<
0
)
dev_err
(
dev
,
"SSI DMA failed
\n
"
);
dev_dbg
(
dev
,
"%s (DMA) is probed
\n
"
,
rsnd_mod_name
(
mod
));
return
ret
;
}
...
...
@@ -480,7 +486,7 @@ static int rsnd_ssi_dma_stop(struct rsnd_mod *mod,
}
static
struct
rsnd_mod_ops
rsnd_ssi_dma_ops
=
{
.
name
=
"ssi (dma)"
,
.
name
=
SSI_NAME
,
.
probe
=
rsnd_ssi_dma_probe
,
.
remove
=
rsnd_ssi_dma_remove
,
.
init
=
rsnd_ssi_init
,
...
...
@@ -493,7 +499,7 @@ static struct rsnd_mod_ops rsnd_ssi_dma_ops = {
* Non SSI
*/
static
struct
rsnd_mod_ops
rsnd_ssi_non_ops
=
{
.
name
=
"ssi (non)"
,
.
name
=
SSI_NAME
,
};
/*
...
...
@@ -554,14 +560,14 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev,
nr
=
of_get_child_count
(
node
);
if
(
!
nr
)
return
;
goto
rsnd_of_parse_ssi_end
;
ssi_info
=
devm_kzalloc
(
dev
,
sizeof
(
struct
rsnd_ssi_platform_info
)
*
nr
,
GFP_KERNEL
);
if
(
!
ssi_info
)
{
dev_err
(
dev
,
"ssi info allocation error
\n
"
);
return
;
goto
rsnd_of_parse_ssi_end
;
}
info
->
ssi_info
=
ssi_info
;
...
...
@@ -583,7 +589,16 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev,
* irq
*/
ssi_info
->
pio_irq
=
irq_of_parse_and_map
(
np
,
0
);
/*
* DMA
*/
ssi_info
->
dma_id
=
of_get_property
(
np
,
"pio-transfer"
,
NULL
)
?
0
:
1
;
}
rsnd_of_parse_ssi_end:
of_node_put
(
node
);
}
int
rsnd_ssi_probe
(
struct
platform_device
*
pdev
,
...
...
@@ -617,7 +632,8 @@ int rsnd_ssi_probe(struct platform_device *pdev,
for_each_rsnd_ssi
(
ssi
,
priv
,
i
)
{
pinfo
=
&
info
->
ssi_info
[
i
];
snprintf
(
name
,
RSND_SSI_NAME_SIZE
,
"ssi.%d"
,
i
);
snprintf
(
name
,
RSND_SSI_NAME_SIZE
,
"%s.%d"
,
SSI_NAME
,
i
);
clk
=
devm_clk_get
(
dev
,
name
);
if
(
IS_ERR
(
clk
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录