jackd's use of the alsa mixer

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

jackd's use of the alsa mixer

James Courtier-Dutton
Hi,

Is there a way to stop jackd opening the alsa mixer controls?

I want to use the correct alsa playback device names like for example:
"front", "rear" etc. But these all fail due to jackd trying to open the
"front" mixer control that does not exist.

I don't see any reason for jackd to use any of the alsa global mixer
controls anyway.

Can anyone explain?

James


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jackd's use of the alsa mixer

Florian Paul Schmidt-2
On Sun, 30 Oct 2005 09:39:23 +0000
James Courtier-Dutton <[hidden email]> wrote:

> Hi,
>
> Is there a way to stop jackd opening the alsa mixer controls?
>
> I want to use the correct alsa playback device names like for example:
> "front", "rear" etc. But these all fail due to jackd trying to open the
> "front" mixer control that does not exist.
>
> I don't see any reason for jackd to use any of the alsa global mixer
> controls anyway.
>
> Can anyone explain?

Afaik it uses the mixer device to see whether it can enable hw
monitoring via this mechanism. Not sure though.

I think it would be a good idea to only try to open the mixer device
when nessecary. Also, the mixer device name should be independent from
the pcm name used.

Have fun,
Flo

--
Palimm Palimm!
http://tapas.affenbande.org


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jackd's use of the alsa mixer

Lee Revell
On Sun, 2005-10-30 at 10:53 +0100, Florian Schmidt wrote:

> On Sun, 30 Oct 2005 09:39:23 +0000
> James Courtier-Dutton <[hidden email]> wrote:
>
> > Hi,
> >
> > Is there a way to stop jackd opening the alsa mixer controls?
> >
> > I want to use the correct alsa playback device names like for example:
> > "front", "rear" etc. But these all fail due to jackd trying to open the
> > "front" mixer control that does not exist.
> >
> > I don't see any reason for jackd to use any of the alsa global mixer
> > controls anyway.
> >
> > Can anyone explain?
>
> Afaik it uses the mixer device to see whether it can enable hw
> monitoring via this mechanism. Not sure though.
>
> I think it would be a good idea to only try to open the mixer device
> when nessecary. Also, the mixer device name should be independent from
> the pcm name used.
>

Can someone with a hardware monitoring capable device try this completly
untested patch?  It makes failure to open the mixer device a non-fatal
error.  It makes much more sense to me to just leave hw monitoring
disabled if we can't find the mixer device than to completely bail.
AFAICT the hardware monitoring code in hammerfall.c, hdsp.c and
ice1712.c already handles a null ctl_handle - if it doesn't it
should. ;-)

AFAICT the current behavior is one of the top reasons that users have to
create an .asoundrc which is inherently user unfriendly.

--- cvs/jack/drivers/alsa/alsa_driver.c~ 2005-08-14 04:33:08.000000000 -0400
+++ cvs/jack/drivers/alsa/alsa_driver.c 2005-11-07 11:55:57.000000000 -0500
@@ -117,14 +117,10 @@
  if ((err = snd_ctl_open (&driver->ctl_handle, ctl_name, 0)) < 0) {
  jack_error ("control open \"%s\" (%s)", ctl_name,
     snd_strerror(err));
- return -1;
- }
-
- if ((err = snd_ctl_card_info(driver->ctl_handle, card_info)) < 0) {
+ } else if ((err = snd_ctl_card_info(driver->ctl_handle, card_info)) < 0) {
  jack_error ("control hardware info \"%s\" (%s)",
     driver->alsa_name_playback, snd_strerror (err));
  snd_ctl_close (driver->ctl_handle);
- return -1;
  }
 
  driver->alsa_driver = strdup(snd_ctl_card_info_get_driver (card_info));




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jackd's use of the alsa mixer

James Courtier-Dutton
Lee Revell wrote:

