From: Riccardo Casagrande <riccardo.casagrande@multiconn.it>
To: alsa-devel@alsa-project.org
Subject: SoftVol in user space
Date: Thu, 20 Sep 2018 17:24:57 +0200 [thread overview]
Message-ID: <f83284d2d7df965aa9c80d7b1f85d146@multiconn.it> (raw)
Hello devs,
I have to add a volume control to my custom card (It has an i.MX6 chip and 3 FDA2100 from TI as audio chip) because the FDAs have no volume controller.
This below is the .asoundrc file I made. It works great if I manually made a speaker-test of one of devicefdaX sound card. Then I can see on alsamixer the volume control, but my need is to access and control softvol from user space.
pcm.softvolfda0 {
type softvol
slave {
pcm "hw:0,0"
}
control {
name "volume0"
card 0
device 0
}
}
pcm.softvolfda1 {
type softvol
slave {
pcm "hw:0,1"
}
control {
name "volume1"
card 0
device 1
}
}
pcm.softvolfda2 {
type softvol
slave {
pcm "hw:0,2"
}
control {
name "volume2"
card 0
device 2
}
}
pcm.devicefda0 {
type plug
slave.pcm "softvolfda0"
}
pcm.devicefda1 {
type plug
slave.pcm "softvolfda1"
}
pcm.devicefda2 {
type plug
slave.pcm "softvolfda2"
}
I saw that on alsalib there is this command
int snd_pcm_softvol_open (snd_pcm_t ** pcmp,
const char * name,
snd_pcm_format_t sformat,
int ctl_card,
snd_ctl_elem_id_t * ctl_id,
int cchannels,
double min_dB,
double max_dB,
int resolution,
snd_pcm_t * slave,
int close_slave
)
but I can't find any example of usage.This is the log of the error:
mp && slave' failed.
Aborted
Any suggestion is welcome
Riccardo Casagrande
_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
reply other threads:[~2018-09-20 15:25 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f83284d2d7df965aa9c80d7b1f85d146@multiconn.it \
--to=riccardo.casagrande@multiconn.it \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).