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
66cb6957
Commit
66cb6957
authored
Jun 18, 2011
by
Mauro Carvalho Chehab
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[media] em28xx-audio: add debug info for the volume control
Signed-off-by:
Mauro Carvalho Chehab
<
mchehab@redhat.com
>
parent
71d7d83e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
drivers/media/video/em28xx/em28xx-audio.c
drivers/media/video/em28xx/em28xx-audio.c
+28
-0
No files found.
drivers/media/video/em28xx/em28xx-audio.c
View file @
66cb6957
...
...
@@ -464,6 +464,13 @@ static int em28xx_vol_put(struct snd_kcontrol *kcontrol,
val
|=
rc
&
0x8000
;
/* Preserve the mute flag */
rc
=
em28xx_write_ac97
(
dev
,
kcontrol
->
private_value
,
val
);
if
(
rc
<
0
)
goto
err
;
dprintk
(
"%sleft vol %d, right vol %d (0x%04x) to ac97 volume control 0x%04x
\n
"
,
(
val
&
0x8000
)
?
"muted "
:
""
,
0x1f
-
((
val
>>
8
)
&
0x1f
),
0x1f
-
(
val
&
0x1f
),
val
,
(
int
)
kcontrol
->
private_value
);
err:
mutex_unlock
(
&
dev
->
lock
);
...
...
@@ -482,6 +489,11 @@ static int em28xx_vol_get(struct snd_kcontrol *kcontrol,
if
(
val
<
0
)
return
val
;
dprintk
(
"%sleft vol %d, right vol %d (0x%04x) from ac97 volume control 0x%04x
\n
"
,
(
val
&
0x8000
)
?
"muted "
:
""
,
0x1f
-
((
val
>>
8
)
&
0x1f
),
0x1f
-
(
val
&
0x1f
),
val
,
(
int
)
kcontrol
->
private_value
);
value
->
value
.
integer
.
value
[
0
]
=
0x1f
-
(
val
&
0x1f
);
value
->
value
.
integer
.
value
[
1
]
=
0x1f
-
((
val
<<
8
)
&
0x1f
);
...
...
@@ -506,6 +518,13 @@ static int em28xx_vol_put_mute(struct snd_kcontrol *kcontrol,
rc
|=
0x8000
;
rc
=
em28xx_write_ac97
(
dev
,
kcontrol
->
private_value
,
rc
);
if
(
rc
<
0
)
goto
err
;
dprintk
(
"%sleft vol %d, right vol %d (0x%04x) to ac97 volume control 0x%04x
\n
"
,
(
val
&
0x8000
)
?
"muted "
:
""
,
0x1f
-
((
val
>>
8
)
&
0x1f
),
0x1f
-
(
val
&
0x1f
),
val
,
(
int
)
kcontrol
->
private_value
);
err:
mutex_unlock
(
&
dev
->
lock
);
...
...
@@ -529,6 +548,11 @@ static int em28xx_vol_get_mute(struct snd_kcontrol *kcontrol,
else
value
->
value
.
integer
.
value
[
0
]
=
1
;
dprintk
(
"%sleft vol %d, right vol %d (0x%04x) from ac97 volume control 0x%04x
\n
"
,
(
val
&
0x8000
)
?
"muted "
:
""
,
0x1f
-
((
val
>>
8
)
&
0x1f
),
0x1f
-
(
val
&
0x1f
),
val
,
(
int
)
kcontrol
->
private_value
);
return
0
;
}
...
...
@@ -556,6 +580,8 @@ static int em28xx_cvol_new(struct snd_card *card, struct em28xx *dev,
err
=
snd_ctl_add
(
card
,
kctl
);
if
(
err
<
0
)
return
err
;
dprintk
(
"Added control %s for ac97 volume control 0x%04x
\n
"
,
ctl_name
,
id
);
memset
(
&
tmp
,
0
,
sizeof
(
tmp
));
tmp
.
iface
=
SNDRV_CTL_ELEM_IFACE_MIXER
,
...
...
@@ -572,6 +598,8 @@ static int em28xx_cvol_new(struct snd_card *card, struct em28xx *dev,
err
=
snd_ctl_add
(
card
,
kctl
);
if
(
err
<
0
)
return
err
;
dprintk
(
"Added control %s for ac97 volume control 0x%04x
\n
"
,
ctl_name
,
id
);
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