Need help getting sound to work in M11

Problems with your sound card are to be posted here, as well as tutorials to share with others.
Message
Author
User avatar
m_pav
Forum Guide
Forum Guide
Posts: 2507
Age: 49
Joined: Sun Aug 06, 2006 3:02 pm

Re: Need help getting sound to work in M11

#11 Postby m_pav » Tue May 01, 2012 6:49 am

The script only creates a regular text file that is hidden by virtue of the preceeding dot called .asoundrc in your home folder.

The best method of use is to create an empty text file in your home folder, name it asoundrc, then copy and paste the following into it, save it and make it executable.

Code: Select all

#!/bin/sh
# asoundrc v0.1.0 20090101 markc@renta.net GPLv3
# asoundrc v0.2.0 20090320 quatro_por_quatro@yahoo.es GPLv3
#
# A simple script to create a particular default audio device regardless
# of what cards are loaded or in what order. It could be used anytime or
# placed in a ~/.bashrc script for a persistent setup every login.
#
# Usage: asoundrc [DEFAULT_CARD] > ~/.asoundrc

# use the first parameter as the card name, or else
# look for the sound card, discarding those that are only microphones
# when there are multiple cards, use the first one
if default_card="${1:-$(cat "$(for f in $(ls -1 /proc/asound/card[0-9]*/{midi,codec}* 2>/dev/null); do echo "${f%/*}"; done \
| sed -e '\|^[\[:blank:]\]$|d' -e 'q')/id" 2>/dev/null)}"; then
   echo "Using sound card: ${default_card}" >&2
   cat /proc/asound/card[0-9]*/id | \
   gawk --assign default_card="${default_card}" \
'{print "pcm."$1" { type hw; card "$1"; }\nctl."$1" { type hw; card "$1"; }" }
END {print "pcm.!default pcm."default_card"\nctl.!default ctl."default_card}'
else
   echo "Warning: No sound cards found." >&2
fi

You need to get the names of your audio devices, so open a terminal and type the following

Code: Select all

cat /proc/asound/cards

Here's what I tried on my work system, which has the same issue as yours. This is the one I am most interested in fixing, but it is not critical, so I don't put in the effort.

Code: Select all

