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
593aff6c
Commit
593aff6c
authored
Mar 24, 2009
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/hdsp' into for-linus
parents
e7bfbb02
c2503cd3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
265 additions
and
241 deletions
+265
-241
sound/pci/rme9652/hdsp.c
sound/pci/rme9652/hdsp.c
+265
-241
No files found.
sound/pci/rme9652/hdsp.c
View file @
593aff6c
...
...
@@ -653,7 +653,6 @@ static unsigned int hdsp_read(struct hdsp *hdsp, int reg)
static
int
hdsp_check_for_iobox
(
struct
hdsp
*
hdsp
)
{
if
(
hdsp
->
io_type
==
H9652
||
hdsp
->
io_type
==
H9632
)
return
0
;
if
(
hdsp_read
(
hdsp
,
HDSP_statusRegister
)
&
HDSP_ConfigError
)
{
snd_printk
(
"Hammerfall-DSP: no Digiface or Multiface connected!
\n
"
);
...
...
@@ -661,7 +660,29 @@ static int hdsp_check_for_iobox (struct hdsp *hdsp)
return
-
EIO
;
}
return
0
;
}
static
int
hdsp_wait_for_iobox
(
struct
hdsp
*
hdsp
,
unsigned
int
loops
,
unsigned
int
delay
)
{
unsigned
int
i
;
if
(
hdsp
->
io_type
==
H9652
||
hdsp
->
io_type
==
H9632
)
return
0
;
for
(
i
=
0
;
i
!=
loops
;
++
i
)
{
if
(
hdsp_read
(
hdsp
,
HDSP_statusRegister
)
&
HDSP_ConfigError
)
msleep
(
delay
);
else
{
snd_printd
(
"Hammerfall-DSP: iobox found after %ums!
\n
"
,
i
*
delay
);
return
0
;
}
}
snd_printk
(
"Hammerfall-DSP: no Digiface or Multiface connected!
\n
"
);
hdsp
->
state
&=
~
HDSP_FirmwareLoaded
;
return
-
EIO
;
}
static
int
snd_hdsp_load_firmware_from_cache
(
struct
hdsp
*
hdsp
)
{
...
...
@@ -3719,6 +3740,9 @@ static irqreturn_t snd_hdsp_interrupt(int irq, void *dev_id)
midi0status
=
hdsp_read
(
hdsp
,
HDSP_midiStatusIn0
)
&
0xff
;
midi1status
=
hdsp_read
(
hdsp
,
HDSP_midiStatusIn1
)
&
0xff
;
if
(
!
(
hdsp
->
state
&
HDSP_InitializationComplete
))
return
IRQ_HANDLED
;
if
(
audio
)
{
if
(
hdsp
->
capture_substream
)
snd_pcm_period_elapsed
(
hdsp
->
pcm
->
streams
[
SNDRV_PCM_STREAM_CAPTURE
].
substream
);
...
...
@@ -5046,10 +5070,10 @@ static int __devinit snd_hdsp_create(struct snd_card *card,
return
err
;
if
(
!
is_9652
&&
!
is_9632
)
{
/* we wait 2 seconds to let freshly inserted cardbus cards do their hardware init */
ssleep
(
2
);
/* we wait a maximum of 10 seconds to let freshly
* inserted cardbus cards do their hardware init */
err
=
hdsp_wait_for_iobox
(
hdsp
,
1000
,
10
);
err
=
hdsp_check_for_iobox
(
hdsp
);
if
(
err
<
0
)
return
err
;
...
...
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