{"id":14,"date":"2011-12-10T01:29:14","date_gmt":"2011-12-10T01:29:14","guid":{"rendered":"http:\/\/droidtutorials.net\/?p=14"},"modified":"2011-12-10T01:29:14","modified_gmt":"2011-12-10T01:29:14","slug":"ubuntu-sound-saga","status":"publish","type":"post","link":"http:\/\/www.zacherickson.com\/blog\/ubuntu-sound-saga\/","title":{"rendered":"Ubuntu Sound Saga"},"content":{"rendered":"<p>This post is to document my saga with a usb sound card and getting it to work. I know that I can get sound out of this card because I already had it working. I changed a setting and now no sound.<\/p>\n<p>What I have tried so far:<br \/>\nReinstall of Ubuntu, this time I&#8217;m going for minimal install.<\/p>\n<p>installed packages for sound:<br \/>\n<em>sudo apt-get install linux-sound-base alsa-base alsa-utils<\/em><\/p>\n<p><em>aplay -vv \/usr\/share\/sounds\/alsa\/Front_Center.wav<\/em> \u00a0(Verbose tells me no card)<\/p>\n<p>No sound. \u00a0Displays:<\/p>\n<pre><em>ALSA lib confmisc.c:768:(parse_card) cannot find card '0'<\/em>\n<em>ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory<\/em>\n<em>ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings<\/em>\n<em>ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory<\/em>\n<em>ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name<\/em>\n<em>ALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory<\/em>\n<em>ALSA lib conf.c:4663:(snd_config_expand) Evaluate error: No such file or directory<\/em>\n<em>ALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM default<\/em>\n<em>aplay: main:660: audio open error: No such file or directory<\/em><\/pre>\n<p>Now I search to see why my usb card is not detected.<\/p>\n<pre><em>sudo aplay -l<\/em><\/pre>\n<pre>Displays (just aplay -l says no sound card... maybe this is my problem):<\/pre>\n<pre><em>**** List of PLAYBACK Hardware Devices ****<\/em>\n<em>card 1: default [Generic USB Audio Device ], device 0: USB Audio [USB Audio]<\/em>\n<em> Subdevices: 1\/1<\/em>\n<em> Subdevice #0: subdevice #0<\/em><\/pre>\n<p>Now I&#8217;m trying:<\/p>\n<pre><em>lspci -v | grep -A7 -i \"audio\"<\/em><\/pre>\n<p>Shows nothing, this could be a problem (turns out this is because I&#8217;m using a usb sound card and my pci card is disabled). \u00a0I am going to try reseating the usb card. \u00a0Looks like I had the cable plugged into the mic input. \u00a0Still no sound and same error when aplay is used. \u00a0On to the next thing. \u00a0Reading the <a title=\"SoundTroubleShooting\" href=\"https:\/\/help.ubuntu.com\/community\/SoundTroubleshooting\">SoundTroubleShooting<\/a> guide leads me to think it might be bios, checking settings in bios.<\/p>\n<p><em>alsamixer<\/em>\u00a0does not run. \u00a0But if I specify the card\u00a0<em>alsamixer &#8211;card=1<\/em>\u00a0it will work.<\/p>\n<p>I changed USB bootable in my bios and now I can use <em>aplay -l<\/em> with no <em>sudo<\/em> but still same error when trying to play some file. \u00a0Still nothing shows up with <em>lspci<\/em>. Next I will look to see if my driver is loading correctly.<\/p>\n<p>Step 1: what is my sound driver supposed to be called? \u00a0snd-usb?<\/p>\n<p><em>lsusb<\/em><\/p>\n<p>Gives more info, my card is:<\/p>\n<pre>Bus 004 Device 002: ID 0d8c:000e C-Media Electronics, Inc. Audio Adapter (Planet UP-100, Genius G-Talk)<\/pre>\n<p>This sounds familiar from the last time, at least the Planet UP-100. Ok what driver do I need?<\/p>\n<p>Perhaps the driver is <em>snd-usb-audio<\/em>? \u00a0Taking a look at the file:\u00a0<em>\/etc\/modprobe.d\/alsa-base.conf<\/em>\u00a0this file prevents the loading of the snd-usb-audio driver as the 0 device. \u00a0Since I disabled my primary card (it doesn&#8217;t work with Ubuntu) the usb has to be the primary card. \u00a0I will comment out the lines that prevent it from loading (there happen to be two of them exactly the same):<\/p>\n<p><em>options snd-usb-audio index=-2 <\/em>(just add a # in front of the line)<\/p>\n<p>Restarting alsa:<\/p>\n<p><em>sudo alsa force-reload<\/em><\/p>\n<p>It also gave me a nice list of the drivers being loaded by alsa. \u00a0Retesting.<\/p>\n<p>SUCCESS!!<\/p>\n<p>Recap:<\/p>\n<p>1. Check cables.<\/p>\n<p>2. Play sound:\u00a0<em>aplay -vv \/usr\/share\/sounds\/alsa\/Front_Center.wav<\/em><\/p>\n<p>3. Check if there is a card: <em>sudo aplay -l<\/em><\/p>\n<p>4. Use either <em>lsusb<\/em> or\u00a0<span class=\"Apple-style-span\" style=\"font-size: 12px; line-height: 18px; white-space: pre;\"><em><span style=\"font-family: Consolas, Monaco, monospace;\">lspci -v | grep -A7 -i &#8220;audio&#8221;<\/span><\/em> to find out if there is a sound card detected.<\/span><\/p>\n<p>5. Check that the drivers are loading correctly. \u00a0If usb and it has to be the primary card edit\u00a0<em>\/etc\/modprobe.d\/alsa-base.conf<\/em>\u00a0to allow usb as card 0.<\/p>\n<p>Reloading alsa:\u00a0<em>sudo alsa force-reload<\/em><\/p>\n<p>&nbsp;<\/p>\n<p>**Update**<\/p>\n<p>I got a new computer and there were some audio problems with it as well after a minimal install. \u00a0Here is what I did:<\/p>\n<p>After running the\u00a0requisite <em>aplay<\/em>\u00a0I got an error message saying:<\/p>\n<pre>ALSA lib confmisc.c:768:(parse_card) cannot find card '0'\nALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory\nALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings\nALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory\nALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name\nALSA lib conf.c:4184:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory\nALSA lib conf.c:4663:(snd_config_expand) Evaluate error: No such file or directory\nALSA lib pcm.c:2212:(snd_pcm_open_noupdate) Unknown PCM default\naplay: main:660: audio open error: No such file or directory<\/pre>\n<p>Next I tried to run <em>aplay<\/em> sound with sudo, it worked fine. \u00a0My hunch is that there is some sort of permission problem and my user is not setup for access to sound where the root user is. \u00a0Now I will check to see if there is a group problem.<\/p>\n<p>First I tried adding my user to the audio group:<\/p>\n<pre>sudo adduser username audio<\/pre>\n<p>I get the same error running <em>aplay<\/em>. \u00a0Restarting <em>alsa<\/em> does not fix the problem. \u00a0Reboot the computer.<\/p>\n<p><em>Success!<\/em><br \/>\nLinks:<\/p>\n<p><a href=\"https:\/\/help.ubuntu.com\/community\/SoundTroubleshooting\">https:\/\/help.ubuntu.com\/community\/SoundTroubleshooting<\/a><\/p>\n<p><a href=\"http:\/\/mauroandres.wordpress.com\/2007\/04\/18\/minimal-ubuntu-install\/#Sound\">http:\/\/mauroandres.wordpress.com\/2007\/04\/18\/minimal-ubuntu-install\/#Sound<\/a><\/p>\n<p><a href=\"http:\/\/www.alsa-project.org\/main\/index.php\/SoundcardTesting\">http:\/\/www.alsa-project.org\/main\/index.php\/SoundcardTesting<\/a><\/p>\n<p><a href=\"http:\/\/www.maenad.net\/geek\/di8k-debian\/node23.html\">http:\/\/www.maenad.net\/geek\/di8k-debian\/node23.html<\/a><\/p>\n<p>&nbsp;<\/p>\n<p><a href=\"https:\/\/help.ubuntu.com\/8.04\/serverguide\/C\/user-management.html\">https:\/\/help.ubuntu.com\/8.04\/serverguide\/C\/user-management.html<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This post is to document my saga with a usb sound card and getting it to work. I know that I can get sound out of this card because I already had it working. I changed a setting and now &hellip; <a href=\"http:\/\/www.zacherickson.com\/blog\/ubuntu-sound-saga\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[23,26,29],"class_list":["post-14","post","type-post","status-publish","format-standard","hentry","category-ubuntu-2","tag-minimal","tag-sound","tag-ubuntu"],"_links":{"self":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/posts\/14","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/comments?post=14"}],"version-history":[{"count":0,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/posts\/14\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/media?parent=14"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/categories?post=14"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.zacherickson.com\/blog\/wp-json\/wp\/v2\/tags?post=14"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}