abarbarian
Posts: 9
Joined: Wed Jul 11, 2012 9:47 am

Sound problem

Sat Jul 21, 2012 12:57 pm

Hi I have set up a Pi and as far as I can tell have set up alsa correctly.The system is fully updated.I am using the audio jack and am using a tv as monitor.
I can hear a voice when I do

Code: Select all

$ aplay /usr/share/sounds/alsa/Front_Center.wav


But can not get sound any other way. None of the audio players I have tried work. I am trying to get "festival" to work but get

Code: Select all

@alarmpi ~]$ echo "This is an example. Arch is the best." | festival --tts
    ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory
    ALSA lib confmisc.c:392:(snd_func_concat) error evaluating strings
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_concat returned error: No such file or directory
    ALSA lib confmisc.c:1251:(snd_func_refer) error evaluating name
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
    ALSA lib conf.c:4720:(snd_config_expand) Evaluate error: No such file or directory
    ALSA lib pcm.c:2217:(snd_pcm_open_noupdate) Unknown PCM default
    aplay: main:682: audio open error: No such file or directory
    ALSA lib confmisc.c:768:(parse_card) cannot find card '0'
    ALSA lib conf.c:4241:(_snd_config_evaluate) function snd_func_card_driver returned error: No such file or directory

Above is only a part of the error output.

I have scoured the net but can find no solution.
Can anyone offer any advice ??
Thanks. 8-)

pepedog
Posts: 1043
Joined: Fri Oct 07, 2011 9:55 am

Re: Sound problem

Sat Jul 21, 2012 1:26 pm

I posted here
http://archlinuxarm.org/forum/viewtopic.php?f=31&t=3265
You didn't mention analog jack there

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Sound problem

Mon Jul 23, 2012 5:30 am

Sorry, my registration in other forum did not take, so am posting here.

I do not have my Pi yet, but would like to know what I will need to be able to generate sound. I believe I need the alsa driver, and some speakers. But am not clear on what packages need installing.

According to a how to page I saw about alsa sound, for alsa to work, the lib, utils, and driver are needed but I do not see alsa-driver in the repository. I see tools. firmware, plugins, oss. Will it work if I just install the lib and utils?

I also wonder if the trouble others are having is because the alsa-driver package is not (yet) in the repository?
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

naicheben
Posts: 344
Joined: Sat Jan 28, 2012 12:28 pm
Contact: Website

Re: Sound problem

Mon Jul 23, 2012 7:29 am

The sound module is snd_bcm2835

Code: Select all

[root@alarmpi ~]# lsmod
Module                  Size  Used by
ipv6                  221708  22 
snd_bcm2835            15364  2 
snd_pcm                51232  2 snd_bcm2835
snd_page_alloc          2612  1 snd_pcm
snd_timer              14528  1 snd_pcm
snd                    32336  6 snd_timer,snd_pcm,snd_bcm2835
soundcore               3984  1 snd
lirc_rpi                4076  3 
lirc_dev                6796  1 lirc_rpi
[root@alarmpi ~]# 
But you don't have tu hurry, the driver is still alpha. Noice, distortion and hicups on analouge jack are still not solved.
I play mp3 via mpd. in my /etc/mpd.conf is:

Code: Select all

audio_output {
	type		"alsa"
	name		"My ALSA Device"
	device		"hw:0,0"	# optional
#	format		"44100:16:2"	# optional
#       format          "48000:16:2"
#	mixer_type      "software"	# optional
#	mixer_device	"default"	# optional
	mixer_control	"PCM"		# optional
#	mixer_index	"1"		# optional
}
I can even control the volume via lirc
Only different to "normal" archlinux is lirc_rpi for a receiver on GPIO witch needs a self compiled kernel.

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Sound problem

Mon Jul 23, 2012 3:03 pm

What is mpd? I am totally new to arch and working with sound. I was thinking of rerouting sound to cheap usb speakers I will buy when my Pi comes, and it will not matter if it is not perfect - it is for some audio reminders. I am working on a script that will make some noise to remind me to do things, since all I have are PDAs that can do alarms, but no customized sound output and inadequate memory for the task. I know the Pi is limited too, but it will still be a whole lot better than my poor little PDAs.

But where is the sound driver, is it built in to the image or is it in a separate package?
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

naicheben
Posts: 344
Joined: Sat Jan 28, 2012 12:28 pm
Contact: Website

Re: Sound problem

Mon Jul 23, 2012 5:27 pm

Sound driver for onboard sound is allready in the image. For some hardware (also USB-sound) there are precomlied modules in the image. I don't know if they get loaded by default. I only had to edit a bit:

