LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-08-2011, 03:58 AM   #1
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Rep: Reputation: 76
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.

Card: SiS SI7018
Chip: C-Media Electronics CMI9738, Silicon Laboratory Si3036,8 rev 1

These data are reported by alsamixer. Any idea about what can be happening?
 
Old 10-08-2011, 10:15 AM   #2
Keith Hedger
Senior Member
 
Registered: Jun 2010
Location: Wiltshire, UK
Distribution: Linux From Scratch, Slackware64, Partedmagic
Posts: 3,129

Rep: Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852Reputation: 852
I had problems with alsa being to loud and no pcm control so I ran
Code:
alsactl init
alsamixer
Wich restored the pcm control to alsamixer and alowed me to adjust the volume down
 
Old 10-08-2011, 10:43 AM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546Reputation: 546
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.
 
Old 10-08-2011, 04:15 PM   #4
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
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.
 
Old 10-08-2011, 09:48 PM   #5
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,350

Rep: Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739
Apparently this is a known problem with your hardware. There is no PCM volume register on the chip. http://comments.gmane.org/gmane.linux.alsa.user/5587
From http://alsa.opensrc.org/Intel8x0_user_comments
Quote:
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 are some suggested fixes under this quote.
 
Old 10-09-2011, 04:41 AM   #6
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
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.
 
Old 10-09-2011, 03:00 PM   #7
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Quote:
Originally Posted by ReaperX7 View Post
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.
Thank you very much.
 
Old 10-09-2011, 05:19 PM   #8
ReaperX7
LQ Guru
 
Registered: Jul 2011
Location: California
Distribution: Slackware64-15.0 Multilib
Posts: 6,554
Blog Entries: 15

Rep: Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097Reputation: 2097
Welcome. Let us know how it goes.
 
Old 10-09-2011, 06:27 PM   #9
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,176

Rep: Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759Reputation: 1759
Is this sound card a PCI card? If so, have you disabled onboard audio?
 
Old 10-09-2011, 06:42 PM   #10
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
Well, it is an onboard chipset.
 
Old 10-09-2011, 08:37 PM   #11
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,350

Rep: Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739
Apparently the ALSA Soft Volume plugin will help with this.
From http://www.sabi.co.uk/Notes/linuxSou...l#chipsCMI973x
Quote:
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.
From http://www.alsa-project.org/alsa-doc...m_plugins.html
Code:
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
}
 
Old 10-10-2011, 02:31 AM   #12
stf92
Senior Member
 
Registered: Apr 2007
Location: Buenos Aires.
Distribution: Slackware
Posts: 4,442

Original Poster
Rep: Reputation: 76
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.
 
Old 10-10-2011, 07:44 AM   #13
allend
LQ 5k Club
 
Registered: Oct 2003
Location: Melbourne
Distribution: Slackware64-15.0
Posts: 6,350

Rep: Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739Reputation: 2739
From http://alsa.opensrc.org/.asoundrc
Quote:
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mouse not focusing properly - bizarre behavior BCarey Linux - Hardware 3 12-20-2007 12:58 AM
Bizarre cursor behavior with A4Tech trackball Lord Estraven Linux - Hardware 2 05-13-2007 07:09 PM
Bizarre laptop keyboard behavior willgwitt Linux - Hardware 25 05-19-2006 08:12 AM
i915GM very bizarre graphics behavior and crashing... drive_c Linux - Laptop and Netbook 2 12-18-2005 06:59 PM
Bizarre KDE behavior as root lava135 Linux - Newbie 4 09-04-2003 03:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration