LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-01-2010, 05:18 AM   #1
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Rep: Reputation: 43
find sound device


Hi all,
I'm trying to get sound to work on an embedded board. The boot says ALSA is present and sound chip is present. So I try to open the device with


if ((snd_pcm_open (&pcm_handle, device_name, SND_PCM_STREAM_PLAYBACK, SND_PCM_NONBLOCK)) < 0)
{
....

The hardware manufacturer assures me the device is hw:0,0 so I set device to
const char *device_name = "hw:0,0";

This gives me
ALSA lib pcm.c 2143snd_pcm_open_nonupdate) unknown PCM hw:0,0

So I'm presuming the advice that I use hw:0,0 must be wrong? So I need to find a way of working out what the device id is. I've tried default, no effect, then tried the command asoundconf list, which returns an error. I'm using a min linux build on an embedded system (busybox) so is there a way to find my sound device.
 
Old 02-01-2010, 05:27 AM   #2
jf.argentino
Member
 
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493

Rep: Reputation: 50
Not sure but maybe by browsing and cat'ing file(s) in "/proc/asound" directory?
 
Old 02-01-2010, 06:03 AM   #3
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Original Poster
Rep: Reputation: 43
Thank but that doesn't work, it gives me the full name of the device rather than the device handle I need to pass to the function. That's my problem I don't know how that's found :s
 
  


Reply



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
Telnet to usb device on interface usb0 (and find IP of device) chickenlinux Linux - Networking 4 10-18-2009 11:18 AM
Kernel 2.6.26.3: VFS cannot open root device, can't find root device dimm0k Linux - Kernel 1 09-21-2008 03:19 PM
cant find any sound device (ac'97) poodle Linux - Hardware 8 08-05-2006 05:12 AM
UL 1.0 GRUB: could not find device for /boot: not found or not a block device cma Linux - General 4 12-12-2005 03:35 AM
can't find sound device WanglessOlasov Linux - Hardware 21 12-11-2005 10:56 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:45 PM.

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