Symptom:
System cannot play any kind of audio files. All attempts to play audio files
fail with
can't find audio device dev/audioctl does not exist
error message.
Resolution:
- With
mixerctl
command:
- check if a driver has been installed for the sound card, and
- if a driver has already been installed, check the default or primary audio device.
eg., % mixerctl
mixerctl: device /dev/audioctl does not exist
That means, the primary audio device is not configured properly.
/dev/audio
is a symbolic link, points to the sound card device on the machine. It exists only if there is a supported sound device on the machine. When the audio device(s) are installed on the system, they appear under /dev/sound
directory.
% ls -l /dev/audio*
No match
- The driver might have installed already, but not loaded. Try to load it with
devfsadm
command. By default, devfsadm
tries to load every driver in the system and attach to all possible device instances. Also it creates logical links to device nodes in /dev and /devices and loads the device policy, if the driver load succeeds.
eg., # devfsadm -v
devfsadm[1739]: verbose: removing link /dev/syscon -> ../../devices/pseudo/pts@0:4
invalid contents
devfsadm[1739]: verbose: symlink /dev/syscon -> ../devices/pseudo/cn@0:syscon
% mixerctl
mixerctl: device /dev/audioctl does not exist
In this example, the driver for the sound card is not loaded even with devfsadm
. The relevant driver might not have installed on the machine. So, the next step is to install the driver for the audio device.
- Get the audio driver for your OS version and chipset from: http://www.tools.de/solaris/audio/ and install.
If you are not sure about the audio device information and the driver to download
for your device, the steps are as follows to get that information:
To get the information like device-id and vendor-id, check the output of prtconf -pv
for "Audio device".
eg., % prtconf -pv
...
Node 0x1d80f8
assigned-addresses: 8100fd10.00000000.00001c00.00000000.00000100.8100fd14.00000000.00001880.
00000000.00000040
class-code: 00040100
compatible: 'pci8086,2485.1028.f3.2' + 'pci8086,2485.1028.f3' + 'pci1028,f3' + 'pci8086,2485.2' + 'pci8086,2485' + 'pciclass,040100' + 'pciclass,0401'
device-id: 00002485
devsel-speed: 00000001
fast-back-to-back:
interrupts: 00000002
max-latency: 00000000
min-grant: 00000000
model: 'PCI: 8086,2485.1028.f3.2 - Audio device'
name: 'pci1028,f3'
power-consumption: 00000001.00000001
reg: 0000fd00.00000000.00000000.00000000.00000000.0100fd10.00000000.00000000.
00000000.00000100.0100fd14.00000000.00000000.00000000.00000040
revision-id: 00000002
slot: 00000000
subsystem-id: 000000f3
subsystem-vendor-id: 00001028
unit-address: '1f,5'
vendor-id: 00008086
...
In this example, device-id = 2485 and the vendor-id = 8086.
Searching for device "2485" at http://www.pcidatabase.com/index.php, showed the following result:
So, audioi810
driver from http://www.tools.de/solaris/audio/, has to be installed since it supports AC97 Audio Controller on Intel
.
- After installing the audio driver, reboot the machine once to let the
system configure everything properly for you during the system startup.
- Once the machine is up, check the status of the primary audio device again
with mixerctl
.
% mixerctl
Device /dev/audioctl:
Name = SUNW,CS4231
Version = 02,ICH3:82801CA
Config = i810
/dev/audioctl doesn't support the audio mixer function
% ls -l /dev/audio*
lrwxrwxrwx 1 root root 7 Apr 24 00:23 /dev/audio -> sound/0
lrwxrwxrwx 1 root root 10 Apr 24 00:23 /dev/audioctl -> sound/0ctl
% ls -l /dev/sound/*
lrwxrwxrwx 1 root root 49 Apr 24 00:23 /dev/sound/0 -> ../../devices/pci@0,0/pci1028,f3@1f,5:sound,audio
lrwxrwxrwx 1 root root 52 Apr 24 00:23 /dev/sound/0ctl -> ../../devices/pci@0,0/pci1028,f3@1f,5:sound,audioctl
- To quickly check if the newly installed driver is functioning properly,
play any of the audio clips that we can find under /usr/demo/SOUND/sounds/
with audioplay
utility.
eg., % audioplay /usr/demo/SOUND/sounds/train.au
If you cannot hear any audio from the system, check /var/adm/message
for error messages from the audio device driver. Also check prtconf -D
output, to make sure the audio driver (audioi810
from above examples) has attached to your hardware.
- If the audio files play too fast with any media player, read the following for the workaround (straight lift from: http://www.riddleware.com/solx86/solarisonintel/msg37434.html; thanks to "gnu noob" for posting the problem/solution at LinuxQuestions.org):
The AC'97 standard defines that the AC'97 codec has to run with an internal sample rate of 48kHz, but some mainboard manufacturers seem to overclock their chipsets / AC'97 codec. On such an overclocked AC'97 codec the internal sample rate is significantly higher than 48kHz, and audio plays back too fast.
If you install the latest version of the audio drivers, you'll find a driver property "ac97_codec_clockrate" for the audioi810 driver in /platform/i86pc/kernel/drv/audioi810.conf
, to workaround the problem with such an overclocked AC'97 codec.
You'll find some instructions in the audioi810.conf file how to measure the exact internal clock rate used in your system's AC'97 codec.
It appears that the latest version of the linux audio drivers are having a timing loop at i810 audio driver initialization time, to measure the AC'97 internal clock rate, so that the user doesn't have to configure a device specific clockrate.
Note:
- With more than one audio devices installed on the system, make sure the primary audio device (ie., the symbolic links
/dev/audio
and
/dev/audioctl
) is pointing to the right audio device ie., /dev/sound/x
(where x = any integer).
- The primary audio device can be changed by modifying the
/dev/audio
and /dev/audioctl
symbolic links. For more information, please read Solaris
documentation at http://docs.sun.com
- For a lot of applications you can select which one of multiple audio devices
should to be used by setting the environment variable AUDIODEV
: e.g.
eg., % env AUDIODEV=/dev/sound/0 audioplay /usr/demo/SOUND/sounds/train.au
Acknowledgements:
J.Keil (
http://www.tools.de/solaris/audio/)
___________________
Technorati tag:
Solaris