LinuxQuestions.org
Visit Jeremy's Blog.
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-03-2010, 12:11 PM   #1
knobby67
Member
 
Registered: Mar 2006
Posts: 627

Rep: Reputation: 43
sound volume in ALSA


Hi all,
I'm doing sound on an embedded board using alsa libasound. I've got the sound up and can load and play a tune using snd_pcm_writei. However the sound is very high. I've checked through ALSA documents (there's a lot :s) and found snd_ctl_open which I think opens up the volume for writting?
However I can't get the function to work. I've found a sample

char name[20];
if ( snd_ctl_open( &handle, name, 0 ) < 0 ) {

std::cerr << "control open (" << n_cards << ") failed." << std::endl;

continue;
}

However name seems uninitialized to me? So I tried but got and error, I then tried sending "hw:0,0" which is my hardware device from snd_pcm_open
this also gives me an error. My error is
(snd_ctl_open_noupdate) invalid CTL hw:0,0

Can anyone advise on what I need to send for that parameter? Thanks!
 
  


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
Alsa configured but no sound- volume control on taskbar glablj Puppy 7 06-30-2008 01:11 PM
Volume Control: Intel 82801DB-ICH4 (Alsa mixer) won't save volume levels. cayspekko Linux - Newbie 2 01-31-2008 12:17 AM
problem with sound volume (realplayer-alsa whispering) kaz2100 Linux - General 0 01-21-2007 04:28 PM
ALSA master volume in Intel sound card miguelmmg Slackware 1 09-19-2005 10:32 AM
Can't change master volume in ALSA.. NO SOUND! SonoranFun Linux - Newbie 5 06-16-2005 07:38 PM

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

All times are GMT -5. The time now is 10:33 AM.

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