Code: Select all

[root@alarmpi ~]# cat /etc/modules-load.d/sound.conf 
snd_bcm2835
[root@alarmpi ~]# 
and the driver gets loaded at boot. But if you choose other hardware then these information are comletely irrelevant for you. So I do not understand why you ask. You should FIRST find out what USB-Sound hardware is linux compatible and THEN look for a way to load the modules AND remember this: depanding on the choosen hardware you may have to compile your own kernel!
Compiling the kernel is not that hard if you are familiar with linux you may allready have compiled your own modules/kernel. For my kernel (nearly original) these drivers for USB-Sound are available:

Code: Select all

[root@alarmpi ~]# ls /lib/modules/3.1.9-ARCH-IJ+/kernel/sound/usb/
6fire  caiaq  misc  snd-usb-audio.ko  snd-usbmidi-lib.ko

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Sound problem

Mon Jul 23, 2012 6:49 pm

I guess I ask because I am a dunce about this. I will be running my Pi via ssh, without a monitor. Will the board be able to generate sound without any speakers?
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

naicheben
Posts: 344
Joined: Sat Jan 28, 2012 12:28 pm
Contact: Website

Re: Sound problem

Mon Jul 23, 2012 10:40 pm

no

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Sound problem

Tue Jul 24, 2012 3:34 am

Thanks. I also just spoke with a friend who explained that alsa is compiled into all kernels now, and that if I want to route the sound to a usb speaker, I can edit the configuration file to do that. Does that sound right for the Pi too? I will not be getting any special sound cards, that is not necessary for what I will be doing with sound, which does not require high quality. If the Pi can make a noise, that will suffice.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

Patschi
Posts: 44
Joined: Thu Jun 07, 2012 1:04 am
Location: Austria
Contact: ICQ Website

Re: Sound problem

Tue Jul 24, 2012 12:59 pm

When I try to change the current directory to the kernel folder it gaves me an error... Is this normally?
root@raspberrypi /lib/modules/3.1.9+ # cd kernel
-bash: cd: kernel: Input/output error
My german homepage: http://pkern.at (Ofcourse Raspberry Pi articles too :D)

naicheben
Posts: 344
Joined: Sat Jan 28, 2012 12:28 pm
Contact: Website

Re: Sound problem

Tue Jul 24, 2012 1:27 pm

I don't think it's normal. I would guess it's an SD-Card failure. Did you reboot?

Patschi
Posts: 44
Joined: Thu Jun 07, 2012 1:04 am
Location: Austria
Contact: ICQ Website

Re: Sound problem

Tue Jul 24, 2012 1:48 pm

Well, I think too that something is corrupted... dmesg:
[ 2462.995680] EXT4-fs error (device mmcblk0p2): ext4_iget:3571: inode #81: comm bash: bogus i_mode (167356)
[ 2463.082936] EXT4-fs error (device mmcblk0p2): ext4_iget:3571: inode #81: comm bash: bogus i_mode (167356)
[ 2463.160316] EXT4-fs error (device mmcblk0p2): ext4_iget:3571: inode #81: comm bash: bogus i_mode (167356)
[ 3728.746752] EXT4-fs error (device mmcblk0p2): ext4_iget:3571: inode #81: comm bash: bogus i_mode (167356)
Notice to me: NEVER use Windows to write the SDCard. Makes only troubles.
My german homepage: http://pkern.at (Ofcourse Raspberry Pi articles too :D)

sdjf
Posts: 1395
Joined: Fri Mar 16, 2012 5:20 am
Location: California
Contact: Website

Re: Sound problem

Tue Jul 24, 2012 3:20 pm

I would do the following commands before trying to do your "cd kernel" and examine the output:

pwd
ls -l kernel

Yeah, if you tried to write to ext4 file system with Windows, not good.

The above two commands tell you your current working directory (pwd) and whether the kernel directory is seen.

You can also use the df command to tell you what file systems are there.
FORUM TIP: To view someone's posting history, sign in, click on their user name, then on "Search User's Posts." || Running ArchLinuxArm on Model 2B and 512MB Model B

Patschi
Posts: 44
Joined: Thu Jun 07, 2012 1:04 am
Location: Austria
Contact: ICQ Website

Re: Sound problem

Tue Jul 24, 2012 3:51 pm

I wrote the debian-wheezy.img with Windows on my sdcard. Maybe because that it had the error.
I just putted my sdcard in my notebook and executed e2fsck on it - now it work's fine without errors :)

But the kernel folder is gone...
My german homepage: http://pkern.at (Ofcourse Raspberry Pi articles too :D)

Return to “Arch”