Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
f8d04e7d
Commit
f8d04e7d
authored
Mar 27, 2015
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'asoc-fix-rcar' into HEAD
parents
af7e2be9
2f78dd7f
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
76 additions
and
10 deletions
+76
-10
sound/soc/sh/rcar/core.c
sound/soc/sh/rcar/core.c
+23
-1
sound/soc/sh/rcar/dvc.c
sound/soc/sh/rcar/dvc.c
+15
-2
sound/soc/sh/rcar/rsnd.h
sound/soc/sh/rcar/rsnd.h
+8
-3
sound/soc/sh/rcar/src.c
sound/soc/sh/rcar/src.c
+15
-2
sound/soc/sh/rcar/ssi.c
sound/soc/sh/rcar/ssi.c
+15
-2
No files found.
sound/soc/sh/rcar/core.c
View file @
f8d04e7d
...
...
@@ -145,16 +145,29 @@ struct dma_chan *rsnd_mod_dma_req(struct rsnd_mod *mod)
return
mod
->
ops
->
dma_req
(
mod
);
}
void
rsnd_mod_init
(
struct
rsnd_mod
*
mod
,
int
rsnd_mod_init
(
struct
rsnd_mod
*
mod
,
struct
rsnd_mod_ops
*
ops
,
struct
clk
*
clk
,
enum
rsnd_mod_type
type
,
int
id
)
{
int
ret
=
clk_prepare
(
clk
);
if
(
ret
)
return
ret
;
mod
->
id
=
id
;
mod
->
ops
=
ops
;
mod
->
type
=
type
;
mod
->
clk
=
clk
;
return
ret
;
}
void
rsnd_mod_quit
(
struct
rsnd_mod
*
mod
)
{
if
(
mod
->
clk
)
clk_unprepare
(
mod
->
clk
);
}
/*
...
...
@@ -1073,6 +1086,12 @@ static int rsnd_remove(struct platform_device *pdev)
{
struct
rsnd_priv
*
priv
=
dev_get_drvdata
(
&
pdev
->
dev
);
struct
rsnd_dai
*
rdai
;
void
(
*
remove_func
[])(
struct
platform_device
*
pdev
,
struct
rsnd_priv
*
priv
)
=
{
rsnd_ssi_remove
,
rsnd_src_remove
,
rsnd_dvc_remove
,
};
int
ret
=
0
,
i
;
pm_runtime_disable
(
&
pdev
->
dev
);
...
...
@@ -1082,6 +1101,9 @@ static int rsnd_remove(struct platform_device *pdev)
ret
|=
rsnd_dai_call
(
remove
,
&
rdai
->
capture
,
priv
);
}
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
remove_func
);
i
++
)
remove_func
[
i
](
pdev
,
priv
);
snd_soc_unregister_component
(
&
pdev
->
dev
);
snd_soc_unregister_platform
(
&
pdev
->
dev
);
...
...
sound/soc/sh/rcar/dvc.c
View file @
f8d04e7d
...
...
@@ -345,7 +345,7 @@ int rsnd_dvc_probe(struct platform_device *pdev,
struct
rsnd_dvc
*
dvc
;
struct
clk
*
clk
;
char
name
[
RSND_DVC_NAME_SIZE
];
int
i
,
nr
;
int
i
,
nr
,
ret
;
rsnd_of_parse_dvc
(
pdev
,
of_data
,
priv
);
...
...
@@ -378,11 +378,24 @@ int rsnd_dvc_probe(struct platform_device *pdev,
dvc
->
info
=
&
info
->
dvc_info
[
i
];
rsnd_mod_init
(
&
dvc
->
mod
,
&
rsnd_dvc_ops
,
r
et
=
r
snd_mod_init
(
&
dvc
->
mod
,
&
rsnd_dvc_ops
,
clk
,
RSND_MOD_DVC
,
i
);
if
(
ret
)
return
ret
;
dev_dbg
(
dev
,
"CMD%d probed
\n
"
,
i
);
}
return
0
;
}
void
rsnd_dvc_remove
(
struct
platform_device
*
pdev
,
struct
rsnd_priv
*
priv
)
{
struct
rsnd_dvc
*
dvc
;
int
i
;
for_each_rsnd_dvc
(
dvc
,
priv
,
i
)
{
rsnd_mod_quit
(
&
dvc
->
mod
);
}
}
sound/soc/sh/rcar/rsnd.h
View file @
f8d04e7d
...
...
@@ -285,14 +285,15 @@ struct rsnd_mod {
#define rsnd_mod_to_dma(mod) (&(mod)->dma)
#define rsnd_mod_to_io(mod) ((mod)->io)
#define rsnd_mod_id(mod) ((mod)->id)
#define rsnd_mod_hw_start(mod) clk_
prepare_
enable((mod)->clk)
#define rsnd_mod_hw_stop(mod) clk_disable
_unprepare
((mod)->clk)
#define rsnd_mod_hw_start(mod) clk_enable((mod)->clk)
#define rsnd_mod_hw_stop(mod) clk_disable((mod)->clk)
void
rsnd_mod_init
(
struct
rsnd_mod
*
mod
,
int
rsnd_mod_init
(
struct
rsnd_mod
*
mod
,
struct
rsnd_mod_ops
*
ops
,
struct
clk
*
clk
,
enum
rsnd_mod_type
type
,
int
id
);
void
rsnd_mod_quit
(
struct
rsnd_mod
*
mod
);
char
*
rsnd_mod_name
(
struct
rsnd_mod
*
mod
);
struct
dma_chan
*
rsnd_mod_dma_req
(
struct
rsnd_mod
*
mod
);
...
...
@@ -496,6 +497,8 @@ int rsnd_kctrl_new_e(struct rsnd_mod *mod,
int
rsnd_src_probe
(
struct
platform_device
*
pdev
,
const
struct
rsnd_of_data
*
of_data
,
struct
rsnd_priv
*
priv
);
void
rsnd_src_remove
(
struct
platform_device
*
pdev
,
struct
rsnd_priv
*
priv
);
struct
rsnd_mod
*
rsnd_src_mod_get
(
struct
rsnd_priv
*
priv
,
int
id
);
unsigned
int
rsnd_src_get_ssi_rate
(
struct
rsnd_priv
*
priv
,
struct
rsnd_dai_stream
*
io
,
...
...
@@ -514,6 +517,8 @@ int rsnd_src_ssi_irq_disable(struct rsnd_mod *ssi_mod);
int
rsnd_ssi_probe
(
struct
platform_device
*
pdev
,
const
struct
rsnd_of_data
*
of_data
,
struct
rsnd_priv
*
priv
);
void
rsnd_ssi_remove
(
struct
platform_device
*
pdev
,
struct
rsnd_priv
*
priv
);
struct
rsnd_mod
*
rsnd_ssi_mod_get
(
struct
rsnd_priv
*
priv
,
int
id
);
int
rsnd_ssi_is_pin_sharing
(
struct
rsnd_mod
*
mod
);
int
rsnd_ssi_is_dma_mode
(
struct
rsnd_mod
*
mod
);
...
...
sound/soc/sh/rcar/src.c
View file @
f8d04e7d
...
...
@@ -867,7 +867,7 @@ int rsnd_src_probe(struct platform_device *pdev,
struct
rsnd_mod_ops
*
ops
;
struct
clk
*
clk
;
char
name
[
RSND_SRC_NAME_SIZE
];
int
i
,
nr
;
int
i
,
nr
,
ret
;
ops
=
NULL
;
if
(
rsnd_is_gen1
(
priv
))
...
...
@@ -907,10 +907,23 @@ int rsnd_src_probe(struct platform_device *pdev,
src
->
info
=
&
info
->
src_info
[
i
];
rsnd_mod_init
(
&
src
->
mod
,
ops
,
clk
,
RSND_MOD_SRC
,
i
);
ret
=
rsnd_mod_init
(
&
src
->
mod
,
ops
,
clk
,
RSND_MOD_SRC
,
i
);
if
(
ret
)
return
ret
;
dev_dbg
(
dev
,
"SRC%d probed
\n
"
,
i
);
}
return
0
;
}
void
rsnd_src_remove
(
struct
platform_device
*
pdev
,
struct
rsnd_priv
*
priv
)
{
struct
rsnd_src
*
src
;
int
i
;
for_each_rsnd_src
(
src
,
priv
,
i
)
{
rsnd_mod_quit
(
&
src
->
mod
);
}
}
sound/soc/sh/rcar/ssi.c
View file @
f8d04e7d
...
...
@@ -710,7 +710,7 @@ int rsnd_ssi_probe(struct platform_device *pdev,
struct
clk
*
clk
;
struct
rsnd_ssi
*
ssi
;
char
name
[
RSND_SSI_NAME_SIZE
];
int
i
,
nr
;
int
i
,
nr
,
ret
;
rsnd_of_parse_ssi
(
pdev
,
of_data
,
priv
);
...
...
@@ -745,10 +745,23 @@ int rsnd_ssi_probe(struct platform_device *pdev,
else
if
(
rsnd_ssi_pio_available
(
ssi
))
ops
=
&
rsnd_ssi_pio_ops
;
rsnd_mod_init
(
&
ssi
->
mod
,
ops
,
clk
,
RSND_MOD_SSI
,
i
);
ret
=
rsnd_mod_init
(
&
ssi
->
mod
,
ops
,
clk
,
RSND_MOD_SSI
,
i
);
if
(
ret
)
return
ret
;
rsnd_ssi_parent_clk_setup
(
priv
,
ssi
);
}
return
0
;
}
void
rsnd_ssi_remove
(
struct
platform_device
*
pdev
,
struct
rsnd_priv
*
priv
)
{
struct
rsnd_ssi
*
ssi
;
int
i
;
for_each_rsnd_ssi
(
ssi
,
priv
,
i
)
{
rsnd_mod_quit
(
&
ssi
->
mod
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment