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
nexedi
linux
Commits
0cb3a12f
Commit
0cb3a12f
authored
Mar 29, 2017
by
Mark Brown
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'asoc/fix/rcar' into asoc-linus
parents
4368c276
9986943e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
19 deletions
+41
-19
sound/soc/sh/rcar/cmd.c
sound/soc/sh/rcar/cmd.c
+20
-16
sound/soc/sh/rcar/dma.c
sound/soc/sh/rcar/dma.c
+16
-2
sound/soc/sh/rcar/ssiu.c
sound/soc/sh/rcar/ssiu.c
+5
-1
No files found.
sound/soc/sh/rcar/cmd.c
View file @
0cb3a12f
...
@@ -31,23 +31,24 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
...
@@ -31,23 +31,24 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
struct
rsnd_mod
*
mix
=
rsnd_io_to_mod_mix
(
io
);
struct
rsnd_mod
*
mix
=
rsnd_io_to_mod_mix
(
io
);
struct
device
*
dev
=
rsnd_priv_to_dev
(
priv
);
struct
device
*
dev
=
rsnd_priv_to_dev
(
priv
);
u32
data
;
u32
data
;
u32
path
[]
=
{
[
1
]
=
1
<<
0
,
[
5
]
=
1
<<
8
,
[
6
]
=
1
<<
12
,
[
9
]
=
1
<<
15
,
};
if
(
!
mix
&&
!
dvc
)
if
(
!
mix
&&
!
dvc
)
return
0
;
return
0
;
if
(
ARRAY_SIZE
(
path
)
<
rsnd_mod_id
(
mod
)
+
1
)
return
-
ENXIO
;
if
(
mix
)
{
if
(
mix
)
{
struct
rsnd_dai
*
rdai
;
struct
rsnd_dai
*
rdai
;
struct
rsnd_mod
*
src
;
struct
rsnd_mod
*
src
;
struct
rsnd_dai_stream
*
tio
;
struct
rsnd_dai_stream
*
tio
;
int
i
;
int
i
;
u32
path
[]
=
{
[
0
]
=
0
,
[
1
]
=
1
<<
0
,
[
2
]
=
0
,
[
3
]
=
0
,
[
4
]
=
0
,
[
5
]
=
1
<<
8
};
/*
/*
* it is assuming that integrater is well understanding about
* it is assuming that integrater is well understanding about
...
@@ -70,16 +71,19 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
...
@@ -70,16 +71,19 @@ static int rsnd_cmd_init(struct rsnd_mod *mod,
}
else
{
}
else
{
struct
rsnd_mod
*
src
=
rsnd_io_to_mod_src
(
io
);
struct
rsnd_mod
*
src
=
rsnd_io_to_mod_src
(
io
);
u32
path
[]
=
{
u8
cmd_case
[]
=
{
[
0
]
=
0x30000
,
[
0
]
=
0x3
,
[
1
]
=
0x30001
,
[
1
]
=
0x3
,
[
2
]
=
0x40000
,
[
2
]
=
0x4
,
[
3
]
=
0x10000
,
[
3
]
=
0x1
,
[
4
]
=
0x20000
,
[
4
]
=
0x2
,
[
5
]
=
0x40100
[
5
]
=
0x4
,
[
6
]
=
0x1
,
[
9
]
=
0x2
,
};
};
data
=
path
[
rsnd_mod_id
(
src
)];
data
=
path
[
rsnd_mod_id
(
src
)]
|
cmd_case
[
rsnd_mod_id
(
src
)]
<<
16
;
}
}
dev_dbg
(
dev
,
"ctu/mix path = 0x%08x"
,
data
);
dev_dbg
(
dev
,
"ctu/mix path = 0x%08x"
,
data
);
...
...
sound/soc/sh/rcar/dma.c
View file @
0cb3a12f
...
@@ -454,6 +454,20 @@ static u32 rsnd_dmapp_read(struct rsnd_dma *dma, u32 reg)
...
@@ -454,6 +454,20 @@ static u32 rsnd_dmapp_read(struct rsnd_dma *dma, u32 reg)
return
ioread32
(
rsnd_dmapp_addr
(
dmac
,
dma
,
reg
));
return
ioread32
(
rsnd_dmapp_addr
(
dmac
,
dma
,
reg
));
}
}
static
void
rsnd_dmapp_bset
(
struct
rsnd_dma
*
dma
,
u32
data
,
u32
mask
,
u32
reg
)
{
struct
rsnd_mod
*
mod
=
rsnd_mod_get
(
dma
);
struct
rsnd_priv
*
priv
=
rsnd_mod_to_priv
(
mod
);
struct
rsnd_dma_ctrl
*
dmac
=
rsnd_priv_to_dmac
(
priv
);
void
__iomem
*
addr
=
rsnd_dmapp_addr
(
dmac
,
dma
,
reg
);
u32
val
=
ioread32
(
addr
);
val
&=
~
mask
;
val
|=
(
data
&
mask
);
iowrite32
(
val
,
addr
);
}
static
int
rsnd_dmapp_stop
(
struct
rsnd_mod
*
mod
,
static
int
rsnd_dmapp_stop
(
struct
rsnd_mod
*
mod
,
struct
rsnd_dai_stream
*
io
,
struct
rsnd_dai_stream
*
io
,
struct
rsnd_priv
*
priv
)
struct
rsnd_priv
*
priv
)
...
@@ -461,10 +475,10 @@ static int rsnd_dmapp_stop(struct rsnd_mod *mod,
...
@@ -461,10 +475,10 @@ static int rsnd_dmapp_stop(struct rsnd_mod *mod,
struct
rsnd_dma
*
dma
=
rsnd_mod_to_dma
(
mod
);
struct
rsnd_dma
*
dma
=
rsnd_mod_to_dma
(
mod
);
int
i
;
int
i
;
rsnd_dmapp_
write
(
dma
,
0
,
PDMACHCR
);
rsnd_dmapp_
bset
(
dma
,
0
,
PDMACHCR_DE
,
PDMACHCR
);
for
(
i
=
0
;
i
<
1024
;
i
++
)
{
for
(
i
=
0
;
i
<
1024
;
i
++
)
{
if
(
0
==
rsnd_dmapp_read
(
dma
,
PDMACHCR
))
if
(
0
==
(
rsnd_dmapp_read
(
dma
,
PDMACHCR
)
&
PDMACHCR_DE
))
return
0
;
return
0
;
udelay
(
1
);
udelay
(
1
);
}
}
...
...
sound/soc/sh/rcar/ssiu.c
View file @
0cb3a12f
...
@@ -64,7 +64,11 @@ static int rsnd_ssiu_init(struct rsnd_mod *mod,
...
@@ -64,7 +64,11 @@ static int rsnd_ssiu_init(struct rsnd_mod *mod,
mask1
=
(
1
<<
4
)
|
(
1
<<
20
);
/* mask sync bit */
mask1
=
(
1
<<
4
)
|
(
1
<<
20
);
/* mask sync bit */
mask2
=
(
1
<<
4
);
/* mask sync bit */
mask2
=
(
1
<<
4
);
/* mask sync bit */
val1
=
val2
=
0
;
val1
=
val2
=
0
;
if
(
rsnd_ssi_is_pin_sharing
(
io
))
{
if
(
id
==
8
)
{
/*
* SSI8 pin is sharing with SSI7, nothing to do.
*/
}
else
if
(
rsnd_ssi_is_pin_sharing
(
io
))
{
int
shift
=
-
1
;
int
shift
=
-
1
;
switch
(
id
)
{
switch
(
id
)
{
...
...
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