All of lore.kernel.org
 help / color / mirror / Atom feed
* Spdif: Control interface
@ 2011-11-08 14:01 ajay khandelwal
  2011-11-08 20:43 ` Pavel Hofman
  0 siblings, 1 reply; 6+ messages in thread
From: ajay khandelwal @ 2011-11-08 14:01 UTC (permalink / raw)
  To: alsa-devel

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Spdif: Control interface
  2011-11-08 14:01 Spdif: Control interface ajay khandelwal
@ 2011-11-08 20:43 ` Pavel Hofman
  2011-11-09  5:28   ` ajay khandelwal
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Hofman @ 2011-11-08 20:43 UTC (permalink / raw)
  To: ajay khandelwal; +Cc: alsa-devel


Dne 8.11.2011 15:01, ajay khandelwal napsal(a):
> 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.
> 

Please post output of amixer contents to see the details.

Thanks,

Pavel.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Spdif: Control interface
  2011-11-08 20:43 ` Pavel Hofman
@ 2011-11-09  5:28   ` ajay khandelwal
  2011-11-09  7:50     ` Pavel Hofman
  0 siblings, 1 reply; 6+ messages in thread
From: ajay khandelwal @ 2011-11-09  5:28 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: alsa-devel

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.com>wrote:

>
> Dne 8.11.2011 15:01, ajay khandelwal napsal(a):
> > 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.
> >
>
> Please post output of amixer contents to see the details.
>
> Thanks,
>
> Pavel.
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Spdif: Control interface
  2011-11-09  5:28   ` ajay khandelwal
@ 2011-11-09  7:50     ` Pavel Hofman
  2011-11-09  8:13       ` Takashi Iwai
  0 siblings, 1 reply; 6+ messages in thread
From: Pavel Hofman @ 2011-11-09  7:50 UTC (permalink / raw)
  To: ajay khandelwal; +Cc: alsa-devel

Dne 9.11.2011 06:28, ajay khandelwal napsal(a):
> Hi Pavel,
>  Thanks for reply
> 
> 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%]

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.c;hb=HEAD#l874
. 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Spdif: Control interface
  2011-11-09  7:50     ` Pavel Hofman
@ 2011-11-09  8:13       ` Takashi Iwai
  2011-11-09  8:19         ` Pavel Hofman
  0 siblings, 1 reply; 6+ messages in thread
From: Takashi Iwai @ 2011-11-09  8:13 UTC (permalink / raw)
  To: Pavel Hofman; +Cc: ajay khandelwal, alsa-devel

At Wed, 09 Nov 2011 08:50:12 +0100,
Pavel Hofman wrote:
> 
> Dne 9.11.2011 06:28, ajay khandelwal napsal(a):
> > Hi Pavel,
> >  Thanks for reply
> > 
> > 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%]
> 
> 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 ?

Yes, from the design POV, it should have been an enum.
But changing this would break many working user-space setups, so no-go
for now.  Since AC97 is a legacy stuff, the worst thing is to break
something.


Takashi

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Spdif: Control interface
  2011-11-09  8:13       ` Takashi Iwai
@ 2011-11-09  8:19         ` Pavel Hofman
  0 siblings, 0 replies; 6+ messages in thread
From: Pavel Hofman @ 2011-11-09  8:19 UTC (permalink / raw)
  To: Takashi Iwai; +Cc: ajay khandelwal, alsa-devel

Dne 9.11.2011 09:13, Takashi Iwai napsal(a):
> At Wed, 09 Nov 2011 08:50:12 +0100,
> Pavel Hofman wrote:
>>
>> Dne 9.11.2011 06:28, ajay khandelwal napsal(a):
>>> Hi Pavel,
>>>  Thanks for reply
>>>
>>> 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%]
>>
>> 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 ?
> 
> Yes, from the design POV, it should have been an enum.
> But changing this would break many working user-space setups, so no-go
> for now.  Since AC97 is a legacy stuff, the worst thing is to break
> something.

Fair enough :)

Thanks,

Pavel.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-11-09  8:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-08 14:01 Spdif: Control interface ajay khandelwal
2011-11-08 20:43 ` Pavel Hofman
2011-11-09  5:28   ` ajay khandelwal
2011-11-09  7:50     ` Pavel Hofman
2011-11-09  8:13       ` Takashi Iwai
2011-11-09  8:19         ` Pavel Hofman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.