MEPIS Community Forum

A Linux operating system based on Debian Stable
View unanswered posts | View unsolved topics | View active topics |



Reply to topic  [ 26 posts ]  Go to page Previous  1, 2, 3  Next
Need help getting sound to work in M11 
Author Message
MEPIS Guide
MEPIS Guide
User avatar

Joined: Sun Aug 06, 2006 3:02 pm
Posts: 2131
Location: New Zealand BOP
Has thanked: 59 times
Have thanks: 432 times
Post # 299303
Post Re: Need help getting sound to work in M11
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:
#!/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:
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:
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:
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:
./asoundrc [DEFAULT_CARD] > ~/.asoundrc
becomes ....
Code:
./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:
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
(1)Lenovo e520, i7-2640M, 8GB, 750GB Seagate Hybrid, MX-14.1_DVD (my own respin)
(2) Asus M4A88TD-M, AMD Phenom II x4 955 CPU, Radeon HD 4250, 4Gb, 1.5TB, antiX-13-64


Tue May 01, 2012 6:49 am

m_pav thanked by: Topher
Profile
MEPIS is cool!
MEPIS is cool!
User avatar

Joined: Sun Feb 10, 2008 5:37 pm
Posts: 711
Location: Arab, Alabama
Has thanked: 97 times
Have thanks: 35 times
Post # 299409
Post Re: Need help getting sound to work in M11
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.

_________________
Mepis11 & MX14 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


Thu May 03, 2012 12:07 pm
Profile
MEPIS Guide
MEPIS Guide
User avatar

Joined: Sun Aug 06, 2006 3:02 pm
Posts: 2131
Location: New Zealand BOP
Has thanked: 59 times
Have thanks: 432 times
Post # 299416
Post Re: Need help getting sound to work in M11
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
(1)Lenovo e520, i7-2640M, 8GB, 750GB Seagate Hybrid, MX-14.1_DVD (my own respin)
(2) Asus M4A88TD-M, AMD Phenom II x4 955 CPU, Radeon HD 4250, 4Gb, 1.5TB, antiX-13-64


Thu May 03, 2012 2:27 pm
Profile
MEPIS is cool!
MEPIS is cool!
User avatar

Joined: Sun Feb 10, 2008 5:37 pm
Posts: 711
Location: Arab, Alabama
Has thanked: 97 times
Have thanks: 35 times
Post # 299421
Post Re: Need help getting sound to work in M11
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.

_________________
Mepis11 & MX14 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


Thu May 03, 2012 3:38 pm
Profile
MEPIS is cool!
MEPIS is cool!
User avatar

Joined: Sun Feb 10, 2008 5:37 pm
Posts: 711
Location: Arab, Alabama
Has thanked: 97 times
Have thanks: 35 times
Post # 299425
Post Re: Need help getting sound to work in M11
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.

_________________
Mepis11 & MX14 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


Thu May 03, 2012 6:22 pm
Profile
MEPIS is cool!
MEPIS is cool!
User avatar

Joined: Sun Feb 10, 2008 5:37 pm
Posts: 711
Location: Arab, Alabama
Has thanked: 97 times
Have thanks: 35 times
Post # 299493
Post Re: Need help getting sound to work in M11
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.

_________________
Mepis11 & MX14 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


Fri May 04, 2012 1:08 pm
Profile
MEPIS is cool!
MEPIS is cool!
User avatar

Joined: Sun Feb 10, 2008 5:37 pm
Posts: 711
Location: Arab, Alabama
Has thanked: 97 times
Have thanks: 35 times
Post # 299497
Post Re: Need help getting sound to work in M11
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.

_________________
Mepis11 & MX14 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


Fri May 04, 2012 2:43 pm
Profile
MEPIS Guide
MEPIS Guide
User avatar

Joined: Sun Aug 06, 2006 3:02 pm
Posts: 2131
Location: New Zealand BOP
Has thanked: 59 times
Have thanks: 432 times
Post # 299499
Post Re: Need help getting sound to work in M11
Have you changed your default master channel?
Right click the tray icon > select master channel

_________________
Mike P

Regd Linux User #472293
(1)Lenovo e520, i7-2640M, 8GB, 750GB Seagate Hybrid, MX-14.1_DVD (my own respin)
(2) Asus M4A88TD-M, AMD Phenom II x4 955 CPU, Radeon HD 4250, 4Gb, 1.5TB, antiX-13-64


Fri May 04, 2012 3:08 pm
Profile
MEPIS is cool!
MEPIS is cool!
User avatar

Joined: Sun Feb 10, 2008 5:37 pm
Posts: 711
Location: Arab, Alabama
Has thanked: 97 times
Have thanks: 35 times
Post # 299502
Post Re: Need help getting sound to work in M11
Quote:
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.

_________________
Mepis11 & MX14 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


Fri May 04, 2012 3:19 pm
Profile
MEPIS Guide
MEPIS Guide
User avatar

Joined: Sun Aug 06, 2006 3:02 pm
Posts: 2131
Location: New Zealand BOP
Has thanked: 59 times
Have thanks: 432 times
Post # 299510
Post Re: Need help getting sound to work in M11
Have you changed your default master channel?
Right click the tray icon > select master channel

_________________
Mike P

Regd Linux User #472293
(1)Lenovo e520, i7-2640M, 8GB, 750GB Seagate Hybrid, MX-14.1_DVD (my own respin)
(2) Asus M4A88TD-M, AMD Phenom II x4 955 CPU, Radeon HD 4250, 4Gb, 1.5TB, antiX-13-64


Fri May 04, 2012 4:30 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 26 posts ]  Go to page Previous  1, 2, 3  Next

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Protected by Anti-Spam ACP Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.