>
> Can someone with a hardware monitoring capable device try this completly
> untested patch?  It makes failure to open the mixer device a non-fatal
> error.  It makes much more sense to me to just leave hw monitoring
> disabled if we can't find the mixer device than to completely bail.
> AFAICT the hardware monitoring code in hammerfall.c, hdsp.c and
> ice1712.c already handles a null ctl_handle - if it doesn't it
> should. ;-)
>
> AFAICT the current behavior is one of the top reasons that users have to
> create an .asoundrc which is inherently user unfriendly.
>
> --- cvs/jack/drivers/alsa/alsa_driver.c~ 2005-08-14 04:33:08.000000000 -0400
> +++ cvs/jack/drivers/alsa/alsa_driver.c 2005-11-07 11:55:57.000000000 -0500
> @@ -117,14 +117,10 @@
>   if ((err = snd_ctl_open (&driver->ctl_handle, ctl_name, 0)) < 0) {
>   jack_error ("control open \"%s\" (%s)", ctl_name,
>      snd_strerror(err));
> - return -1;
> - }
> -
> - if ((err = snd_ctl_card_info(driver->ctl_handle, card_info)) < 0) {
> + } else if ((err = snd_ctl_card_info(driver->ctl_handle, card_info)) < 0) {
>   jack_error ("control hardware info \"%s\" (%s)",
>      driver->alsa_name_playback, snd_strerror (err));

Can't we add an option for the user to be able to select a different
device name for the control device? I.e. one for playback, one for
capture, and another for control.
In my view that is the more complete fix.



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel
Reply | Threaded
Open this post in threaded view
|

Re: jackd's use of the alsa mixer

Lee Revell
On Mon, 2005-11-07 at 16:40 +0000, James Courtier-Dutton wrote:

> Lee Revell wrote:
> >
> > Can someone with a hardware monitoring capable device try this completly
> > untested patch?  It makes failure to open the mixer device a non-fatal
> > error.  It makes much more sense to me to just leave hw monitoring
> > disabled if we can't find the mixer device than to completely bail.
> > AFAICT the hardware monitoring code in hammerfall.c, hdsp.c and
> > ice1712.c already handles a null ctl_handle - if it doesn't it
> > should. ;-)
> >
> > AFAICT the current behavior is one of the top reasons that users have to
> > create an .asoundrc which is inherently user unfriendly.
> >
> > --- cvs/jack/drivers/alsa/alsa_driver.c~ 2005-08-14 04:33:08.000000000 -0400
> > +++ cvs/jack/drivers/alsa/alsa_driver.c 2005-11-07 11:55:57.000000000 -0500
> > @@ -117,14 +117,10 @@
> >   if ((err = snd_ctl_open (&driver->ctl_handle, ctl_name, 0)) < 0) {
> >   jack_error ("control open \"%s\" (%s)", ctl_name,
> >      snd_strerror(err));
> > - return -1;
> > - }
> > -
> > - if ((err = snd_ctl_card_info(driver->ctl_handle, card_info)) < 0) {
> > + } else if ((err = snd_ctl_card_info(driver->ctl_handle, card_info)) < 0) {
> >   jack_error ("control hardware info \"%s\" (%s)",
> >      driver->alsa_name_playback, snd_strerror (err));
>
> Can't we add an option for the user to be able to select a different
> device name for the control device? I.e. one for playback, one for
> capture, and another for control.
> In my view that is the more complete fix.
>

Maybe, I just don't have time to implement that now.  I still think we
should not bail if the device is unavailable, especially if hardware
monitoring is not enabled, we should just warn "can't find mixer device,
hardware monitoring will be unavailable".

How do we handle multiple soundcards joined to make one device (AFAICT
no one has ever been able to get this to work anyway)?  I'm not sure
it's possible for JACK to handle this sanely, the solution might be to
implement composite mixer devices in ALSA, and you'd still need to
extend the ALSA API to allow mapping PCM channels to mixer channels (I
believe you posted a proposal for this once).

Lee





-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Jackit-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jackit-devel