michael@SHOP:~$ cat /proc/asound/cards
 0 [Generic        ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfe01c000 irq 53
 1 [StudioTM       ]: USB-Audio - Microsoft® LifeCam Studio(TM)
                      Microsoft Microsoft® LifeCam Studio(TM) at usb-0000:00:12.2-2.4, high speed
 2 [Generic_1      ]: HDA-Intel - HD-Audio Generic
                      HD-Audio Generic at 0xfe020000 irq 16
StudioTM is a HiDef 1080 webcam, so I definitely do not want that, but Generic and Generic_1 are my two incorrectly labelled audio devices.

On my laptop, I get an entirely different result, but I am putting it here for the purposes of clarity only because I have no need to fix what ain't broken.

Code: Select all

michael@mikepav:~$ cat /proc/asound/cards
 0 [PCH            ]: HDA-Intel - HDA Intel PCH
                      HDA Intel PCH at 0xe2700000 irq 46
29 [ThinkPadEC     ]: ThinkPad EC - ThinkPad Console Audio Control
                      ThinkPad Console Audio Control at EC reg 0x30, fw unknown
In the laptop example, I have 2 distinctly different devices I can choose from, PCH or ThinkPadEC, though in this case, I would use the first because it has an interrupt request address whereas the second does not and it's numbered at 29, way too far down the list.

In the following example, I replaced [DEFAULT_CARD] with Generic and I really don't know if I should have included the square brackets or not, but most times, when such examples are given, it means replace the entire section and don't use the brackets, they are usually there for emphasis. In essence, .......

Code: Select all

./asoundrc [DEFAULT_CARD] > ~/.asoundrc
becomes ....

Code: Select all

./asoundrc Generic > ~/.asoundrc

Once you have the file, you can edit it with a regular text editor to set your default device, make the file executable, log out and back in and you hopefully should have sound, and if not, try re-editing it to set another device as default.

Below is the content of the generated .asoundrc file when I sent the command as in the above example.

Code: Select all

pcm.Generic { type hw; card Generic; }
ctl.Generic { type hw; card Generic; }
pcm.StudioTM { type hw; card StudioTM; }
ctl.StudioTM { type hw; card StudioTM; }
pcm.Generic_1 { type hw; card Generic_1; }
ctl.Generic_1 { type hw; card Generic_1; }
pcm.!default pcm.Generic
ctl.!default ctl.Generic
So you see the default card becomes Generic, but should I wish to try a different card, I would simply change the last 2 entries to read Generic_1, log out, log in and test the audio.

That's my understanding of it anyway.

Mike P
Mike P

Regd Linux User #472293
(Mine)Lenovo T550, i7-5600U, 16GB, 128GB SSD + 1.0TB HDD, MX15 64-bit
(Wifes) Asus M4A88TD-M, AMD Phenom II x4 955 CPU, nVidia GF610, 6Gb, 500GB+320GB, MX14 + KDE
(Kids) Intel NUC, J1900, 4GB, 64GB SSD, MX14 + KDE

User avatar
Topher
Forum Regular
Forum Regular
Posts: 862
Joined: Sun Feb 10, 2008 5:37 pm

Re: Need help getting sound to work in M11

#12 Postby Topher » Thu May 03, 2012 12:07 pm

Finally have a chance to get back into getting sound working. System sounds work but nothing else. I can go into System Settings -> Hardware -> Multimedia -> phonon - and chose different devices and click on test to see which device will give me sound. Only one does. I tried following m_pav's instructions but doing that brings up the KDE crash handler and no system sound. When I go into System Settings I can only get to Multimedia. When I click on phonon, the KDE crash handler comes up. So there appears to be a conflict between how KDE wants to handle sound and whatever program wants use the asoundrc output. As soon as I delete that file, I get system sounds again.
MX15 MoBo ASUS M4A88TD-V EVO/USB3 CPU AMD Phenom II X4 945 PSU CORSAIR CX500 (CMPSU-500CX) RAM Crucial CT2KIT25664BA1339 HD WD5000AAKX Wireless EDIMAX EW 7128g

User avatar
m_pav
Forum Guide
Forum Guide
Posts: 2507
Age: 49
Joined: Sun Aug 06, 2006 3:02 pm

Re: Need help getting sound to work in M11

#13 Postby m_pav » Thu May 03, 2012 2:27 pm

Check your BIOS settings for a front audio option along the lines of HDA/AC97. If it's set to HDA, change it to AC97.

From the tray icon, open your mixer and under Settings > Configure Channels, drag some interesting and relevant looking titles into to the right side window, arrange them as you wish, click on OK, then get some music playing and play with the channels.
Mike P

Regd Linux User #472293
(Mine)Lenovo T550, i7-5600U, 16GB, 128GB SSD + 1.0TB HDD, MX15 64-bit
(Wifes) Asus M4A88TD-M, AMD Phenom II x4 955 CPU, nVidia GF610, 6Gb, 500GB+320GB, MX14 + KDE
(Kids) Intel NUC, J1900, 4GB, 64GB SSD, MX14 + KDE

User avatar
Topher
Forum Regular
Forum Regular
Posts: 862
Joined: Sun Feb 10, 2008 5:37 pm

Re: Need help getting sound to work in M11

#14 Postby Topher » Thu May 03, 2012 3:38 pm

Progress - I can play CD's. But cannot get audio from internet.
When I open Kmix I have two tabs, both labeled HD Audio Generic. Under the first tab there is only one channel IEC958. The other tab shows all the channels where I found one that was muted and can now play CD's.
The icon in the tray for the mixer shows volume at 0% and has the IEC958 icon.
I guess I need to google IEC958 and phonon.

edit: forgot to add that in the Bios I changed the Front Panel type from HD to AC97.
MX15 MoBo ASUS M4A88TD-V EVO/USB3 CPU AMD Phenom II X4 945 PSU CORSAIR CX500 (CMPSU-500CX) RAM Crucial CT2KIT25664BA1339 HD WD5000AAKX Wireless EDIMAX EW 7128g

User avatar
Topher
Forum Regular
Forum Regular
Posts: 862
Joined: Sun Feb 10, 2008 5:37 pm

Re: Need help getting sound to work in M11

#15 Postby Topher » Thu May 03, 2012 6:22 pm

Further: Playing with BIOS settings -
BIOS settings for audio:
Front Panel Type - HD
SPDIF Out Type - SPDIF- System Sound works / CD audio works

Front Panel Type - HD
SPDIF Out Type - HDMI- System Sound works / CD audio works

Front Panel Type - AC97
SPDIF Out Type - SPDIF- System Sound works / CD audio works

Front Panel Type - HD
SPDIF Out Type - HDMI- System Sound works / CD audio works

But in all cases, I cannot get audio to work on the internet. In case this is a Firefox issue, I'll try Chrome tomorrow (grasping at straws).
Also when booting up, the volume is always set to mute and even when I unmute it the volume icon in the system tray shows 0% and there is no slider there.
MX15 MoBo ASUS M4A88TD-V EVO/USB3 CPU AMD Phenom II X4 945 PSU CORSAIR CX500 (CMPSU-500CX) RAM Crucial CT2KIT25664BA1339 HD WD5000AAKX Wireless EDIMAX EW 7128g

User avatar
Topher
Forum Regular
Forum Regular
Posts: 862
Joined: Sun Feb 10, 2008 5:37 pm

Re: Need help getting sound to work in M11

#16 Postby Topher » Fri May 04, 2012 1:08 pm

Success :happy:
I had a friend bring his Ubuntu CD to see if that worked and it did. Then he looked over my shoulder and was able to point out what I missed in trying to follow m_pav's instructions. Something very simple - DOH - :bagoverhead:
Thanks m_pav. Now looking foreward to actually being able to have Linux classes where people can have a hands on experience and play with it.
MX15 MoBo ASUS M4A88TD-V EVO/USB3 CPU AMD Phenom II X4 945 PSU CORSAIR CX500 (CMPSU-500CX) RAM Crucial CT2KIT25664BA1339 HD WD5000AAKX Wireless EDIMAX EW 7128g

User avatar
Topher
Forum Regular
Forum Regular
Posts: 862
Joined: Sun Feb 10, 2008 5:37 pm

Re: Need help getting sound to work in M11

#17 Postby Topher » Fri May 04, 2012 2:43 pm

Now to finally finish up on sound - I thought I was finished.....
1st - Since the computer will have many users and we will be adding and deleting users, is there a better spot to put the .asoundrc file instead of each user's home directory to be available system wide?

2nd - The sound always starts muted. Is there a way to change that? Even when I unmute sound and have it working, the volume always shows 0%. In the Mixer window, I have two tabs both labeled HD-Audio Generic. The first tab only has one channel IEC958 and has no slider. The second tab has lots of channels with sliders.
If I right click on the Kmix icon in the system tray and try to choose the master channel the two names are the same. And even if I choose the one that is listed last, it doesnt seem to change anything.
MX15 MoBo ASUS M4A88TD-V EVO/USB3 CPU AMD Phenom II X4 945 PSU CORSAIR CX500 (CMPSU-500CX) RAM Crucial CT2KIT25664BA1339 HD WD5000AAKX Wireless EDIMAX EW 7128g

User avatar
m_pav
Forum Guide
Forum Guide
Posts: 2507
Age: 49
Joined: Sun Aug 06, 2006 3:02 pm

Re: Need help getting sound to work in M11

#18 Postby m_pav » Fri May 04, 2012 3:08 pm

Have you changed your default master channel?
Right click the tray icon > select master channel
Mike P

Regd Linux User #472293
(Mine)Lenovo T550, i7-5600U, 16GB, 128GB SSD + 1.0TB HDD, MX15 64-bit
(Wifes) Asus M4A88TD-M, AMD Phenom II x4 955 CPU, nVidia GF610, 6Gb, 500GB+320GB, MX14 + KDE
(Kids) Intel NUC, J1900, 4GB, 64GB SSD, MX14 + KDE

User avatar
Topher
Forum Regular
Forum Regular
Posts: 862
Joined: Sun Feb 10, 2008 5:37 pm

Re: Need help getting sound to work in M11

#19 Postby Topher » Fri May 04, 2012 3:19 pm

Have you changed your default master channel?
Right click the tray icon > select master channel

Right clicking brings up the Select Master Channel box with the current mixer with a drop-down. Both names in my drop down are the same (HD-Audio Generic). In the space below where I think there are supposed to be choices to pick from, there is nothing to choose. No matter which Current Mixer I choose from the drop-down box, nothing shows up in the underneath pane.
MX15 MoBo ASUS M4A88TD-V EVO/USB3 CPU AMD Phenom II X4 945 PSU CORSAIR CX500 (CMPSU-500CX) RAM Crucial CT2KIT25664BA1339 HD WD5000AAKX Wireless EDIMAX EW 7128g

User avatar
m_pav
Forum Guide
Forum Guide
Posts: 2507
Age: 49
Joined: Sun Aug 06, 2006 3:02 pm

Re: Need help getting sound to work in M11

#20 Postby m_pav » Fri May 04, 2012 4:30 pm

Have you changed your default master channel?
Right click the tray icon > select master channel
Mike P

Regd Linux User #472293
(Mine)Lenovo T550, i7-5600U, 16GB, 128GB SSD + 1.0TB HDD, MX15 64-bit
(Wifes) Asus M4A88TD-M, AMD Phenom II x4 955 CPU, nVidia GF610, 6Gb, 500GB+320GB, MX14 + KDE
(Kids) Intel NUC, J1900, 4GB, 64GB SSD, MX14 + KDE


Return to “Sound”

Who is online

Users browsing this forum: No registered users and 2 guests