I bought a new machine last week, the sound comes from an Intel HDA
audio device (CONFIG_SND_HDA_INTEL) which provides *both* HDMI and
analogue outputs.  I don't use pulse and have no wish to.

 aplay -l shows:
**** List of PLAYBACK Hardware Devices ****
card 0: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC887-VD Analog
[ALC887-VD Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 1: ALC887-VD Digital
[ALC887-VD Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

 Note that card 0 is HDMI, so the regular sound (jack to my amp) was
silent.  That has been fixed by creating ~/.asoundrc (it can also go
in /etc/asound.conf but I haven't tested that) with :
# card 0 is the hdmi
pcm.!default {
type hw
card 1
}

ctl.!default {
type hw
card 1
}

 In alsamixer I can move to the second card [F6 before creating
asoundrc] and unmute it.  The combination allowed alsamixer to
control the volume - which is nice, but takes up a terminal and isn't
mouse-friendly.

 I've been using gvolwheel, but it came up muted (level set to 0 -
it doesn't use a 'mute' control) and didn't alter the volume no
matter where it was set - e.g. alsamixer and vlc would play at their
expected volumes whether the gvolwheel slider was set to 0, 100, or
anywhere else.

 Eventually I discovered that gvolwheel was using the old oss
/dev/mixer which presumably only finds the first sound card.  Then
I remembered that I'd done that [ --enable-oss in configuring
gvolwheel ] because otherwise, on my previous machines, it wouldn't
appear until after I'd used alsamixer.  That made it match the old
gtk2 version of gvolwheel which was oss-only.

 So, I rebuilt gvolwheel to use alsa : strace now showed it was
trying to open /dev/snd/controlC1 - and apparently succeeding - but
still reporting "Error opening mixer device".

 I thought I'd managed to fix it by running 'alsactl init', but I
was wrong.  After a lot more experimentation I found that I need to
run "alsactl store" to make it work.  That is what the BLFS alsa
bootscript runs on _shutdown_.  NB invoking alsamixer didn't fix it
on this machine.

 This makes me feel very confused!  Early days, but I guess I can
test this (using alsa in gvolwheel) on the other machines, with a
hacked-up script to run alsactl store.  But it seems back-to-front.

 I thought about running alsactl, as a user, from .xinitrc but I
can't run 'store' : Cannot open /var/lib/alsa/asound.state for
writing: Permission denied

 So, I suppose I ought to change the gvolwheel build.  But it then
needs a bootscript to run alsactl store at startup (otherwise the
gvolwheel icon doesn't appear).  Would it be sensible to add that
to the bootscripts, called e.g. "gvolwheel", or is there a better
solution ?

 And would it be worth me documenting the use of card 1 in the alsa
section of the book ?

ĸen
-- 
das eine Mal als Tragödie, das andere Mal als Farce
-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-dev
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to