ALSA bizarre behavior with C-Media Electronics CMI9738.
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
ALSA bizarre behavior with C-Media Electronics CMI9738.
Hi: when I start any of the several audio players that come with slackware 12.0 (kernel 2.6.21.5), which is the version I am using, a curious thing happens: the PCM volume sets itself to 100% which, if the Master volume is set high enough, causes distortion.
This happens every time I do a slackware 12.0 installation, and I have never been able to fix it. I have just done this. I unloaded module snd_trident. This had the effect of automatically unloading all of the other sound modules. Then I ran alsaconf. Then I tested, with the hope of having fixed the problem. But the problem persists.
Sound configurations with older Slackware releases such as 12.0 were not as automated as more recent releases. With those older releases ALSA had to be configured manually with every installation.
My basic routine for configuring sound on older systems:
As root:
Run alsaconf.
Run alsamixer: be sure to set any setting with "boost" in the name to zero..
Run alsactl store.
Run aplay to test any wave file.
Verify /etc/rc.d/rc.alsa is executable.
Those steps configure the system default settings only. The desktop mixer and various user settings with apps will override the default system settings.
As non-root:
Start the desktop.
Configure the desktop mixer.
Configure any apps that effect mixer settings.
It's no use. I followed your instructions but did not solve the problem. I have an OPL3 Yamaha sound card in another machine. Alsaconf configurated the card and I had not this problem, although the version installed on that machine is slack 9.1.
I do not understand, because the sound chip, C-Media CMI9738, which is a subset of SiS SI7018, is a very popular chip. I mean, it is or was widely known. And that linux does not have the proper driver for it seems to me an extremely improbable case.
Perhaps I did not describe the problem in much detail: I start play, let's say play though it could be any other audio media player, and have to go to the console that is running alsamixer to lower the volume, which I find at 100% (it is the PCM Front control). Now the volume is at, lets say, 68%. And there it stays until play ends execution. I now rerun play. And again alsamixer shows the PCM Front control at 100%.
That would be the description of the problem, but of course, there might be other things that could be pinpointed. Or some tests could be made, the results of which I could send to the forum.
For everyone who's missing volume control with his CMedia 9739 onboard sound chip, here are the facts I found out so far. This chip is used at least on Epox 8RDA3+ and maybe in every newer nforce2 chipset. (Who knows where else it is used?) The general problem with the 9739 is that it doesn't have a volume control in hardware.
There's a package called "alsaequal" at SlackBuilds.org that might prove useful with the C-Media 9739 Codec. It adds the Equalizer module to alsamixer to adjust the channels for input and output. You might do well to adjust the channels with the audio maxed to see if maybe reducing channel I/O in certain ways will clear up your audio. It often will help with these types of audio codecs because they lack a dedicated hardware controller.
There's a package called "alsaequal" at SlackBuilds.org that might prove useful with the C-Media 9739 Codec. It adds the Equalizer module to alsamixer to adjust the channels for input and output. You might do well to adjust the channels with the audio maxed to see if maybe reducing channel I/O in certain ways will clear up your audio. It often will help with these types of audio codecs because they lack a dedicated hardware controller.
More importantly, the chip seems not to have the ability to change sound volume, and one needs a software volume control, like the newly introduced softvol plugin for /etc/asound.conf.
pcm.name {
type softvol # Soft Volume conversion PCM
slave STR # Slave name
# or
slave { # Slave definition
pcm STR # Slave PCM name
# or
pcm { } # Slave PCM definition
[format STR] # Slave format
}
control {
name STR # control element id string
[card STR] # control card index
[iface STR] # interface of the element
[index INT] # index of the element
[device INT] # device number of the element
[subdevice INT] # subdevice number of the element
[count INT] # control channels 1 or 2 (default: 2)
}
[min_dB REAL] # minimal dB value (default: -51.0)
[max_dB REAL] # maximal dB value (default: 0.0)
[resolution INT] # resolution (default: 256)
# resolution = 2 means a mute switch
}
Thank you. I will study these links. Meanwhile, I noticed I have no asound.conf. Then I ran alsaconf. It said:
Code:
Following cards are found on your system.
Choose a soundcard to configure.
Trident SiS PCI audio accelerator
mpu401 snd-mpu401
legacy Probe legacy ISA (non-PnP) chips
<OK> <Cancel>
As far as I know, I have no ISA cards in my machine. I picked Trident and pressed OK. Finally it said "Now ALSA is ready to use". But still no asound.conf.
The .asoundrc file (in your home directory) and /etc/asound.conf (for system-wide settings) are the configuration files for ALSA drivers. Neither file is required for ALSA to work properly. Most applications will work without them. The main use of these two configuration files is to add functionality such as routing and sample-rate conversion. It allows you to create "virtual devices" that pre or post-process audio streams. Any properly written ALSA program can use these virtual devices as though they were normal devices.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.