You are not logged in.

#1 2009-05-22 22:45:48

tidalwav1
Member
From: USA
Registered: 2007-05-20
Posts: 12
Website

Strange ALSA Muting Issue

I appear to be having issues similar to those described at http://bbs.archlinux.org/viewtopic.php?id=29341 , but that thread basically went unresolved.

My current ALSA configuration was generated by alsaconf, and output from the alsa-info script (http://www.alsa-project.org/alsa-info.sh) is located at http://pastebin.ca/1431278 .

I have these three issues:
    1) The PCM channel won't allow amixer to toggle it/alsamixer to mute it.
    2) The LineOut channel allows itself to be toggled/muted, but muting only has an effect when headphones ARE plugged in.
    3) An iSpeaker muting switch shows up in alsamixer. It only has an effect when headphones AREN'T plugged in.

I'd LIKE to have things set up so that either the PCM or LineOut channels can control volume AND muting using a single channel, regardless of whether headphones are plugged in (in other words, I'd like to control both volume and muting using ONLY PCM or ONLY LineOut.) This setup is required in order for GNOME's volume control to be set up to control both volume and muting, since this isn't possible with the current configuration (PCM doesn't allow itself to be muted, and LineOut/iSpeaker mutes only work depending on headphones [not] being plugged in.)

Hopefully an ALSA guru will see this and be able to help me. Any help would be much appreciated!

Last edited by tidalwav1 (2009-05-22 22:52:29)

Offline

#2 2009-05-23 05:08:25

tidalwav1
Member
From: USA
Registered: 2007-05-20
Posts: 12
Website

Re: Strange ALSA Muting Issue

So after bringing this issue up in #alsa on Freenode, one individual said that the fact the PCM channel doesn't mute is because I'm using an old version of alsa-driver.

Apparently alsa-driver is compiled into the kernel, and despite having the latest i686 kernel26 package installed (kernel26 2.6.29.4-1, which came out yesterday,) /proc/asound/version indicates that alsa-driver 1.0.18a is being used, when in fact as far as I know, the latest version of alsa-driver is 1.0.20.

If this is truly the issue, I wonder why the latest version of alsa-driver wasn't compiled into the latest kernel update?

Offline

#3 2009-06-07 09:28:28

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: Strange ALSA Muting Issue

tidalwav1 wrote:

So after bringing this issue up in #alsa on Freenode, one individual said that the fact the PCM channel doesn't mute is because I'm using an old version of alsa-driver.

Apparently alsa-driver is compiled into the kernel, and despite having the latest i686 kernel26 package installed (kernel26 2.6.29.4-1, which came out yesterday,) /proc/asound/version indicates that alsa-driver 1.0.18a is being used, when in fact as far as I know, the latest version of alsa-driver is 1.0.20.

If this is truly the issue, I wonder why the latest version of alsa-driver wasn't compiled into the latest kernel update?

Hi,
I dont have issue like you, but something else. I found on xbmc wiki page this:

NVidia HDMI Audio Patch

If you are using an NVidia chip set to pass audio over hdmi we will need to patch one of alsa's drivers. If not skip to the next step.

# cd ~
# wget ftp://ftp.alsa-project.org/pub/driver/a … 20.tar.bz2
# tar jxvf alsa-driver-1.0.20.tar.bz2
# cd alsa-driver-1.0.20
# wget -O ./sound/pci/hda/patch_nvhdmi.c http://allurgroceries.is-a-chef.com/n10/patch_nvhdmi.c
# export CONCURRENCY_LEVEL=2
# ./configure
# make
# sudo make install

Link for wiki:
http://xbmc.org/wiki/?title=XBMC_on_Arc … lling_ALSA

I will try to make a PKGBUILD for that but i dont promise anything smile

Today update 07.02.2009 11:27 still have older alsa-driver:
cat /proc/asound/version
Advanced Linux Sound Architecture Driver Version 1.0.18a.
Good luck.

Edit #1: Here is PKGBUILD i didnt installed it just compiled as user, i dont know how this safe is smile

# Maintainer: vr4b4c
# Orginal take from alsa-lib PKGBUILD Maintainer: judd <jvinet@zeroflux.org>

pkgname=alsa-driver
pkgver=1.0.20
pkgrel=1
pkgdesc="An alternative implementation of Linux sound support"
arch=('i686' 'x86_64')
url="http://www.alsa-project.org"
depends=('glibc')
optdepends=('python')
makedepends=('python')
license=('GPL')
options=(!libtool)
source=(ftp://ftp.alsa-project.org/pub/driver/$pkgname-$pkgver.tar.bz2)

build() {
  cd $srcdir/$pkgname-$pkgver
  wget -O ./sound/pci/hda/patch_nvhdmi.c http://allurgroceries.is-a-chef.com/n10/patch_nvhdmi.c
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$pkgdir install
}

I think installation is needed with -f switch exp:
sudo pacman -f -U alsa-driver-1.0.20-1-i686.pkg.tar.gz

Edit #2: Also if you dont have nvidia card that wget -O could be commented, and also its isnt a proper way to use wget in build()... use it on your own responsibility(if you comment wget -O there isnt anything strange left in PKGBUILD)

Last edited by vr4b4c (2009-06-07 10:07:20)

Offline

#4 2009-06-07 10:18:50

jacko
Member
Registered: 2007-11-23
Posts: 840

Re: Strange ALSA Muting Issue

Keep your source collection in the source() and then cp it from the $srcdir to the approapriate place before compilation. This helps when others are using your PKGBUILDs and need or want md5sums. Source can't be validated if it's fetched inside the build{}.

# Maintainer: vr4b4c
# Orginal take from alsa-lib PKGBUILD Maintainer: judd <jvinet@zeroflux.org>

pkgname=alsa-driver
pkgver=1.0.20
pkgrel=1
pkgdesc="An alternative implementation of Linux sound support"
arch=('i686' 'x86_64')
url="http://www.alsa-project.org"
depends=('glibc')
optdepends=('python')
makedepends=('python')
license=('GPL')
options=(!libtool)
source=(ftp://ftp.alsa-project.org/pub/driver/$pkgname-$pkgver.tar.bz2
               http://allurgroceries.is-a-chef.com/n10/patch_nvhdmi.c)
md5sum=()

build() {
  cd $srcdir/$pkgname-$pkgver
  cp ../patch_nvhdmi.c sound/pci/hda/patch_nvhdmi.c
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$pkgdir install
}

Last edited by jacko (2009-06-07 10:19:59)

Offline

#5 2009-06-07 11:43:35

vr4b4c
Member
Registered: 2008-12-30
Posts: 37

Re: Strange ALSA Muting Issue

Ok here is i think correct way:
Create directory inside your home with name: alsa-driver
Inside that folder create file PKGBUILD with this conntent:

# Maintainer: vr4b4c
# Orginal take from alsa-lib PKGBUILD Maintainer: judd <jvinet@zeroflux.org>

pkgname=alsa-driver
pkgver=1.0.20
pkgrel=1
pkgdesc="An alternative implementation of Linux sound support"
arch=('i686' 'x86_64')
url="http://www.alsa-project.org"
depends=('glibc')
optdepends=('python')
makedepends=('python')
license=('GPL')
options=(!libtool)
source=(ftp://ftp.alsa-project.org/pub/driver/$pkgname-$pkgver.tar.bz2
        patch_nvhdmi.diff)
md5sums=('19764c0b0b9bae43eba4395a4a0b4b14'
         '288858c7bc577e1029e96b4427e14e0b')

build() {
  cd $srcdir/$pkgname-$pkgver
  patch -p1 -i ../patch_nvhdmi.diff || return 1
  ./configure --prefix=/usr
  make || return 1
  make DESTDIR=$pkgdir install
}

Then in same directory create this file patch_nvhdmi.diff with this conntent

diff -uNr alsa-driver-1.0.20/alsa-kernel/pci/hda/patch_nvhdmi.c alsa-driver-1.0.20-hdmi/alsa-kernel/pci/hda/patch_nvhdmi.c
--- alsa-driver-1.0.20/alsa-kernel/pci/hda/patch_nvhdmi.c       2009-05-06 09:06:04.000000000 +0200
+++ alsa-driver-1.0.20-hdmi/alsa-kernel/pci/hda/patch_nvhdmi.c  2009-06-07 13:16:49.000000000 +0200
@@ -164,6 +164,7 @@
        { .id = 0x10de0007, .name = "MCP7A HDMI", .patch = patch_nvhdmi },
        { .id = 0x10de0067, .name = "MCP67 HDMI", .patch = patch_nvhdmi },
        { .id = 0x10de8001, .name = "MCP73 HDMI", .patch = patch_nvhdmi },
+        { .id = 0x10de0003, .name = "ID 3", .patch = patch_nvhdmi },
        {} /* terminator */
};

@@ -172,6 +173,7 @@
MODULE_ALIAS("snd-hda-codec-id:10de0007");
MODULE_ALIAS("snd-hda-codec-id:10de0067");
MODULE_ALIAS("snd-hda-codec-id:10de8001");
+MODULE_ALIAS("snd-hda-codec-id:10de0003");

MODULE_LICENSE("GPL");
MODULE_DESCRIPTION("Nvidia HDMI HD-audio codec");

Then: "makepkg -s" without quote inside that directory.

Patch is used because patch_nvhdmi.c from wget -O links is used on old version of alsa-driver. This one is applied ok on the file version inside pkgbuild. Thnx gimli for helping with diff file.

Here it compiles fine, didnt tryed jet to install it. Does it fix or breake something i dont know.

makepkg -s debug:

*** This is a `staged' install using the prefix
***     "/home/crow/alsa-driver/pkg".
***
*** Once the modules have been moved to their final destination you must run the command
***     "/sbin/depmod -a 2.6.29-ARCH ".
***
*** Alternatively, if you build a package (e.g. rpm), include the
*** depmode command above in the post-(un)install procedure.
cat WARNING

WARNING!!! The mixer channels for the ALSA driver are muted by default!!!
**************************************************************************
You would use some ALSA or OSS mixer to set the appropriate volume.

==> Tidying install...
  -> Compressing man pages...
  -> Stripping debugging symbols from binaries and libraries...
  -> Removing libtool .la files...
==> Creating package...
  -> Generating .PKGINFO file...
  -> Compressing package...
==> Leaving fakeroot environment.
==> Finished making: alsa-driver 1.0.20-1 i686 (Sun Jun  7 13:42:59 CEST 2009)

depmod is needed after install.

Last edited by vr4b4c (2009-06-07 11:45:38)

Offline

#6 2009-06-07 18:13:02

tidalwav1
Member
From: USA
Registered: 2007-05-20
Posts: 12
Website

Re: Strange ALSA Muting Issue

I appreciate the work you've done, but isn't it kind of missing the point? Why isn't the latest alsa-driver included in the official Arch kernel packages?

Offline

#7 2009-06-10 02:34:53

serph
Member
Registered: 2009-06-10
Posts: 3

Re: Strange ALSA Muting Issue

Hi, I've used the above PKGBUILD to update to alsa-driver 1.0.20 because my internal speakers don't mute when I plugin headphones.

[root@host ~]# modprobe snd_hda_intel
FATAL: Error inserting snd_hda_intel (/lib/modules/2.6.29-ARCH/kernel/sound/pci/hda/snd-hda-intel.ko): Unknown symbol in module, or unknown parameter (see dmesg)
[root@host ~]# dmesg
.....
snd_hda_codec: Unknown symbol snd_verbose_printk
snd_hda_codec: Unknown symbol _snd_ctl_add_slave
snd_hda_intel: Unknown symbol snd_hda_bus_new
snd_hda_intel: Unknown symbol snd_hda_build_pcms
snd_hda_intel: Unknown symbol snd_verbose_printk
snd_hda_intel: Unknown symbol snd_hda_codec_new
snd_hda_intel: Unknown symbol snd_hda_queue_unsol_event
snd_hda_intel: Unknown symbol snd_hda_power_up
snd_hda_intel: Unknown symbol snd_hda_power_down
snd_hda_intel: Unknown symbol snd_hda_calc_stream_format
snd_hda_intel: Unknown symbol snd_hda_suspend
snd_hda_intel: Unknown symbol snd_hda_resume
snd_hda_intel: Unknown symbol snd_hda_build_controls
snd_hda_intel: Unknown symbol snd_card_create

I've tried depmod -a.

Help?

Offline

#8 2009-07-01 11:25:59

ALLurGroceries
Member
Registered: 2009-07-01
Posts: 1

Re: Strange ALSA Muting Issue

Hello Arch users,

I'm sorry to resurrect a dead thread, but I thought I should explain the patch that you are linking to on my webserver. All the patch does is add two lines to enable the "ID 3" codec preset to be recognized by the driver:

Line 167:

{ .id = 0x10de0003, .name = "ID 3", .patch = patch_nvhdmi },

Line 176:

MODULE_ALIAS("snd-hda-codec-id:10de0003");

I use this patch for my ASUS N10J which has an NVIDIA 9300M GS (it reports itself as 'ID 3' and thus needs the patch so that the driver recognizes it for HDMI audio). There is also a new 7.1 channel patch that you can find here. That is also the place to go if the URL you've referenced above stops working wink

Again sorry for gravedigging, but I hope this helps someone in the future.

Edit: Also for reference I have only used this patch on ALSA 1.0.19 and 1.0.20 as of now.

Last edited by ALLurGroceries (2009-07-01 12:00:09)

Offline

Board footer

Powered by FluxBB