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
378e869f
Commit
378e869f
authored
Oct 08, 2009
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix/misc' into for-linus
parents
d2a764dd
1d4efa66
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
21 deletions
+42
-21
sound/drivers/opl3/opl3_midi.c
sound/drivers/opl3/opl3_midi.c
+20
-8
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1712.c
+1
-1
sound/pci/ice1712/ice1724.c
sound/pci/ice1712/ice1724.c
+3
-3
sound/pci/via82xx.c
sound/pci/via82xx.c
+18
-9
No files found.
sound/drivers/opl3/opl3_midi.c
View file @
378e869f
...
...
@@ -29,6 +29,8 @@ extern char snd_opl3_regmap[MAX_OPL2_VOICES][4];
extern
int
use_internal_drums
;
static
void
snd_opl3_note_off_unsafe
(
void
*
p
,
int
note
,
int
vel
,
struct
snd_midi_channel
*
chan
);
/*
* The next table looks magical, but it certainly is not. Its values have
* been calculated as table[i]=8*log(i/64)/log(2) with an obvious exception
...
...
@@ -242,16 +244,20 @@ void snd_opl3_timer_func(unsigned long data)
int
again
=
0
;
int
i
;
spin_lock_irqsave
(
&
opl3
->
sys_timer
_lock
,
flags
);
spin_lock_irqsave
(
&
opl3
->
voice
_lock
,
flags
);
for
(
i
=
0
;
i
<
opl3
->
max_voices
;
i
++
)
{
struct
snd_opl3_voice
*
vp
=
&
opl3
->
voices
[
i
];
if
(
vp
->
state
>
0
&&
vp
->
note_off_check
)
{
if
(
vp
->
note_off
==
jiffies
)
snd_opl3_note_off
(
opl3
,
vp
->
note
,
0
,
vp
->
chan
);
snd_opl3_note_off_unsafe
(
opl3
,
vp
->
note
,
0
,
vp
->
chan
);
else
again
++
;
}
}
spin_unlock_irqrestore
(
&
opl3
->
voice_lock
,
flags
);
spin_lock_irqsave
(
&
opl3
->
sys_timer_lock
,
flags
);
if
(
again
)
{
opl3
->
tlist
.
expires
=
jiffies
+
1
;
/* invoke again */
add_timer
(
&
opl3
->
tlist
);
...
...
@@ -658,15 +664,14 @@ static void snd_opl3_kill_voice(struct snd_opl3 *opl3, int voice)
/*
* Release a note in response to a midi note off.
*/
void
snd_opl3_note_off
(
void
*
p
,
int
note
,
int
vel
,
struct
snd_midi_channel
*
chan
)
static
void
snd_opl3_note_off_unsafe
(
void
*
p
,
int
note
,
int
vel
,
struct
snd_midi_channel
*
chan
)
{
struct
snd_opl3
*
opl3
;
int
voice
;
struct
snd_opl3_voice
*
vp
;
unsigned
long
flags
;
opl3
=
p
;
#ifdef DEBUG_MIDI
...
...
@@ -674,12 +679,9 @@ void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan
chan
->
number
,
chan
->
midi_program
,
note
);
#endif
spin_lock_irqsave
(
&
opl3
->
voice_lock
,
flags
);
if
(
opl3
->
synth_mode
==
SNDRV_OPL3_MODE_SEQ
)
{
if
(
chan
->
drum_channel
&&
use_internal_drums
)
{
snd_opl3_drum_switch
(
opl3
,
note
,
vel
,
0
,
chan
);
spin_unlock_irqrestore
(
&
opl3
->
voice_lock
,
flags
);
return
;
}
/* this loop will hopefully kill all extra voices, because
...
...
@@ -697,6 +699,16 @@ void snd_opl3_note_off(void *p, int note, int vel, struct snd_midi_channel *chan
snd_opl3_kill_voice
(
opl3
,
voice
);
}
}
}
void
snd_opl3_note_off
(
void
*
p
,
int
note
,
int
vel
,
struct
snd_midi_channel
*
chan
)
{
struct
snd_opl3
*
opl3
=
p
;
unsigned
long
flags
;
spin_lock_irqsave
(
&
opl3
->
voice_lock
,
flags
);
snd_opl3_note_off_unsafe
(
p
,
note
,
vel
,
chan
);
spin_unlock_irqrestore
(
&
opl3
->
voice_lock
,
flags
);
}
...
...
sound/pci/ice1712/ice1712.c
View file @
378e869f
...
...
@@ -2259,7 +2259,7 @@ static int snd_ice1712_pro_peak_get(struct snd_kcontrol *kcontrol,
}
static
struct
snd_kcontrol_new
snd_ice1712_mixer_pro_peak
__devinitdata
=
{
.
iface
=
SNDRV_CTL_ELEM_IFACE_
MIXER
,
.
iface
=
SNDRV_CTL_ELEM_IFACE_
PCM
,
.
name
=
"Multi Track Peak"
,
.
access
=
SNDRV_CTL_ELEM_ACCESS_READ
|
SNDRV_CTL_ELEM_ACCESS_VOLATILE
,
.
info
=
snd_ice1712_pro_peak_info
,
...
...
sound/pci/ice1712/ice1724.c
View file @
378e869f
...
...
@@ -1294,7 +1294,7 @@ static int __devinit snd_vt1724_pcm_spdif(struct snd_ice1712 *ice, int device)
snd_pcm_lib_preallocate_pages_for_all
(
pcm
,
SNDRV_DMA_TYPE_DEV
,
snd_dma_pci_data
(
ice
->
pci
),
64
*
1024
,
64
*
1024
);
256
*
1024
,
256
*
1024
);
ice
->
pcm
=
pcm
;
...
...
@@ -1408,7 +1408,7 @@ static int __devinit snd_vt1724_pcm_indep(struct snd_ice1712 *ice, int device)
snd_pcm_lib_preallocate_pages_for_all
(
pcm
,
SNDRV_DMA_TYPE_DEV
,
snd_dma_pci_data
(
ice
->
pci
),
64
*
1024
,
64
*
1024
);
256
*
1024
,
256
*
1024
);
ice
->
pcm_ds
=
pcm
;
...
...
@@ -2110,7 +2110,7 @@ static int snd_vt1724_pro_peak_get(struct snd_kcontrol *kcontrol,
}
static
struct
snd_kcontrol_new
snd_vt1724_mixer_pro_peak
__devinitdata
=
{
.
iface
=
SNDRV_CTL_ELEM_IFACE_
MIXER
,
.
iface
=
SNDRV_CTL_ELEM_IFACE_
PCM
,
.
name
=
"Multi Track Peak"
,
.
access
=
SNDRV_CTL_ELEM_ACCESS_READ
|
SNDRV_CTL_ELEM_ACCESS_VOLATILE
,
.
info
=
snd_vt1724_pro_peak_info
,
...
...
sound/pci/via82xx.c
View file @
378e869f
...
...
@@ -1626,7 +1626,7 @@ static int snd_via8233_dxs_volume_get(struct snd_kcontrol *kcontrol,
struct
snd_ctl_elem_value
*
ucontrol
)
{
struct
via82xx
*
chip
=
snd_kcontrol_chip
(
kcontrol
);
unsigned
int
idx
=
snd_ctl_get_ioff
(
kcontrol
,
&
ucontrol
->
id
)
;
unsigned
int
idx
=
kcontrol
->
id
.
subdevice
;
ucontrol
->
value
.
integer
.
value
[
0
]
=
VIA_DXS_MAX_VOLUME
-
chip
->
playback_volume
[
idx
][
0
];
ucontrol
->
value
.
integer
.
value
[
1
]
=
VIA_DXS_MAX_VOLUME
-
chip
->
playback_volume
[
idx
][
1
];
...
...
@@ -1646,7 +1646,7 @@ static int snd_via8233_dxs_volume_put(struct snd_kcontrol *kcontrol,
struct
snd_ctl_elem_value
*
ucontrol
)
{
struct
via82xx
*
chip
=
snd_kcontrol_chip
(
kcontrol
);
unsigned
int
idx
=
snd_ctl_get_ioff
(
kcontrol
,
&
ucontrol
->
id
)
;
unsigned
int
idx
=
kcontrol
->
id
.
subdevice
;
unsigned
long
port
=
chip
->
port
+
0x10
*
idx
;
unsigned
char
val
;
int
i
,
change
=
0
;
...
...
@@ -1705,11 +1705,12 @@ static struct snd_kcontrol_new snd_via8233_pcmdxs_volume_control __devinitdata =
};
static
struct
snd_kcontrol_new
snd_via8233_dxs_volume_control
__devinitdata
=
{
.
name
=
"VIA DXS Playback Volume"
,
.
iface
=
SNDRV_CTL_ELEM_IFACE_MIXER
,
.
iface
=
SNDRV_CTL_ELEM_IFACE_PCM
,
.
device
=
0
,
/* .subdevice set later */
.
name
=
"PCM Playback Volume"
,
.
access
=
(
SNDRV_CTL_ELEM_ACCESS_READWRITE
|
SNDRV_CTL_ELEM_ACCESS_TLV_READ
),
.
count
=
4
,
.
info
=
snd_via8233_dxs_volume_info
,
.
get
=
snd_via8233_dxs_volume_get
,
.
put
=
snd_via8233_dxs_volume_put
,
...
...
@@ -1936,10 +1937,18 @@ static int __devinit snd_via8233_init_misc(struct via82xx *chip)
}
else
/* Using DXS when PCM emulation is enabled is really weird */
{
/* Standalone DXS controls */
err
=
snd_ctl_add
(
chip
->
card
,
snd_ctl_new1
(
&
snd_via8233_dxs_volume_control
,
chip
));
if
(
err
<
0
)
return
err
;
for
(
i
=
0
;
i
<
4
;
++
i
)
{
struct
snd_kcontrol
*
kctl
;
kctl
=
snd_ctl_new1
(
&
snd_via8233_dxs_volume_control
,
chip
);
if
(
!
kctl
)
return
-
ENOMEM
;
kctl
->
id
.
subdevice
=
i
;
err
=
snd_ctl_add
(
chip
->
card
,
kctl
);
if
(
err
<
0
)
return
err
;
}
}
}
/* select spdif data slot 10/11 */
...
...
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