Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
linux-davinci
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
linux
linux-davinci
Commits
e4456e71
Commit
e4456e71
authored
Dec 25, 2008
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'topic/audigy-capture-boost' into to-push
parents
5c8261e4
16950e09
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
0 deletions
+46
-0
sound/pci/emu10k1/emumixer.c
sound/pci/emu10k1/emumixer.c
+46
-0
No files found.
sound/pci/emu10k1/emumixer.c
View file @
e4456e71
...
...
@@ -1639,6 +1639,45 @@ static struct snd_kcontrol_new snd_audigy_shared_spdif __devinitdata =
.
put
=
snd_emu10k1_shared_spdif_put
};
/* workaround for too low volume on Audigy due to 16bit/24bit conversion */
#define snd_audigy_capture_boost_info snd_ctl_boolean_mono_info
static
int
snd_audigy_capture_boost_get
(
struct
snd_kcontrol
*
kcontrol
,
struct
snd_ctl_elem_value
*
ucontrol
)
{
struct
snd_emu10k1
*
emu
=
snd_kcontrol_chip
(
kcontrol
);
unsigned
int
val
;
/* FIXME: better to use a cached version */
val
=
snd_ac97_read
(
emu
->
ac97
,
AC97_REC_GAIN
);
ucontrol
->
value
.
integer
.
value
[
0
]
=
!!
val
;
return
0
;
}
static
int
snd_audigy_capture_boost_put
(
struct
snd_kcontrol
*
kcontrol
,
struct
snd_ctl_elem_value
*
ucontrol
)
{
struct
snd_emu10k1
*
emu
=
snd_kcontrol_chip
(
kcontrol
);
unsigned
int
val
;
if
(
ucontrol
->
value
.
integer
.
value
[
0
])
val
=
0x0f0f
;
else
val
=
0
;
return
snd_ac97_update
(
emu
->
ac97
,
AC97_REC_GAIN
,
val
);
}
static
struct
snd_kcontrol_new
snd_audigy_capture_boost
__devinitdata
=
{
.
iface
=
SNDRV_CTL_ELEM_IFACE_MIXER
,
.
name
=
"Analog Capture Boost"
,
.
info
=
snd_audigy_capture_boost_info
,
.
get
=
snd_audigy_capture_boost_get
,
.
put
=
snd_audigy_capture_boost_put
};
/*
*/
static
void
snd_emu10k1_mixer_free_ac97
(
struct
snd_ac97
*
ac97
)
...
...
@@ -2087,5 +2126,12 @@ int __devinit snd_emu10k1_mixer(struct snd_emu10k1 *emu,
}
}
if
(
emu
->
card_capabilities
->
ac97_chip
&&
emu
->
audigy
)
{
err
=
snd_ctl_add
(
card
,
snd_ctl_new1
(
&
snd_audigy_capture_boost
,
emu
));
if
(
err
<
0
)
return
err
;
}
return
0
;
}
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