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
c08d9169
Commit
c08d9169
authored
Oct 17, 2010
by
Takashi Iwai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ALSA: tlv - Define numbers in sound/tlv.h
Signed-off-by:
Takashi Iwai
<
tiwai@suse.de
>
parent
de8c85f7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
include/sound/tlv.h
include/sound/tlv.h
+3
-1
sound/pci/hda/hda_codec.c
sound/pci/hda/hda_codec.c
+1
-1
No files found.
include/sound/tlv.h
View file @
c08d9169
...
@@ -38,9 +38,11 @@
...
@@ -38,9 +38,11 @@
#define SNDRV_CTL_TLVT_DB_MINMAX 4
/* dB scale with min/max */
#define SNDRV_CTL_TLVT_DB_MINMAX 4
/* dB scale with min/max */
#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5
/* dB scale with min/max with mute */
#define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5
/* dB scale with min/max with mute */
#define TLV_DB_SCALE_MASK 0xffff
#define TLV_DB_SCALE_MUTE 0x10000
#define TLV_DB_SCALE_ITEM(min, step, mute) \
#define TLV_DB_SCALE_ITEM(min, step, mute) \
SNDRV_CTL_TLVT_DB_SCALE, 2 * sizeof(unsigned int), \
SNDRV_CTL_TLVT_DB_SCALE, 2 * sizeof(unsigned int), \
(min), ((step) &
0xffff) | ((mute) ? 0x10000
: 0)
(min), ((step) &
TLV_DB_SCALE_MASK) | ((mute) ? TLV_DB_SCALE_MUTE
: 0)
#define DECLARE_TLV_DB_SCALE(name, min, step, mute) \
#define DECLARE_TLV_DB_SCALE(name, min, step, mute) \
unsigned int name[] = { TLV_DB_SCALE_ITEM(min, step, mute) }
unsigned int name[] = { TLV_DB_SCALE_ITEM(min, step, mute) }
...
...
sound/pci/hda/hda_codec.c
View file @
c08d9169
...
@@ -1843,7 +1843,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag,
...
@@ -1843,7 +1843,7 @@ int snd_hda_mixer_amp_tlv(struct snd_kcontrol *kcontrol, int op_flag,
val1
+=
ofs
;
val1
+=
ofs
;
val1
=
((
int
)
val1
)
*
((
int
)
val2
);
val1
=
((
int
)
val1
)
*
((
int
)
val2
);
if
(
min_mute
)
if
(
min_mute
)
val2
|=
0x10000
;
val2
|=
TLV_DB_SCALE_MUTE
;
if
(
put_user
(
SNDRV_CTL_TLVT_DB_SCALE
,
_tlv
))
if
(
put_user
(
SNDRV_CTL_TLVT_DB_SCALE
,
_tlv
))
return
-
EFAULT
;
return
-
EFAULT
;
if
(
put_user
(
2
*
sizeof
(
unsigned
int
),
_tlv
+
1
))
if
(
put_user
(
2
*
sizeof
(
unsigned
int
),
_tlv
+
1
))
...
...
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