# ALSA PCM Control Not Working for snd-oxygen

## the8lack8ox

Lately, I've been using git snapshots to install alsa-driver, since I required a recent bugfix for my Claro Halo card.  With the release of 1.0.20, I want to use the alsa-driver provided by portage.  After switching, however, my PCM volume control no longer has any effect, and it seems to be stuck at full gain.  Moreover, Audacious now refuses to use the 24-bit output format, just working with 16-bit.  This is really bad, since my card is very loud and only gets comfortable with the Master control turned down to about 5 or 7.  I have very little control over the volume this way.

As part of my installation, I removed the /lib/modules/2.6.29-gentoo-r3 directory and reinstalled all modules to clean up the environment.

For some reason, the configure lines strike me as important.  When I was installing the git snapshot, I used the following:

```
./configure --with-sequencer=no --with-oss=no --with-cards=oxygen,emu10k1
```

With sequencer or oss turned on, I always got errors at boot that caused the git tree drivers to fail to load entirely.

When I go to install the portage driver, it does this:

```
./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --without-oss --without-pcm-oss-plugins --without-debug --with-kernel=/usr/src/linux --with-build=/lib/modules/2.6.29-gentoo-r3/build --with-redhat=no --with-suse=no --with-isapnp=auto --with-sequencer --with-cards= emu10k1 oxygen       --with-card-options=all --build=x86_64-pc-linux-gnu
```

I really don't know what magic causes the sequencer driver to work with the portage install.  But maybe it doesn't.  Is it possible that the sequencer has something to do with what's going on?  Does anyone have any ideas?  Thanks in advance.

----------

## the8lack8ox

Hand-edited ebuild to remove sequencer modules.  Didn't do anything.  Didn't think it would, really.

----------

## the8lack8ox

My old drivers that used to work no longer do now, suffering from the same issues.  Drivers don't really seem to be the problem anymore.  I've tried downgrading everything back to 1.0.19 to no avail.  I kinda think some config file must be what's wrong now, but after downgrading everything I really have no idea.

----------

## EzInKy

Have you tried the in kernel drivers? I have a couple of Claro+ that "just work" with them.

----------

## the8lack8ox

 *EzInKy wrote:*   

> Have you tried the in kernel drivers? I have a couple of Claro+ that "just work" with them.

 

I have a Claro Halo.  The headphone output, which is passed thru a built-in headphone amp, requires a fix that is only available in the 1.0.20 release right now.  This version is not bundled with the kernel yet, as it was only released yesterday (my kernel says it's got 1.0.18a actually).  My reason for using the git code before was due to the headphone output; the git snapshots were the only place to get a driver that supported the headphone output (after I pestered the developers about it).  Now that 1.0.20 is finally available, I want to switch.

After playing around a little more, I can still only conclude that I have no idea what's going on.  PCM control was working fine before, but now it's dead.  Even if I try to revert my system back to it's last working state, it stays dead.

For the record:

git source - everything ok

installed 1.0.20 alsa-driver from portage - no PCM control & 24-bit output stops working from Audacious

installed 1.0.20 alsa-driver manually - same

back to git source (old version) - still same

Seems like some configuration got changed.  Don't think it can be the code.

----------

## EzInKy

I see, and certainly understand needing the latest drivers to get things to work. I'm using the git-sources for my kernel right now due to some flakiness with ICH10 chipsets. Your original post didn't mention the headset so I assumed the PCM control was the only issue, sorry.

----------

## the8lack8ox

Now I've done it.  I removed the /var/lib/alsa/asound.state file, set the init script to not save mixer levels, and rebooted.  The PCM control no longer appears at all.    :Evil or Very Mad: 

----------

## the8lack8ox

Victory!!  I found a way to fix it.  First, remove the old /var/lib/alsa/asound.state file, which gets corrupted I believe.  Then, take the old /usr/share/alsa/CMI8788.conf from version 1.0.19 and use it to replace the new CMI8788.conf (in the same location) that 1.0.20 installs.  Seems like the new file is missing some lines that setup the PCM control or something (I really don't understand how these conf files work).

```
--- /usr/share/alsa/cards/CMI8788.conf.old   2009-05-07 04:20:05.951229301 -0400

+++ /usr/share/alsa/cards/CMI8788.conf   2009-05-07 04:34:12.396042955 -0400

@@ -13,7 +13,7 @@

    card $CARD

 }   

 

-# default with dmix & dsnoop

+# default with dmix+softvol & dsnoop

 CMI8788.pcm.default {

    @args [ CARD ]

    @args.CARD {

@@ -23,8 +23,15 @@

    playback.pcm {

       type plug

       slave.pcm {

-         @func concat

-         strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]

+         type softvol

+         slave.pcm {

+            @func concat

+            strings [ "dmix:" $CARD ",FORMAT=S32_LE" ]

+         }

+         control {

+            name "PCM Playback Volume"

+            card $CARD

+         }

       }

    }

    capture.pcm {

```

EDIT: Ok.  Not complete victory.  For some reason, this only works when using the "default" PCM handle and not with "hw" or "plughw."  Also, this change seems to have been the source of the issue.

 *Quote:*   

>     - oxygen: remove softvol plugin 
> 
>     The change that removed the Master controls for Xonar D2(X) cards was 
> 
>     reverted, so we don't need to use the softvol plugin anymore ... 
> ...

 

----------

