All of lore.kernel.org
 help / color / mirror / Atom feed
* Handling of the DXS controls in the via82xx driver
@ 2010-03-27 23:04 Soeren D. Schulze
  2010-03-29  1:24 ` Raymond Yau
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Soeren D. Schulze @ 2010-03-27 23:04 UTC (permalink / raw)
  To: alsa-devel

Hi everyone,

before my latest upgrade to Linux 2.6.32 (yes, sorry, it's Debian), I
had four levers in my alsamixer: VIA DXS, VIA DXS 1, VIA DXS 2 and VIA
DXS 3.  They controlled the hardware mixing when accessing the sound
device multiple times.

Now they have disappeared.  I think I can pretty certainly trace this
down to commit 2fb930b53f513cbc4c102d415d2923a8a7091337 to Linux
[http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.32.y.git;a=commit;h=2fb930b53f513cbc4c102d415d2923a8a7091337],
which "move[s] DXS volume controls to PCM interface".

As I'm not an ALSA developer, I don't realize the intended effect of
this change, but the actual effect is that I cannot change the DXS
volumes any more.  mplayer still controls the global PCM volume.  Well,
in fact, there is one way.  While an mplayer is running, I can do:

amixer cset numid=47,iface=PCM,name='PCM Playback Volume' 24,24

When restarting mplayer, the volume is reset to 31,31 (maximum).  Commit
3d00941371a765779c4e3509214c7e5793cce1fe
[http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.33.y.git;a=commit;h=3d00941371a765779c4e3509214c7e5793cce1fe]
seems to be responsible for this.

The bad thing about it is that 31,31 is a really bad setting for my
poorly engineered sound card.  It distorts a lot.

I suspect that the real *bug* is that mplayer does not use the
per-channel DXS controls even though it's supposed to (which seems to be
why the DXS controls are called "PCM Playback Volume").

Personally, rather than fixing this bug, I would just revert to the
former state.  I was always happy with all the DXS levers set to 75%.


Thank you

Sören
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

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

* Re: Handling of the DXS controls in the via82xx driver
  2010-03-27 23:04 Handling of the DXS controls in the via82xx driver Soeren D. Schulze
@ 2010-03-29  1:24 ` Raymond Yau
  2010-03-29  1:39 ` Raymond Yau
  2010-03-29 12:56 ` Clemens Ladisch
  2 siblings, 0 replies; 7+ messages in thread
From: Raymond Yau @ 2010-03-29  1:24 UTC (permalink / raw)
  To: ALSA Development Mailing List

2010/3/28 Soeren D. Schulze <soeren.d.schulze@gmx.de>

> Hi everyone,
>
> before my latest upgrade to Linux 2.6.32 (yes, sorry, it's Debian), I
> had four levers in my alsamixer: VIA DXS, VIA DXS 1, VIA DXS 2 and VIA
> DXS 3.  They controlled the hardware mixing when accessing the sound
> device multiple times.
>
> Now they have disappeared.  I think I can pretty certainly trace this
> down to commit 2fb930b53f513cbc4c102d415d2923a8a7091337 to Linux
> [
> http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.32.y.git;a=commit;h=2fb930b53f513cbc4c102d415d2923a8a7091337
> ],
> which "move[s] DXS volume controls to PCM interface".
>
> As I'm not an ALSA developer, I don't realize the intended effect of
> this change, but the actual effect is that I cannot change the DXS
> volumes any more.  mplayer still controls the global PCM volume.  Well,
> in fact, there is one way.  While an mplayer is running, I can do:
>
> amixer cset numid=47,iface=PCM,name='PCM Playback Volume' 24,24
>
> When restarting mplayer, the volume is reset to 31,31 (maximum).  Commit
> 3d00941371a765779c4e3509214c7e5793cce1fe
> [
> http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.33.y.git;a=commit;h=3d00941371a765779c4e3509214c7e5793cce1fe
> ]
> seems to be responsible for this.
>
> The bad thing about it is that 31,31 is a really bad setting for my
> poorly engineered sound card.  It distorts a lot.
>
> I suspect that the real *bug* is that mplayer does not use the
> per-channel DXS controls even though it's supposed to (which seems to be
> why the DXS controls are called "PCM Playback Volume").
>
> Personally, rather than fixing this bug, I would just revert to the
> former state.  I was always happy with all the DXS levers set to 75%.
>
>
> Thank you
>
> Sören
>

