[alsa-devel] Spdif: Control interface
Hi All, On my PC SPDIF control is exposing mute and volume control.
I understand for mute but how volume control is exported for digital audio.
Best Regards, Ajay
Hi Pavel, Thanks for reply
Following is output of amixer.
you can search with iec958
[root@dlhl1071 smp_scripts]# amixer Simple mixer control 'Master',0 Capabilities: pvolume pswitch penum Playback channels: Front Left - Front Right Limits: Playback 0 - 31 Mono: Front Left: Playback 31 [100%] [0.00dB] [off] Front Right: Playback 31 [100%] [0.00dB] [off] Simple mixer control 'Master Mono',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined penum Playback channels: Mono Limits: Playback 0 - 31 Mono: Playback 0 [0%] [-46.50dB] [off] Simple mixer control 'Headphone',0 Capabilities: pvolume pswitch penum Playback channels: Front Left - Front Right Limits: Playback 0 - 31 Mono: Front Left: Playback 31 [100%] [0.00dB] [on] Front Right: Playback 31 [100%] [0.00dB] [on] Simple mixer control 'Headphone Jack Sense',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'PCM',0 Capabilities: pvolume pswitch penum Playback channels: Front Left - Front Right Limits: Playback 0 - 31 Mono: Front Left: Playback 31 [100%] [12.00dB] [on] Front Right: Playback 31 [100%] [12.00dB] [on] Simple mixer control 'Line',0 Capabilities: pvolume pswitch cswitch cswitch-exclusive penum Capture exclusive group: 0 Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: Playback 0 - 31 Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off] Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off] Simple mixer control 'Line Jack Sense',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'CD',0 Capabilities: pvolume pswitch cswitch cswitch-exclusive penum Capture exclusive group: 0 Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: Playback 0 - 31 Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off] Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off] Simple mixer control 'Mic',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-exclusive penum Capture exclusive group: 0 Playback channels: Mono Capture channels: Front Left - Front Right Limits: Playback 0 - 31 Mono: Playback 0 [0%] [-34.50dB] [off] Front Left: Capture [on] Front Right: Capture [on] Simple mixer control 'Mic Boost (+20dB)',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'Mic Select',0 Capabilities: enum Items: 'Mic1' 'Mic2' Item0: 'Mic2' Simple mixer control 'Video',0 Capabilities: cswitch cswitch-exclusive penum Capture exclusive group: 0 Capture channels: Front Left - Front Right Front Left: Capture [off] Front Right: Capture [off] Simple mixer control 'Phone',0 Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-exclusive penum Capture exclusive group: 0 Playback channels: Mono Capture channels: Front Left - Front Right Limits: Playback 0 - 31 Mono: Playback 0 [0%] [-34.50dB] [off] Front Left: Capture [off] Front Right: Capture [off] Simple mixer control 'IEC958',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off] Simple mixer control 'IEC958 Playback AC97-SPSA',0 Capabilities: volume volume-joined penum Playback channels: Mono Capture channels: Mono Limits: 0 - 3 Mono: 3 [100%] Simple mixer control 'IEC958 Playback Source',0 Capabilities: enum Items: 'AC-Link' 'A/D Converter' Item0: 'AC-Link' Simple mixer control 'Aux',0 Capabilities: pvolume pswitch cswitch cswitch-exclusive penum Capture exclusive group: 0 Playback channels: Front Left - Front Right Capture channels: Front Left - Front Right Limits: Playback 0 - 31 Front Left: Playback 0 [0%] [-34.50dB] [off] Capture [off] Front Right: Playback 0 [0%] [-34.50dB] [off] Capture [off] Simple mixer control 'Mono Output Select',0 Capabilities: enum Items: 'Mix' 'Mic' Item0: 'Mix' Simple mixer control 'Capture',0 Capabilities: cvolume cswitch penum Capture channels: Front Left - Front Right Limits: Capture 0 - 15 Front Left: Capture 15 [100%] [22.50dB] [on] Front Right: Capture 15 [100%] [22.50dB] [on] Simple mixer control 'Mix',0 Capabilities: cswitch cswitch-exclusive penum Capture exclusive group: 0 Capture channels: Front Left - Front Right Front Left: Capture [off] Front Right: Capture [off] Simple mixer control 'Mix Mono',0 Capabilities: cswitch cswitch-exclusive penum Capture exclusive group: 0 Capture channels: Front Left - Front Right Front Left: Capture [off] Front Right: Capture [off] Simple mixer control 'External Amplifier',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [on] Simple mixer control 'Stereo Mic',0 Capabilities: pswitch pswitch-joined penum Playback channels: Mono Mono: Playback [off]
On Wed, Nov 9, 2011 at 2:13 AM, Pavel Hofman pavel.hofman@ivitera.comwrote:
Dne 9.11.2011 06:28, ajay khandelwal napsal(a):
Thanks. I assume you mean this control. For meaning of this control see e.g. http://alsa.opensrc.org/Realtek_ALC650#SPDIF_support
It is not related to volume, IMO capabilities of this control are incorrect, there should be "enum" instead. Perhaps changing SNDRV_CTL_ELEM_TYPE_INTEGER to SNDRV_CTL_ELEM_TYPE_ENUMERATED ?
The code around this control is http://git.alsa-project.org/?p=alsa-kmirror.git;a=blob;f=pci/ac97/ac97_codec... . Perhaps the
.info = snd_ac97_info_volsw
should use a different method, setting the ENUM type.
Unfortunately, I do not have the HW to test any changes.
Regards,
Pavel.
participants (3)
-
ajay khandelwal
-
Pavel Hofman
-
Takashi Iwai