1 |
On Wed, Apr 25, 2012 at 07:58:54PM +0100, Stroller wrote: |
2 |
> Hi guys, |
3 |
> |
4 |
> I've got a a little nettop which I'm trying to set up for XBMC. As I don't normally use Linux on the desktop, but primarily for headless servers, this has been a little bit of a journey for me, but I now have X11 and the nVidia drivers working, and basic audio playback. |
5 |
> |
6 |
> So this particular system (eMachines 1401) defaults to the headphone output, and I've learned that to get it to output over HDMI I have to run: |
7 |
> aplay -vvD plug:hdmi file.wav |
8 |
> |
9 |
> I also, then, have to enter alsamixer and unmute the "S/PDIF 1" output (that seems to be muted by default on this system) and audio starts coming through on the TV. |
10 |
> |
11 |
> So I want to set, of course, HDMI as the default output, so I created an /etc/asound.conf and put the following in it: |
12 |
> |
13 |
> pcm.!default { |
14 |
> type hw |
15 |
> card 0 |
16 |
> device 3 |
17 |
> } |
18 |
> |
19 |
> ctl.!default { |
20 |
> type hw |
21 |
> card 0 |
22 |
> device 3 |
23 |
> } |
24 |
> |
25 |
> |
26 |
> This is great! Now when I run aplay I can omit the "-D $devicename" flag and everything's good. |
27 |
> |
28 |
> Now I have to admit, I figured out the above more or less by trial and error (that, for instance, I can't describe the output as "card 0,3", but I have to have the separate device line), and the "pcm" and "ctl" parts, and the structure I just copied of the documentation at the ALSA website. I don't find that documentation very clear. |
29 |
> |
30 |
> So this is problematic the next time I reboot, because all of a sudden, now alsamixer doesn't work. In fact, I can demonstrate that the problem is related directly to this file: |
31 |
> |
32 |
> # alsamixer |
33 |
> cannot open mixer: Invalid argument |
34 |
> # rm /etc/asound.conf |
35 |
> # alsamixer |
36 |
> # echo $? |
37 |
> 0 |
38 |
> # |
39 |
> |
40 |
> So could anyone possibly explain this for me, please? |
41 |
> |
42 |
> I'm liable to have another question or two in a moment, but I'd initially just really love to understand why the alsa documentation says to have separate pcm.!default and ctl.!default definitions (instead of a single "everything.!default) and why alsamixer has now broke. |
43 |
> |
44 |
> Many thanks in advance for any help you can offer, |
45 |
> |
46 |
> Stroller. |
47 |
|
48 |
Just a shot in the dark here, Stroller, but I once had a problem with using |
49 |
a mixer app (not alsamixer, which worked). I couldn't get it to start, and |
50 |
it kept on giving an error like your's above for alsamixer. The problem was |
51 |
that the kernel module, snd-mixer-oss was not loading by default, and when I |
52 |
loaded that module, all was good. HTH. |
53 |
|
54 |
Terry |