Those are per voice volume control , they can be used for the hardware
acclearation in wine if wine implmenet the real hardware acceleration

After this change , they are not used by the mixer any more , only those
application which open those subdevices can find the corresponding control
by the subdevice number

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

* Re: Handling of the DXS controls in the via82xx driver
  2010-03-27 23:04 Handling of the DXS controls in the via82xx driver Soeren D. Schulze
  2010-03-29  1:24 ` Raymond Yau
@ 2010-03-29  1:39 ` Raymond Yau
  2010-03-29 12:56 ` Clemens Ladisch
  2 siblings, 0 replies; 7+ messages in thread
From: Raymond Yau @ 2010-03-29  1:39 UTC (permalink / raw)
  To: ALSA Development Mailing List

2010/3/28 Soeren D. Schulze <soeren.d.schulze@gmx.de>

> Hi everyone,
>
> amixer cset numid=47,iface=PCM,name='PCM Playback Volume' 24,24
>
> When restarting mplayer, the volume is reset to 31,31 (maximum).  Commit
> 3d00941371a765779c4e3509214c7e5793cce1fe
> [
> http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.33.y.git;a=commit;h=3d00941371a765779c4e3509214c7e5793cce1fe
> ]
> seems to be responsible for this.
>
> The bad thing about it is that 31,31 is a really bad setting for my
> poorly engineered sound card.  It distorts a lot.
>
>
>
> Sören
>

In theory , the driver should reset the per voice volume control to 0dB
after the subdevice is opened , may be something wrong in dB scale of these
volume control  if you get distorted sound

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

* Re: Handling of the DXS controls in the via82xx driver
  2010-03-27 23:04 Handling of the DXS controls in the via82xx driver Soeren D. Schulze
  2010-03-29  1:24 ` Raymond Yau
  2010-03-29  1:39 ` Raymond Yau
@ 2010-03-29 12:56 ` Clemens Ladisch
  2010-03-29 13:21   ` Soeren D. Schulze
  2010-03-31  1:39   ` Raymond Yau
  2 siblings, 2 replies; 7+ messages in thread
From: Clemens Ladisch @ 2010-03-29 12:56 UTC (permalink / raw)
  To: Soeren D. Schulze, alsa-devel

