All of lore.kernel.org
 help / color / mirror / Atom feed
* Still unhappy with removal of DXS controls
@ 2010-07-05 19:38 Soeren D. Schulze
  2010-07-05 22:25 ` Raymond Yau
  2010-07-06 10:37 ` Clemens Ladisch
  0 siblings, 2 replies; 7+ messages in thread
From: Soeren D. Schulze @ 2010-07-05 19:38 UTC (permalink / raw)
  To: alsa-devel; +Cc: clemens

[Sorry if this is a duplicate -- I was too stupid to subscribe the first
time and my mail hasn't been moderated yet, apparently.]

Me again...

Referring to the issue I described on 2010-03-28
[http://www.spinics.net/lists/alsa-devel/msg32731.html], the situation
hasn't changed since then.

In short, I *really* need to lower the DXS volumes in order to play
sound properly.  If I don't do it, I get massive distortion.

It's not a matter of the output stage, but of the input stage.  Lowering
PCM or Master doesn't help anything, but using softvol in mplayer does
(I need to get down to 20%, so I effectively hear 14-bit audio, nice...).

Back in March, Clemens told me to use hwmixvolume.  It's nice, I can now
access what I could previously access in alsamixer.  But when I close
the audio stream and start a new one, the volume is reset to 100% --
blowing my ears with loud and distorted sound.

So my solution for now is: stick with Linux 2.6.30...

Please, even if the solution with the DXS controls in alsamixer didn't
comply with the ALSA policies, *it did work*!  The current one *does
not*.  Maybe make the maximum (or default?) DXS volume available as a
mixer control or as a module option or something -- whatever you
consider the best solution.  But the current state is just not acceptable.


Thanks

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: Still unhappy with removal of DXS controls
  2010-07-05 19:38 Still unhappy with removal of DXS controls Soeren D. Schulze
@ 2010-07-05 22:25 ` Raymond Yau
  2010-07-06 10:37 ` Clemens Ladisch
  1 sibling, 0 replies; 7+ messages in thread
From: Raymond Yau @ 2010-07-05 22:25 UTC (permalink / raw)
  To: ALSA Development Mailing List

2010/7/6 Soeren D. Schulze <soeren.d.schulze@gmx.de>

> [Sorry if this is a duplicate -- I was too stupid to subscribe the first
> time and my mail hasn't been moderated yet, apparently.]
>
> Me again...
>
> Referring to the issue I described on 2010-03-28
> [http://www.spinics.net/lists/alsa-devel/msg32731.html], the situation
> hasn't changed since then.
>
> In short, I *really* need to lower the DXS volumes in order to play
> sound properly.  If I don't do it, I get massive distortion.
>
> It's not a matter of the output stage, but of the input stage.  Lowering
> PCM or Master doesn't help anything, but using softvol in mplayer does
> (I need to get down to 20%, so I effectively hear 14-bit audio, nice...).
>


In theory , DSP can also provide gain in addition to atten, so the maximum
volume may not be 0dB. you may need to calibrate the dB scale of this
control and set the default value to 0dB to prevent distortion due to
clipping.

I don't think mplayer know how to change these IFACE_PCM volume control
since only less than 10 sound cards support this hardware feature and only
three drivers have implemented this control


> Sören
>

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

* Re: Still unhappy with removal of DXS controls
  2010-07-05 19:38 Still unhappy with removal of DXS controls Soeren D. Schulze
  2010-07-05 22:25 ` Raymond Yau
@ 2010-07-06 10:37 ` Clemens Ladisch
  2010-07-06 20:43   ` Soeren D. Schulze
  1 sibling, 1 reply; 7+ messages in thread
From: Clemens Ladisch @ 2010-07-06 10:37 UTC (permalink / raw)
  To: Soeren D. Schulze; +Cc: alsa-devel

Soeren D. Schulze wrote:
> Please, even if the solution with the DXS controls in alsamixer didn't
> comply with the ALSA policies, *it did work*!  The current one *does
> not*.  Maybe make the maximum (or default?) DXS volume available as a
> mixer control or as a module option or something -- whatever you
> consider the best solution.

Please try this patch:

--- a/sound/pci/via82xx.c
+++ b/sound/pci/via82xx.c
@@ -85,6 +85,7 @@ static int joystick;
 static int ac97_clock = 48000;
 static char *ac97_quirk;
 static int dxs_support;
+static int dxs_init_volume = 31;
 static int nodelay;
 
 module_param(index, int, 0444);
@@ -103,6 +104,8 @@ module_param(ac97_quirk, charp, 0444);
 MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
 module_param(dxs_support, int, 0444);
 MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA, 5 = enable any sample rate)");
+module_param(dxs_init_volume, int, 0644);
+MODULE_PARM_DESC(dxs_init_volume, "initial DXS volume (0-31)");
 module_param(nodelay, int, 0444);
 MODULE_PARM_DESC(nodelay, "Disable 500ms init delay");
 
@@ -1245,8 +1248,10 @@ static int snd_via8233_playback_open(struct snd_pcm_substream *substream)
 		return err;
 	stream = viadev->reg_offset / 0x10;
 	if (chip->dxs_controls[stream]) {
-		chip->playback_volume[stream][0] = 0;
+		chip->playback_volume[stream][0] =
+				VIA_DXS_MAX_VOLUME - (dxs_init_volume & 31);
-		chip->playback_volume[stream][1] = 0;
+		chip->playback_volume[stream][1] =
+				VIA_DXS_MAX_VOLUME - (dxs_init_volume & 31);
 		chip->dxs_controls[stream]->vd[0].access &=
 			~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
 		snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE |

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

* Re: Still unhappy with removal of DXS controls
  2010-07-06 10:37 ` Clemens Ladisch
@ 2010-07-06 20:43   ` Soeren D. Schulze
  2010-07-07 13:01     ` Clemens Ladisch
  0 siblings, 1 reply; 7+ messages in thread
From: Soeren D. Schulze @ 2010-07-06 20:43 UTC (permalink / raw)
  To: alsa-devel

On 06.07.2010 12:37, Clemens Ladisch wrote:
> Soeren D. Schulze wrote:
>> Please, even if the solution with the DXS controls in alsamixer didn't
>> comply with the ALSA policies, *it did work*!  The current one *does
>> not*.  Maybe make the maximum (or default?) DXS volume available as a
>> mixer control or as a module option or something -- whatever you
>> consider the best solution.
> 
> Please try this patch:
> 
> --- a/sound/pci/via82xx.c
> +++ b/sound/pci/via82xx.c
> @@ -85,6 +85,7 @@ static int joystick;
>  static int ac97_clock = 48000;
>  static char *ac97_quirk;
>  static int dxs_support;
> +static int dxs_init_volume = 31;
>  static int nodelay;
>  
>  module_param(index, int, 0444);
> @@ -103,6 +104,8 @@ module_param(ac97_quirk, charp, 0444);
>  MODULE_PARM_DESC(ac97_quirk, "AC'97 workaround for strange hardware.");
>  module_param(dxs_support, int, 0444);
>  MODULE_PARM_DESC(dxs_support, "Support for DXS channels (0 = auto, 1 = enable, 2 = disable, 3 = 48k only, 4 = no VRA, 5 = enable any sample rate)");
> +module_param(dxs_init_volume, int, 0644);
> +MODULE_PARM_DESC(dxs_init_volume, "initial DXS volume (0-31)");
>  module_param(nodelay, int, 0444);
>  MODULE_PARM_DESC(nodelay, "Disable 500ms init delay");
>  
> @@ -1245,8 +1248,10 @@ static int snd_via8233_playback_open(struct snd_pcm_substream *substream)
>  		return err;
>  	stream = viadev->reg_offset / 0x10;
>  	if (chip->dxs_controls[stream]) {
> -		chip->playback_volume[stream][0] = 0;
> +		chip->playback_volume[stream][0] =
> +				VIA_DXS_MAX_VOLUME - (dxs_init_volume & 31);
> -		chip->playback_volume[stream][1] = 0;
> +		chip->playback_volume[stream][1] =
> +				VIA_DXS_MAX_VOLUME - (dxs_init_volume & 31);
>  		chip->dxs_controls[stream]->vd[0].access &=
>  			~SNDRV_CTL_ELEM_ACCESS_INACTIVE;
>  		snd_ctl_notify(chip->card, SNDRV_CTL_EVENT_MASK_VALUE |

Thanks a lot, it works just fine.

A short test (using only the ears) shows that 24 might be a good value,
perhaps even a bit lower.

Is there a chance to get this upstream so I can update the wiki?


Sören

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

* Re: Still unhappy with removal of DXS controls
  2010-07-06 20:43   ` Soeren D. Schulze
@ 2010-07-07 13:01     ` Clemens Ladisch
  2010-07-07 15:30       ` Soeren D. Schulze
  0 siblings, 1 reply; 7+ messages in thread
From: Clemens Ladisch @ 2010-07-07 13:01 UTC (permalink / raw)
  To: Soeren D. Schulze; +Cc: alsa-devel

Soeren D. Schulze wrote:
> Is there a chance to get this upstream?

Yes; would you be OK with this tag?
  Tested-by: Soeren D. Schulze <soeren.d.schulze@gmx.de>


Regards,
Clemens

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

* Re: Still unhappy with removal of DXS controls
  2010-07-07 13:01     ` Clemens Ladisch
@ 2010-07-07 15:30       ` Soeren D. Schulze
  2010-07-08  4:28         ` Raymond Yau
  0 siblings, 1 reply; 7+ messages in thread
From: Soeren D. Schulze @ 2010-07-07 15:30 UTC (permalink / raw)
  To: alsa-devel

On 07.07.2010 15:01, Clemens Ladisch wrote:
> Soeren D. Schulze wrote:
>> Is there a chance to get this upstream?
> 
> Yes; would you be OK with this tag?
>   Tested-by: Soeren D. Schulze <soeren.d.schulze@gmx.de>

Yes; I didn't test it that extensively, but it seems to fix the problem.

BTW, the value 24 is still too high if several streams are played at the
same time.


Sören

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

* Re: Still unhappy with removal of DXS controls
  2010-07-07 15:30       ` Soeren D. Schulze
@ 2010-07-08  4:28         ` Raymond Yau
  0 siblings, 0 replies; 7+ messages in thread
From: Raymond Yau @ 2010-07-08  4:28 UTC (permalink / raw)
  To: ALSA Development Mailing List

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

> On 07.07.2010 15:01, Clemens Ladisch wrote:
> > Soeren D. Schulze wrote:
> >> Is there a chance to get this upstream?
> >
> > Yes; would you be OK with this tag?
> >   Tested-by: Soeren D. Schulze <soeren.d.schulze@gmx.de>
>
> Yes; I didn't test it that extensively, but it seems to fix the problem.
>
> BTW, the value 24 is still too high if several streams are played at the
> same time.
>
>
> Sören
>

It depend on how DSP mix several voices together ( up to our voices in this
case)
it DSP just add the amplitide of two voices , it may need some kind of
atten to prevent clipping

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

end of thread, other threads:[~2010-07-08  4:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-05 19:38 Still unhappy with removal of DXS controls Soeren D. Schulze
2010-07-05 22:25 ` Raymond Yau
2010-07-06 10:37 ` Clemens Ladisch
2010-07-06 20:43   ` Soeren D. Schulze
2010-07-07 13:01     ` Clemens Ladisch
2010-07-07 15:30       ` Soeren D. Schulze
2010-07-08  4:28         ` 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.