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
fe4b83c4
Commit
fe4b83c4
authored
Oct 28, 2009
by
Ben Dooks
Browse files
Options
Browse Files
Download
Plain Diff
ARM: Merge fixes-s3c64xx-dma
Merge branch 'fixes-s3c64xx-dma' into fixes-s3c-2632-rc5
parents
8e8821e5
e3d80248
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
2 deletions
+27
-2
arch/arm/mach-s3c2410/include/mach/dma.h
arch/arm/mach-s3c2410/include/mach/dma.h
+7
-0
arch/arm/mach-s3c6400/include/mach/dma.h
arch/arm/mach-s3c6400/include/mach/dma.h
+5
-0
sound/soc/s3c24xx/s3c24xx-pcm.c
sound/soc/s3c24xx/s3c24xx-pcm.c
+15
-2
No files found.
arch/arm/mach-s3c2410/include/mach/dma.h
View file @
fe4b83c4
...
...
@@ -110,6 +110,8 @@ enum s3c2410_dma_loadst {
* waiting for reloads */
#define S3C2410_DMAF_AUTOSTART (1<<1)
/* auto-start if buffer queued */
#define S3C2410_DMAF_CIRCULAR (1 << 2)
/* no circular dma support */
/* dma buffer */
struct
s3c2410_dma_buf
;
...
...
@@ -194,4 +196,9 @@ struct s3c2410_dma_chan {
typedef
unsigned
long
dma_device_t
;
static
inline
bool
s3c_dma_has_circular
(
void
)
{
return
false
;
}
#endif
/* __ASM_ARCH_DMA_H */
arch/arm/mach-s3c6400/include/mach/dma.h
View file @
fe4b83c4
...
...
@@ -68,6 +68,11 @@ static __inline__ int s3c_dma_has_circular(void)
#define S3C2410_DMAF_CIRCULAR (1 << 0)
static
inline
bool
s3c_dma_has_circular
(
void
)
{
return
false
;
}
#include <plat/dma.h>
#endif
/* __ASM_ARCH_IRQ_H */
sound/soc/s3c24xx/s3c24xx-pcm.c
View file @
fe4b83c4
...
...
@@ -75,11 +75,19 @@ static void s3c24xx_pcm_enqueue(struct snd_pcm_substream *substream)
{
struct
s3c24xx_runtime_data
*
prtd
=
substream
->
runtime
->
private_data
;
dma_addr_t
pos
=
prtd
->
dma_pos
;
unsigned
int
limit
;
int
ret
;
pr_debug
(
"Entered %s
\n
"
,
__func__
);
while
(
prtd
->
dma_loaded
<
prtd
->
dma_limit
)
{
if
(
s3c_dma_has_circular
())
{
limit
=
(
prtd
->
dma_end
-
prtd
->
dma_start
)
/
prtd
->
dma_period
;
}
else
limit
=
prtd
->
dma_limit
;
pr_debug
(
"%s: loaded %d, limit %d
\n
"
,
__func__
,
prtd
->
dma_loaded
,
limit
);
while
(
prtd
->
dma_loaded
<
limit
)
{
unsigned
long
len
=
prtd
->
dma_period
;
pr_debug
(
"dma_loaded: %d
\n
"
,
prtd
->
dma_loaded
);
...
...
@@ -123,7 +131,7 @@ static void s3c24xx_audio_buffdone(struct s3c2410_dma_chan *channel,
snd_pcm_period_elapsed
(
substream
);
spin_lock
(
&
prtd
->
lock
);
if
(
prtd
->
state
&
ST_RUNNING
)
{
if
(
prtd
->
state
&
ST_RUNNING
&&
!
s3c_dma_has_circular
()
)
{
prtd
->
dma_loaded
--
;
s3c24xx_pcm_enqueue
(
substream
);
}
...
...
@@ -164,6 +172,11 @@ static int s3c24xx_pcm_hw_params(struct snd_pcm_substream *substream,
printk
(
KERN_ERR
"failed to get dma channel
\n
"
);
return
ret
;
}
/* use the circular buffering if we have it available. */
if
(
s3c_dma_has_circular
())
s3c2410_dma_setflags
(
prtd
->
params
->
channel
,
S3C2410_DMAF_CIRCULAR
);
}
s3c2410_dma_set_buffdone_fn
(
prtd
->
params
->
channel
,
...
...
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