Soeren D. Schulze wrote:
> before my latest upgrade to Linux 2.6.32 (yes, sorry, it's Debian), I
> had four levers in my alsamixer: VIA DXS, VIA DXS 1, VIA DXS 2 and VIA
> DXS 3.  They controlled the hardware mixing when accessing the sound
> device multiple times.
> 
> Now they have disappeared.
> 
> As I'm not an ALSA developer, I don't realize the intended effect of
> this change,

Hiding these controls is an intended effect, because normal mixers
do not show application-specific controls that could go away or be
reset at any time.

> but the actual effect is that I cannot change the DXS volumes any
> more.

You can with the hwmixvolume tool in the alsa-tools package (version
1.0.23, not yet released).

> mplayer still controls the global PCM volume.  Well,
> in fact, there is one way.  While an mplayer is running, I can do:
> 
> amixer cset numid=47,iface=PCM,name='PCM Playback Volume' 24,24
> 
> When restarting mplayer, the volume is reset to 31,31 (maximum).

The old behaviour was considered buggy: these stream controls are
logically associated with a stream opened by an application, not with
a particular hardware stream.

> The bad thing about it is that 31,31 is a really bad setting for my
> poorly engineered sound card.  It distorts a lot.

If the card cannot handle any loud output, then all outputs from any
source must be restricted, so the logical place for lower volume would
be the "Master" or "PCM" controls.


Regards,
Clemens

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

* Re: Handling of the DXS controls in the via82xx driver
  2010-03-29 12:56 ` Clemens Ladisch
@ 2010-03-29 13:21   ` Soeren D. Schulze
  2010-03-31 23:00     ` Raymond Yau
  2010-03-31  1:39   ` Raymond Yau
  1 sibling, 1 reply; 7+ messages in thread
From: Soeren D. Schulze @ 2010-03-29 13:21 UTC (permalink / raw)
  To: alsa-devel

Clemens Ladisch wrote:
>> The bad thing about it is that 31,31 is a really bad setting for my
>> poorly engineered sound card.  It distorts a lot.
> 
> If the card cannot handle any loud output, then all outputs from any
> source must be restricted, so the logical place for lower volume would
> be the "Master" or "PCM" controls.

The problem is rather that it cannot handle loud *input*.  With loud
input from digital plus the respective DXS lever on high volume, it
apparently overdrives at a very early stage in the sound card.  Master
and PCM do not help anything any more.

The other workaround would probably be using softvol for reducing the
volume before it enters analog, but lowering the DXS levers is still
better IMHO.


Thank you

Sören

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

* Re: Handling of the DXS controls in the via82xx driver
  2010-03-29 12:56 ` Clemens Ladisch
  2010-03-29 13:21   ` Soeren D. Schulze
@ 2010-03-31  1:39   ` Raymond Yau
  1 sibling, 0 replies; 7+ messages in thread
From: Raymond Yau @ 2010-03-31  1:39 UTC (permalink / raw)
  To: ALSA Development Mailing List

2010/3/29 Clemens Ladisch <clemens@ladisch.de>

> Soeren D. Schulze wrote:
>
>
> > mplayer still controls the global PCM volume.  Well,
> > in fact, there is one way.  While an mplayer is running, I can do:
> >
> > amixer cset numid=47,iface=PCM,name='PCM Playback Volume' 24,24
> >
> > When restarting mplayer, the volume is reset to 31,31 (maximum).
>
> The old behaviour was considered buggy: these stream controls are
> logically associated with a stream opened by an application, not with
> a particular hardware stream.
>
> > The bad thing about it is that 31,31 is a really bad setting for my
> > poorly engineered sound card.  It distorts a lot.
>
> If the card cannot handle any loud output, then all outputs from any
> source must be restricted, so the logical place for lower volume would
> be the "Master" or "PCM" controls.
>
>
> Regards,
> Clemens
>
>
Correct me if I am wrong , ac97 codec support 16,18,20 bits resolution and
the ac97 specification mention that if a sample stream of resoultion is less
than 20 bits is transferred through ac97 link, the ac97 controller must
stuff all trailing invalid bits with zero.

This mean that the ac97 controller can provide a maximum of 12 dB gain if
your codec support 20 bits resolution , any gain over 12dB by the ac97
controller will lead to clipping

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

* Re: Handling of the DXS controls in the via82xx driver
  2010-03-29 13:21   ` Soeren D. Schulze
@ 2010-03-31 23:00     ` Raymond Yau
  0 siblings, 0 replies; 7+ messages in thread
From: Raymond Yau @ 2010-03-31 23:00 UTC (permalink / raw)
  To: ALSA Development Mailing List

2010/3/29 Soeren D. Schulze <soeren.d.schulze@gmx.de>

> Clemens Ladisch wrote:
> >> The bad thing about it is that 31,31 is a really bad setting for my
> >> poorly engineered sound card.  It distorts a lot.
> >
> > If the card cannot handle any loud output, then all outputs from any
> > source must be restricted, so the logical place for lower volume would
> > be the "Master" or "PCM" controls.
>
> The problem is rather that it cannot handle loud *input*.  With loud
> input from digital plus the respective DXS lever on high volume, it
> apparently overdrives at a very early stage in the sound card.  Master
> and PCM do not help anything any more.
>
> The other workaround would probably be using softvol for reducing the
> volume before it enters analog, but lowering the DXS levers is still
> better IMHO.
>
>
> Thank you
>
> Sören
>
>
did you set those per voice volume control to 0dB ?

try to play a sine wave of full amplitude and record using analog loopback
of ac97 codec and audacity to find out whether the sine wave is clipped

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

end of thread, other threads:[~2010-03-31 23:01 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-27 23:04 Handling of the DXS controls in the via82xx driver Soeren D. Schulze
2010-03-29  1:24 ` Raymond Yau
2010-03-29  1:39 ` Raymond Yau
2010-03-29 12:56 ` Clemens Ladisch
2010-03-29 13:21   ` Soeren D. Schulze
2010-03-31 23:00     ` Raymond Yau
2010-03-31  1:39   ` Raymond Yau

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.