|
Sound on Sigillo
Status
- Sound is working great -- from 2 August 2004 finally also the headphones!!
-
See Sound for software, guides, and commands.
- Public Address mode: ~/scripts/PA and ~/scripts/nonPA to turn off
- Microphone is finally working on 12 February 2005 -- I can use skype and gnomemeeting!
Remaining questions:
- Why do I only get mono on IEC958 (bugreport)?
- Why
is alsactl failing to fully restore IEC958 playback settings
(bugreport)? (solved by running "alsactl restore" twice at boot)
- Can I map headphone volume control to an available mixer control?
- Try .asoundrc -- see overview and guide
- See test version at /etc/asound.conf-remap (not working but the right idea?)
- In xmms, you can use alsa's "software volume control" (beep hasn't ported this feature yet)
Bug reports
Include in bug report:
- hardware and software details
- Card: ALI 5451 PCI AC-Link Controller
- Chip: Analog Devices AD1981A
- cat /proc/asound/card0/codec97#0/* (AC97 status and register dump)
- cat /proc/asound/card0/pcm0p/sub0/* (PCM status)
- cat /proc/asound/card0/pcm0p/sub0/* (active device)
In /usr/src/linux/sound/pci/ali5451/ali5451.c (the driver source code) it says (line 1855),
/* spdif aplayback switch */
/* FIXME: "IEC958 Playback Switch" may conflict with one on ac97_codec */
ALI5451_SPDIF("IEC958 Output switch", 0, 0),
Might be related to some of the difficulties I've been having.
$ amixer info
Card default 'A5451'/'ALI 5451 at 0x1000, irq 10'
Mixer name : 'Analog Devices AD1981A'
Components : 'AC97a'
Controls : 31
Simple ctrls : 20
Hints
- You need alsa-utils, which contains
amixer, and the frontend kmix, which goes into the KDE systray (there's also alsamixer,
alsamixergui, gtk-aumix and gnome-alsamixer)
- ALSA comes with the volume level
reset to zero at boot -- reset with a mixer and issue alsactl store
- From kernel 2.6.10-ac6 onwards, switch off Headphone Jack Sense and Line Jack Sense (they turn off internal speakers)
- The mixer levels can be saved and restored with these commands:
- alsactl restore
- alsactl store
- this is done
automatically in /etc/init.d/alsa
- but at bootup the restore for IEC958
isn't working
- so I put it in /etc/init.d/bootmisc.sh too
- default sound profile is /var/lib/alsa/asound.state
- For headphones (details below):
- Use alsaplayer or xmms -- the volume control works for the headphones
- In xmms (but not yet beep) you can select "Software volume control"
- cf. Preferences | Output plugin (alsa) | Alsa driver configuration |
- To hear the modem through the headphones,
- activate recording for the phone mixer channel
- if you don't do this, you won't hear a thing whenplugged into the headphone jack
- Leaving the "Mic" mixer control at a high volume
causes the keyboard input
to generate a buzz -- in fact even the fan sound is boosted, both in
the speakers and in the headphones, so turn the volume way down or mute
it. If the "Mic Boost +20..." mixer control is on, you get a huge
amount of noise, so mute it (could be useful for
using a mic of course)
- xmms has a "goodnight" plugin that lets you set how long xmms should play before turning off
- In alsamixer, press Fn+/ to see the contents of /proc/asound!
- Cf. Alsa details on IEC958 (home page)
Microphone
The microphone setting isn't properly controlled by the mixers, so use scripts or leave in default alsactl.
Recording mode -- use the following settings (see ~/scripts/record):
- control 9 "Mic Playback Switch" value false (default is true)
- amixer -c 0 cset iface=MIXER,name="Mic Playback Switch" off
- amixer -c 0 cset numid=9 off (makes no difference)
- control 20 "Capture Source" value.0 Mic and value.1 Mic (default is Line)
- amixer -c 0 cset iface=MIXER,name="Capture Source" Mic,Mic
- amixer -c 0 cset numid=20 0,0
- control 21 "Capture Switch" value.0 true and value.1 true (default is false)
- amixer -c 0 cset iface=MIXER,name="Capture Switch" on,on
- amixer -c 0 cset numid=21 on,on
- control 22 "Capture Volume" value.0 3 and value.1 3 (default is 0 on both)
- amixer -c 0 cset iface=MIXER,name="Capture Volume" 3,3
- amixer -c 0 cset numid=22 3,3
I'm getting a lot of static with this setup -- and the results seem
variable, but skype works great and I think this is really all there's
to it. Note that this setting is compatible with music playback and
could be used as the default alsa configuration (except control 9?).
Public Address mode -- use the following settings (see ~/scripts/PA and nonPA):
- the "IEC958 Playback Source" marked "A/D Conv" --
Analog/Digital Conversion -- functions as a switch to turn PA (Public
Address) off and on (if Capture is unmuted)
- this control is not visible in KMix or Alsamixergui or Aumix
- I make the PA work
- alsactl store -f a (make sure it doesn't already exist)
- alsactl restore (which turns it off)
- alsactl store -f b
- xxdiff a b
- the difference is in four places -- here is the value for PA working vs default:
- control 9 "Mic Playback Switch" value false (default is true)
- amixer -c 0 cset numid=9 off (makes no difference)
- control 20 "Capture Source" value.0 Mic and value.1 Mic (default is Line or Mix)
- amixer -c 0 cset numid=20 0,0
- control 21 "Capture Switch" value.0 true and value.1 true (default is false)
- amixer -c 0 cset iface=MIXER,name="Capture Switch" on,on
- amixer -c 0 cset numid=21 on,on
- control 28 "IEC958 Playback Source" value 'A/D Converter' (default AC-Link)
- amixer -c 0 cset iface=MIXER,name="IEC958 Playback Source" 1
- amixer -c 0 cset numid=28 1
- store the profile for PA in /var/lib/alsa/asound.state-PA
- you have to turn the IEC958 Playback Switch (control 26) off and on to make it work:
- amixer -c 0 cset numid=26 off | sleep 1 | amixer -c 0 cset numid=26 on
- I put it in a script in ~/scripts/PA and nonPA -- it works!
- I even made a desktop icon -- click and you have a PA system
- Aumix has a "Digital 1" control the others are lacking
Possible refinements? Here's the values before running ~/scripts/record -- I issue,
# amixer scontents
and get this for the microphone channels:
Simple mixer control 'Mic',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Mono
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono: Playback 31 [100%] [on]
Front Left: Capture [off]
Front Right: Capture [off]
Simple mixer control 'Mic Boost (+20dB)',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [on]
So it may be possible to set the Mic to one of the "Capabilities"
values -- or are those all automatic? What about activating the Front
Right Capture? Yes, my ~/scripts/PA script does do that!
Here are the values after running ~/scripts/record:
Simple mixer control 'Mic',0
Capabilities: pvolume pvolume-joined pswitch pswitch-joined cswitch cswitch-joined cswitch-exclusive
Capture exclusive group: 0
Playback channels: Mono
Capture channels: Front Left - Front Right
Limits: Playback 0 - 31
Mono: Playback 31 [100%] [off]
Front Left: Capture [on]
Front Right: Capture [on]
Simple mixer control 'Mic Boost (+20dB)',0
Capabilities: pswitch pswitch-joined
Playback channels: Mono
Mono: Playback [off]
So mono is off and both capture channels are on; in fact I'm getting stereo recording this way.
Headphones
The headphone jack pretends to be an
S/PDIF output device. To activate it for headphones, open a mixer.
Alsamixer has the clearest terms:
- Turn IEC958 on
- Set IEC958 Playback AC97-SPSA to 0 (pcm out is S/PDIF out)
- Set IEC958 Playback Source to Analog/Digital conversion
- Turn Headphone Jack Sensor off (kernel 2.6.10 onwards)
Once this is working, duplicate the settings in KMix so that they will become default. The IEC958 button is in the "Advanced"
panel. (The option to make the setting default is in the KDE Control Panel.)
The various modes of IEC958 Playback AC97-SPSA can also be set
with Fn+F8 (the S/PDIF key), but the mixer doesn't pick up on changes
made with the keyboard.
The upsampling may or may not be working. Stereo is not
working (see below for details -- the IEC958 channel is listed as mono), but the quality is good. Balance is also not working.
The only players that lets you control the volume is alsaplayer and xmms. If may be possible to fix this; cf. some sophisticated moves with digital output (external).
Sometimes the sound quality is poor -- it sounds as if the
singer is under water, barely intelligible. Issue "alsactr restore" or reset the IEC958
Playback AC97-SPSA value in the mixer or issue a amixer command (below); that fixes it. Somehow the
setting gets unstuck at times.
When ALSA's OSS emulation is available (snd-pcm-oss kernel
module is loaded), PCM sound is sometimes heard in the headphones -- it
sounds terrible, and if this happens the channel should just be muted. (This effect is not reproducible.)
Controlling volume:
- None of the sliders in kmix, aumix, or alsamixergui work for the headphones
- it may be possible to remap the controls; cf. ideas
- Ask alsa-devel about about alsaplayer's volume slider, not present in any mixer
- it's likely a software volume control, such as the one in xmms
Turning on headphone sound with KMix:
- check the IEC958 button in the "Advanced" panel in KMix
- turn the AC97 slider bar to 0, all the way down
- If the sound quality is poor, just open a mixer and redo this setting --
that fixes it!
- alternatively issue "alsactrl restore"
On the keyboard:
- S/PDIF must be at 0, as it is by default (Fn-F8)
Players:
- Use alsaplayer or xmms -- the volume control works for the headphones
- In xmms (but not yet beep) you can select "Software volume control"
- cf. Preferences | Output plugin (alsa) | Alsa driver configuration |
Stereo?
- I'm not getting stereo in the headphones
- see /proc below -- IEC958 is mono only
Modem:
- To hear the modem through the headphones,
- activate recording for the phone mixer channel
- if you don't do this, you won't hear the modem at all when something is plugged into the headphone jack!
- there may be a condition where you can control volume with the phone mixer volume slider! (only happened once)
- the phone speakers can be on or off
Mixer output
On 18 August 2004 I figured out how to use amixer to get command-line control of the
sound card, with the idea that I would be able to include a command in the script to
reset the IEC958 Playback and Source (I later concluded "alsactl restore" did the job). Here's what I learned (see man amixer):
- amixer (no arguments - get current settings in some detail)
- amixer -c 0 scontrols (show all devices, like this:
Simple mixer control 'Master',0
Simple mixer control 'Master Mono',0
Simple mixer control 'Headphone',0
Simple mixer control 'PCM',0
Simple mixer control 'Line',0
Simple mixer control 'CD',0
Simple mixer control 'Mic',0
Simple mixer control 'Mic Boost (+20dB)',0
Simple mixer control 'Video',0
Simple mixer control 'Phone',0
Simple mixer control 'IEC958',0
Simple mixer control 'IEC958 Playback AC97-SPSA',0
Simple mixer control 'IEC958 Playback Source',0
Simple mixer control 'Aux',0 Simple mixer control 'Capture',0
Simple mixer control 'Mix',0 Simple mixer control 'Mix Mono',0
Simple mixer control 'External Amplifier',0
List all available "simple controls" -- and show the IEC958 subset:
- amixer controls | grep IEC958
numid=23,iface=MIXER,name='IEC958 Playback Con Mask'
numid=24,iface=MIXER,name='IEC958 Playback Pro Mask'
numid=27,iface=MIXER,name='IEC958 Playback AC97-SPSA'
numid=25,iface=MIXER,name='IEC958 Playback Default'
numid=28,iface=MIXER,name='IEC958 Playback Source'
numid=26,iface=MIXER,name='IEC958 Playback Switch'
Of this list, only the following have values -- and note that they agree the channel is mono:
- amixer -c 0 sget 'IEC958 Playback AC97-SPSA'
Simple mixer control 'IEC958 Playback AC97-SPSA',0
Capabilities: volume volume-joined
Playback channels: Mono Limits: 0 - 3
Mono: 0 [0%]
- amixer -c 0 sget 'IEC958 Playback Source'
Simple mixer control 'IEC958 Playback Source',0
Capabilities:
Mono:
You can also query the capabilities of the card using the numerical ID:
- amixer -c 0 cget numid=27 (the 'IEC958 Playback AC97-SPSA')
numid=27,iface=MIXER,name='IEC958 Playback AC97-SPSA'
; type=INTEGER,access=rw---,values=1,min=0,max=3,step=0
: values=0
Then you can use this numid to set the value -- this is the kind of line you want:
- amixer -c 0 cset numid=27 1 (set the IEC958 playback to 1)
- amixer -c 0 cset numid=27 0 (set the IEC958 playback to 0)
When the sound is whacked, it's not enough to send the correct
value to the card; you
must send the wrong value first, and then the correct one. In the home,
office, and
class scripts, include both lines. However, you can also just use the simpler
"alsactl restore" command. For some reason, issuing this command in the
boot process does not fully succeed -- it is not working correctly for
the IEC958 playback mixer control.
You can now easily figure out the commands for the
other values -- this works!
Can you map IEC958 output to these so they control headphone volume?
numid=3,iface=MIXER,name='Headphone Playback Switch'
numid=4,iface=MIXER,name='Headphone Playback Volume'
See
http://j.f.l.free.fr/notes/Alsa.html for some sophisticated remapping.
Note that none of the simple mixer controls display the volume for the headphone jack
-- even though alsaplayer controls it! The exception is the phone sound, used for hearing the modem; that control works.
/proc
You can see the contents of /proc as regards sound by pressing Fn+/ in alsamixer -- I discovered this by chance.
/proc/asound/version:
Advanced Linux Sound Architecture Driver Version 1.0.4 (Mon May 17 14:31:44 2004 UTC).
Compiled on Aug 18 2004 for kernel 2.6.7.
/proc/asound/cards:
0 [A5451 ]: ALI5451 - ALI 5451
ALI 5451 at 0x1000, irq 11
/proc/asound/devices:
0: [0- 0]: ctl
16: [0- 0]: digital audio playback
24: [0- 0]: digital audio capture
33: : timer
/proc/asound/oss/devices:
empty
/proc/asound/timers:
lots of stuff
/proc/asound/pcm:
00-00: ALI 5451 : ALI 5451 : playback 32 : capture 1
Not terribly informative perhaps, but that's the story. In addition there are these informative ones:
- cat /proc/asound/card0/codec97#0/* (AC97 status and register dump)
- cat /proc/asound/card0/pcm0p/sub0/* (PCM status)
- cat /proc/asound/card0/pcm0p/sub0/* (active device)
Use "aplay -l" to get a list of all devices.
Installation history -- the 2.6 kernel
30 August 2004 update: midi and /dev/dsp
I discovered that I didn't have a /dev/dsp device. Some
applications don't mind; for instance, xmms uses "default" or "hw:0,0"
and is happy. Avidemux uses "ALSA". Alsaplayer and alsamixer are
happy. But these programs don't seem to work without a /dev/dsp:
- audacity
- cat (for testing the sound device)
- say
- aumix
- xaumix
- kmix
There may be others. So here's the story: it's the OSS emulation in
ALSA that provides /dev/dsp. Specifically, you need to load
snd-pcm-oss, which loads snd_mixer_oss. I also loaded
snd-rtctimer.
At first try, loading snd-pcm-oss made sound on the headphones (and
perhaps the speakers) become super-amplified way into the noisy area,
and the pcm mixer component could be used to regulate this extra or
surplus sound, also in the headphones. However, this behavior didn't
replicate later -- not thoroughly tested.
While loading OSS modules with modconf, I also discovered that Sigillo
appears to have a midi device -- at least snd-mpu401-uart inserted, and
with it snd_rawmidi and snd_seq_device. I removed them for now, but
that's worth testing at some point. Note that snd-mpu401 did not insert, complaining "no such device".
2 August 2004 update: headphone jack details
Peter Zubaj on the alsa-devel list clarified the issue with
the headphones. First of all, he points out that the headphone jack
must be an S/PDIF output -- the only logical conclusion. Then he says,
AC97-SPSA - this is not volume. It has 4 levels
0 - (min)spdif output is copy of front channels 1 - spdif output is copy of rear channels 2 - spdif output is copy of center/lfe channels 3 - (max)spdif output is sptif pcm output
The details depends on the soundcard.
So
it looks
like the audio jack is an S/PDIF output device, and that the 0 setting
corresponds with the active audio channels in the usual setup. However,
I suspect the four values are different from those Peter lists.
Possibly they are closer to the ones listed in the trident driver as
described in the kernel documentation:
"This driver supports S/PDIF in/out (record/playback) for ALi 5451
embedded in ALi M1535+ and M1535D+. Note that they aren't all enabled by
default; you can enable them by saying Y to "/proc file system support"
and "Sysctl support", and after the /proc file system has been mounted,
executing the command
command
what is enabled
echo 0>/proc/ALi5451 pcm out is also set to S/PDIF out. (Default).
echo 1>/proc/ALi5451 use S/PDIF out to output pcm data.
echo 2>/proc/ALi5451 use S/PDIF out to output non-pcm data. (AC3...).
echo 3>/proc/ALi5451 record from Ac97 in(MIC, Line in...) (Default).
echo 4>/proc/ALi5451 no matter Ac97 settings, record from S/PDIF in.
Finally, I suspect that the four values possible for Fn+F8 (the S/PDIF
key) switch between the same modes, although none of the mixers pick up
on changes made in this way with the keyboard.
Peter Zubaj says I should be getting stereo, but this depends on AC97 settings. Not sure where to go with that.
You can use "aplay -l" to get a list of all devices. I tried aplay -D spdif /usr/share/sounds/Startup.wav and got an error.
Details from alsamixer:
Card: ALI 5451
To Chip: Analog Devices AD1981A
Item: IEC958
So "IEC958" is the name of the item that needs to be activated for the
headphone jack to work. Press > to turn an item on or off. In
addition, you need to turn the slider all the way down on item "IEC958
Playback
AC97-SPSA".
The item "IEC958 Playback Source" shows an interesting set of choices:
AC-Linkv...
A/D Conv...
The second must be Analog/Digital conversion -- which it turns out I need to activate.
1 August 2004 update: headphone jack works!
Finally someone figured out the audio. Thanks to Jason Fuchs -- posted on Andrew Goodwin's site:
The secret to getting the headphone jack to work is
to turn down the sound on IEC958 playback. Do NOT mute, or disable it.
Just turn down the volume all the way. In ALSA mixer, mine is listed as
IEC958 playback AC97. If you are using gnome, in the Gnome ALSA mixer,
make sure IEC958 box is checked, and turn IEC958 volume down all the
way. I don't know how to make this setting permanent, and need to make
the adjustment upon every reboot.
I
found I just had to turn on (light green) the IEC958 button in the
"Advanced" panel in KMix and turn the AC97 volume slider all the way
down [later I discovered it's not a volume slider]. Also, S/PDIF must
be turned to a particular value -- that's set with the Fn-F8 key, which
likely does the same thing as the AC97 slider.
Switching on or off the WLAN switch on the side makes no difference.
Before
rebooting after saving the new configuration, I got some heavy
distortion when I pushed the plug all the way in, but this effect
vanished on the first reboot. I can use any player, also in the CLI, to
play music through the headphones, including quark and mp3blaster, xine
and beep.
None of the mixer volume controls work in the IEC958 mode, but the volume control in
Alsaplayer works.
Still, this means you can now use the system for audio presentations in
class, and you can use the speakers in the office! I don't see a
difficulty storing the profile.
Here's from the company page, with the S/PDIF hint:
Problem: No Sound From Headphone Jack. You have sound coming
from the normal speakers, but when headphone jack is connected you do
not hear audio through your headphones.
Solution:
1. Make sure you are using the
correct jack. The MIC and Headphones are right next to each other. The
headphone jack, when properly inserted will cut the normal speakers off.
2. Check that the Speaker
Properties are set to 'Stereo Headphones' Test with this setting, if no
change, change back.
3. If SPDIF is checked in sound
mixer, then the head phone jack does not work. Speakers work, but not
the jack.
1. Go to the Sound Control
2. Click on Advanced
3. Uncheck the AC3 S/PDIF
You should now be able to get sound from he headphone jack
I've not yet tested this in Windows, but in Linux turning S/PDIF on cuts the headphone sound.
As far as I can see, the purpose of IEC958 is to forward "48kHz,
stereo, 16-bit little endian streams without any modifications to the
digital output (coaxial or optical)". So what is piped to the
headphones is thus an unmodified digital stream?
IEC958 is frequently equated with S/PDIF -- technically, there are a few minor differences.
Details on IEC958 and S/PDIF:
-
IEC958
- A standard for digital audio transfer published by the IEC (International Electrotechnical Commission). The IEC958 standard describes (specifically in IEC958 Part 3 and IEC958 Part 4) the protocol used by what we commonly refer to as AES/EBU (now called AES3) and S/PDIF for transferring digital audio data between hardware platforms.
IEC958 Part-4
- A digital interface protocol that is used to transfer digital audio data between professional digital audio equipment such as PCM and DAT mastering recorders, MDM recorders and other equipment. This protocol is most commonly known as AES/EBU, but IEC958 Part-4 is the actual name for it. AES/EBU is the most common alternative to the S/PDIF standard.
S/PDIF
- A
format for interfacing digital audio equipment together, S/PDIF
(Sony/Philips Digital Interface Format) is considered a consumer
format, and is largely based on the AES/EBU standard. In fact, in many
cases the two are compatible. There are, however differences between
the two formats, particularly in the channel status and user bits. S/PDIF typically uses either unbalanced, high impedance coaxial cables or fiber optic cables for transmission.
AC97 status:
# cat /proc/asound/card0/codec97#0/*
0-0/0: Analog Devices AD1981A
Capabilities : -headphone out-
DAC resolution : 20-bit
ADC resolution : 16-bit
3D enhancement : No 3D Stereo Enhancement
Current setup
Mic gain : +0dB [+0dB]
POP path : pre 3D
Sim. stereo : off
3D enhancement : off
Loudness : off
Mono output : MIX
Mic select : Mic1
ADC/DAC loopback : off
Extended ID : codec=0 rev=1 AMAP DSA=0 SPDIF VRA
Extended status : SPCV SPDIF=3/4 SPDIF VRA
PCM front DAC : 48000Hz
PCM ADC : 48000Hz
SPDIF Control : Consumer PCM Category=0x2 Generation=1 Rate=48kHz
It looks like there are parameters you have no gui to control.
Installation history -- the 2.4 kernel
13 February 2003: trident OSS driver works, volume caught on low
The sound needs the updated driver that first appears in
2.4.20. The volume and quality is good and strong. Two remaining quirks:
- The full power of the sound often isn't available in
X-windows, even with the aumix mixer; you have to enter the shell, run
mp3blaster, and press >. For some obscure reason this triggers a
release of the full power of the speakers or the sound.
- The headphone jack is completely dead.
I wrote this letter to linux.debian.laptop on 13 February 2003:
I got a matrix vpr 200A5 a few weeks ago, a kind of Apple TiBook
lookalike with USB 2, two firewire ports, S-video out, and a 2GHz CPU.
It has some kind of sound upsampling built in, SonoPur. I'm a happy
camper running sid on it; cool display, nice keyboard. The sound needs
the trident driver and works great if you get the 2.4.20 kernel -- the
2.4.19 trident lacks some crucial updates.
The bummer is that the headphone jack is dead. The jack actually works
if you turn the computer off -- there's a set of control keys on the
outside that lets you play a CD with the cover closed. It goes
completely dead with the trident driver. The mic looks like it's
working; I haven't tested it much. Anybody encountered this problem
with this or other laptops?
Bus 0, device 6, function 0:
Multimedia audio controller: Acer Laboratories Inc. [ALi] M5451 PCI
AC-Link Controller Audio Device (rev 2).
Master Capable. Latency=64. Min Gnt=2.Max Lat=24.
I/O at 0x1000 [0x10ff].
Non-prefetchable 32 bit memory at 0xe8000000 [0xe8000fff].
Recapping earlier history:
In the end I sent a letter to the linux kernel mailing list
describing the problem with the AC97 codec -- it's likely a
problem with the driver, not with my system, as the hardware
is well known. So just hang loose and let them write an
improved driver.
(It turned out this is unfair -- the driver in 2.4.20 in fact
appears to be working flawlessly. What I still don't
understand is whether I need the trident.c driver if I use
alsa -- whether the snd-ali5451 is an alternative or a
supplement.)
Conclusion to sound: the 2.4.20 trident driver is a
significant update and is working flawlessly. You need to find
out how to use Alsa -- should you not include the trident
driver, or should you? Should you use the snd-trident or the
snd-ali5451?
Of course we still don't have a driver for the upsampling
feature -- ask Alan Cox about this, and confess you've left
the volume off. Now, you'll need to see if your headphone jack
is now working! You also need to figure out what the switch on
the side of the computer is doing -- I verified that it has no
effect on sound output from cat. Mention to Alan that there is
an upsampling feature and a 96/192k function key.
I verified that the sound.c module is in fact not loaded and
is therefore not required for sound to work -- which means the
generic OSS is not required. This is still vague to me -- am I
nevertheless using OSS, but only in userspace? If so, what is
the software? It looks to me like I'm not using either Alsa or
OSS, just a dedicated sound driver (and in KDE, aRts). Ask if
this is correct.
Mention also that the modules pcigame and gameport are now
loaded automatically, gameport listed as used by pcigame and
pcigame as used by trident.
There is also a problem: aRts is in fact not starting! Could
this be because aRts requires OSS? When I do modprobe sound,
it loads! It's listed as unused, but it could be aRts needs
it. When I start X, however, I still get "Sound server fatal
error. CPU overload: aborting" and aRts doesn't load. This
means your sound problems are not yet solved.
I get "artsmessage: unix_connect: can't connect to server
(unix:/tmp/mcop-steen/sigillo-)". So
there's likely a log for aRts somewhere that will give you details.
Having the sound.c module loaded made no difference.
Now, it's possible that Alsa will solve these problems, so
this is worth a try at some point -- an before you write again
to the list.
However: sound now works! xmms gives great sound, and the
software volume controls are now working! I chose the OSS
driver 1.2.7 (liboss.so), which runs fine even without the
sound.c module. Moreover, I can also chose the Crossfade
plugin, and within it the "builtin OSS driver" -- and it works
fine. In fact I'm getting great sound now, I think much louder than
before. In the end, I chose crossfade with the OSS output module.
Anyway, none of this appears to matter at the moment, or they
all work, even though they appear to rely on completely
different drivers.
8 December 2002: trident OSS driver works, but intermittently
Installation history: the 2.4.19 kernel
The sound works off and on, but when it works it's brilliant.
No idea what the hidden variable is.
Trident 4DWave/SiS 7018/ALi 5451,Tvia CyberPro 5050 PCI
Audio, version 0.14.10h, 02:49:21 Jan 10 2003
PCI: Enabling device 00:06.0 (0000 -> 0003)
PCI: Assigned IRQ 5 for device 00:06.0
trident: ALi Audio Accelerator found at IO 0x1000, IRQ 5
ac97_codec: AC97 Audio codec, id: ADS114(Unknown)
ac97_codec: AC97 Audio codec, id: ADS114(Unknown)
PCI: Found IRQ 5 for device 00:06.0
gameport0: Acer Laboratories Inc. [ALi] M5451 PCI AC-Link Controller
Audio Device at pci00:06.0 speed 1924 kHz
The codec is detected erratically, but this doesn't correlate
with any noticeable differences in function:
ac97_codec: AC97 Audio codec, id: ADS114(Unknown)
ac97_codec: AC97 Audio codec, id: ADS114(Unknown)
ac97_codec: AC97 Modem codec, id: ADS114(Unknown)
ac97_codec: AC97 Audio codec, id: ADS114(Unknown)
ac97_codec: AC97 Audio codec, id: ADS114(Unknown)
ac97_codec: AC97 Audio codec, id: ADA68(Unknown)
lsmod
trident 26292 0
ac97_codec 9800 0 [trident]
pcigame 1416 0 [trident]
gameport 1452 0 [pcigame]
The sound is a puzzle. The boot log in dmesg shows no sign of
an audio chip, but lspci list shows it's been detected:
00:06.0 Multimedia audio controller: Acer Laboratories Inc.
[ALi] M5451 PCI South Bridge Audio (rev 02)
In addition, it's present in /proc/pci:
Bus 0, device 6, function 0:
Multimedia audio controller: Acer Laboratories Inc. [ALi] M5451 PCI
AC-Link Controller Audio Device (rev 2).
Master Capable. Latency=64. Min Gnt=2.Max Lat=24.
I/O at 0x1000 [0x10ff].
Non-prefetchable 32 bit memory at 0xe8000000 [0xe8000fff].
The problem may be that I need alsa:
Sound card (from http://wojas.vvtp.tudelft.nl/acertm/)
Compile the ALSA sound drivers. You need the snd-ali5451
module.
Add this to /etc/modules:
snd-ali5451
snd-mixer-oss
snd-pcm-oss
You might want to install the aumix package to change mixer
settings and restore these every system boot.
I also discovered that the driver I need is trident. This
driver is defined as a module in the kernel, and has the
following help screen:
This driver supports S/PDIF in/out (record/playback) for ALi
5451 embedded in ALi M1535+ and M1535D+. Note that they
aren't all enabled by default; you can enable them by saying
Y to "/proc file system support" and "Sysctl support", and
after the /proc file system has been mounted, executing the
command
command
what
is enabled
I did modprobe trident -- no response -- but afterwards the
sound seems to be working! Yep -- xmms is playing. So modprobe
for some weird reason was necessary. And alsa wasn't. I copied
xmms configuration files and skins over. Note, however, that
the headphone jack isn't working -- but I verified that it
works in XP, so the hardware is fine.
Later, I tried the echo 0>/proc commands above, but got no
result. The problem is that the headphone jack isn't working.
S/PDIF = Sony/Philips Digital Interface.
Here's the quick and dirty method for making sound work:
insmod ac97_codec
insmod trident
That's it. Do a root@sigillo:~# cat test.mp3 > /dev/dsp to
test -- it should work.
Now, the first time, after rebooting the sound was gone. I did
modprobe trident and got this in dmesg:
Trident 4DWave/SiS 7018/ALi
5451,Tvia CyberPro 5050 PCI Audio, version 0.14.9d
PCI: Enabling device 00:06.0 (0000 -> 0003)
PCI: Assigned IRQ 5 for device 00:06.0
trident: ALi Audio Accelerator found at IO 0x1000, IRQ 5
ac97_codec: AC97 Audio codec, id: 0x4144:0x5372 (Unknown)
However, to make the quick-and-dirty model work every time,
don't include modules in the automatic loading, and don't even
use modprobe -- just insmod, which weirdly works reliably. Put
it in the .mods script that you run at startup.
I discovered that modules are not entered directly into
/etc/modules.conf in debian, but somehow through /etc/modutils
(see man-modutils) -- where in turn the files instructed me to
use the admin menu, which I did, but this didn't fix the
problem:
Dec 8 04:40:40 Sigillo modprobe: modprobe: Can't locate
module sound-slot-0
Dec 8 04:40:40 Sigillo modprobe: modprobe: Can't locate module
sound-service-0-1
Dec 8 04:47:35 Sigillo modprobe: modprobe: Can't locate module
block-major-2
Dec 8 04:47:35 Sigillo modprobe: modprobe: Can't locate module
block-major-2
Dec 8 04:50:45 Sigillo kernel: ali: AC97 CODEC write timed out.
I typed "modconf" and got a user interface! But no luck on
sound -- and it was just working a moment ago! Using modprobe
isn't working, while insmod works fine.
On 16 December 2002 I opened the KDE control panel and first
unchecked and then rechecked "Start aRts soundserver", which
got sound into KDE.
Sound stopped working in January, after some minor
modification I don't recall..
Installing the Alsa driver for the Sigillo sound card:
http://www-eleves-isia.cma.fr/~lichnews/acer/
I installed alsa, using the script provided at Libranet's
support site.
I get a choice of drivers -- but not M5451. It doesn't seem to
matter: "Select the 'Trident 4DWave DX/NX, SiS 7018, or ALi
5451 option when configuring the kernel."
See http://www.alsa-project.org/alsa-doc/alsa-howto/c590.htm
for detailed guide.
For "Max. dac (playback) framesize in kb (DX). (4-64)" I gave
16.
Acer Laboratories M5451
This device uses the ALI M5451 audio processor and an AC-97
Codec. This device provides support for line out, headphone,
internal speaker, line in, and a microphone. You can enable
or disable the mixer by editing /usr/kernel/drv/audiots.conf
. M5451 PCI South Bridge Audio. M5451 PCI AC-Link Controller
Audio Device. For more information, see the audiots(7D)
manual. The vendor's site is http://www.ali.com.tw/
I ran alsaconf and got OK, 1 card(s) configured, but then:
Loading driver:
Starting ALSA sound driver (version 0.9.0rc6):Warning: ignoring
snd_major=116, no such parameter in this module
Warning: ignoring snd_cards_limit=1, no such parameter in this module
Warning: ignoring snd_device_mode=0660, no such parameter in this module
Warning: ignoring snd_device_gid=29, no such parameter in this module
Warning: ignoring snd_device_uid=0, no such parameter in this module
Module snd loaded, with warnings
(trident)
Setting the PCM volume to 100% and the Master output volume to 50%
amixer: Mixer attach default error: No such file or directory
Could not initialize the mixer, the card was probably not detected
correctly.
I rebooted anyway. The card was not found. I reconfigured the
kernel.
In the kernel help file:
"This driver supports S/PDIF in/out (record/playback) for
ALi 5451 embedded in ALi M1535+ and M1535D+. Note that they
aren't all enabled by default; you can enable them by saying
Y to "/proc file system support" and "Sysctl support", and
after the /proc file system has been mounted, executing the
command
command |
what is enabled |
echo 0>/proc/ALi5451 |
pcm out is also set to S/PDIF out. (Default). |
echo 1>/proc/ALi5451 |
use S/PDIF out to output pcm data. |
echo 2>/proc/ALi5451 |
use S/PDIF out to output non-pcm data. (AC3...). |
echo 3>/proc/ALi5451 |
record from Ac97 in (MIC, Line in...). (Default). |
echo 4>/proc/ALi5451 |
no matter Ac97 settings, record from S/PDIF in. |
This driver differs slightly from OSS/Free, so PLEASE READ
the comments at the top of drivers/sound/trident.c."
file://localhost/usr/src/linux/drivers/sound/trident.c -- it
was built by Alan Cox!
I removed all other sound drivers and wrote
/boot/kernel-2.4.19-5.config
On booting in 2.4.19:
Here's the sound card:
Trident 4DWave/SiS 7018/ALi 5451,Tvia CyberPro 5050 PCI
Audio, version 0.14.9d, 00:57:19 Jan 9 2003
PCI: Enabling device 00:06.0 (0000 -> 0003)
PCI: Assigned IRQ 10 for device 00:06.0
trident: ALi Audio Accelerator found at IO 0x1000, IRQ 10
ac97_codec: AC97 Audio codec, id: 0x4144:0x5372 (Unknown)
ali: AC97 CODEC read timed out.
ali: AC97 CODEC write timed out.
ali: AC97 CODEC read timed out.
Jan 9 01:20:15 sigillo last message repeated 2 times
ac97_codec: AC97 codec, id: 0x0000:0x0000 (Unknown)
ali: AC97 CODEC read timed out.
ali: AC97 CODEC write timed out.
ali: AC97 CODEC read timed out.
ali: AC97 CODEC write timed out.
last message repeated 10 times
ali: AC97 CODEC read timed out.
last message repeated 127 times
The codec has exactly the same problem as before -- and I have
no sound.
First attempt to run ALSA
alsaconf --
Loading driver:
Warning: ignoring snd_major=116, no such parameter in this module
Warning: ignoring snd_cards_limit=1, no such parameter in this module
Warning: ignoring snd_device_mode=0660, no such parameter in this module
Warning: ignoring snd_device_gid=29, no such parameter in this module
Warning: ignoring snd_device_uid=0, no such parameter in this module
Module snd loaded, with warnings
Starting ALSA sound driver (version 0.9.0rc6):Warning: ignoring
snd_major=116, no such parameter in this module
Warning: ignoring snd_cards_limit=1, no such parameter in this module
Warning: ignoring snd_device_mode=0660, no such parameter in this
module
Warning: ignoring snd_device_gid=29, no such parameter in this module
Warning: ignoring snd_device_uid=0, no such parameter in this
moduleured.
Module snd loaded, with warnings
(trident)
Setting the PCM volume to 100% and the Master output volume to 50%
amixer: Mixer attach default error: No such file or directory
Could not initialize the mixer, the card was probably not detected
correctly.
Done
Please reboot
The module values are in /etc/alsa/modutils/0.9 but the file
says not to edit, use alsaconf. I'll reboot.
After rebooting, I issue modconf and get a great menu for
controlling the modules -- this is the way to do it! Installing the ali 5451 fails, also when I try again manually:
make-kpkg -rev 5 kernel_image
dpkg --install /usr/src/kernel-image-2.4.19_5_i386.deb
/tmp/alsa-modules-2.7.sh
/tmp/compile-nvidia.sh
http://ccrma-www.stanford.edu/planetccrma/software/installkernelandsound.html
/etc/rc.d/init.d/alsasound start
Finally, the module actually loads -- it all looks great.
Still no sound, however! (As I discovered later, my volume
knob may simply have been turned off.)
It's not clear alsasound is really running -- in fact it is
not. But this is:
/usr/bin/artsd -F 6 -S 256 -a oss -s 60 -m artsmessage -l 0
-f
What you haven't figure out is how to start alsasound.
Usage: /etc/init.d/alsa
{start|stop|restart|force-reload|force-stop|force-restart}
In /etc/modutils/alsa I changed snd-trident to snd-ali5154 --
the latter is not in the list of modules to select from in
alsaconf, but appears to be the correct module.
I then issued update-modules (which moves the lines from the
/etc/modutils directory and into the /etc/modules.conf file)
and depmod (which updates what exactly?).
|
|