* sblive 4ch output w/ jack - asoundrc magic?
@ 2004-02-04 23:08 Joern Nettingsmeier
2004-02-05 15:02 ` [Alsa-devel] " Takashi Iwai
0 siblings, 1 reply; 6+ messages in thread
From: Joern Nettingsmeier @ 2004-02-04 23:08 UTC (permalink / raw)
To: alsa-devel@lists.sourceforge.net, jackit-devel
[crossposted to alsa-devel and jackit-devel]
hi *!
i'd like to use the rear outs of my sblive platinum with jack.
the following works:
# aplay some.wav -Dfront &
# aplay someother.wav -Drear
both signals end up at my mixer as expected, so it seems the devices
are independent.
front is hw:0,0 which is a duplex device.
rear is hw:0,3 and is playback only.
first and all-important question: are the front and rear out pcm
devices synced in hardware? i suppose so, otherwise they would be
pretty much useless. (if it turns out they aren't, let me know and
ignore the rest of this posting :( )
to use all four outs with jack, i dug out some old asoundrc hack
that takashi and jaroslav showed me a while ago:
// combine two devices into one
pcm.multi {
type multi;
slaves.a.pcm "hw:0,0";
slaves.a.channels 2;
slaves.b.pcm "hw:0,3";
slaves.b.channels 2;
bindings.0.slave a;
bindings.0.channel 0;
bindings.1.slave a;
bindings.1.channel 1;
bindings.2.slave b;
bindings.2.channel 0;
bindings.3.slave b;
bindings.3.channel 1;
}
ctl.multi {
type hw;
card 0;
}
// somehow this device is not continous in memory and thus not
mmap()able. jack wants mmap access, and this routing trick should help:
pcm.ttable {
type route;
slave.pcm "multi";
ttable.0.0 1;
ttable.1.1 1;
ttable.2.2 1;
ttable.3.3 1;
}
ctl.ttable {
type hw;
card 0;
}
ok. now i can do
# jackstart -d alsa -d ttable -P
and i get 4 outs.
3 problems remain:
* no sound from the rear outs when used with jack in this way :(
* qjackctl goes all haywire with this device: xruns galore. all is
well when i don't use qjackctl and start jackd from the command
line, so it might be a qjackctl problem, but i thought i'd mention
it anyway - maybe the ttable device is not really kosher...
* no input from the first two channels.
jack somehow assumes that either all or no channels are duplex. if i
don't use the -P (or non-duplex playback only) flag, it says, "...
nettings@kleineronkel:~> jackstart -d alsa -d ttable
back from read, ret = 1 errno == Invalid argument
jackd 0.94.3
[...]
creating alsa driver ...
ttable|ttable|1024|2|48000|0|0|nomon|swmeter|rt|32bit
ALSA lib pcm_hw.c:1055:(snd_pcm_hw_open) open /dev/snd/pcmC0D3c
failed: No such device
jackstart: pcm.c:689: snd_pcm_nonblock: Assertion `pcm' failed.
Aborted
...", apparently trying to find a capture device for channels 2 and 3.
is there a way to fool jack into believing all are duplex with some
more asoundrc magic? ideally, those two bogus ins would produce
silence, but i don't really care, i don't connect them anyway.
thanks in advance,
jörn
--
"I never use EQ, never, never, never. I previously used to use mic
positioning but I've even given up on that too."
- Jezar on http://www.audiomelody.com
Jörn Nettingsmeier
Kurfürstenstr 49, 45138 Essen, Germany
http://spunk.dnsalias.org (my server)
http://www.linuxaudiodev.org (Linux Audio Developers)
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Alsa-devel] sblive 4ch output w/ jack - asoundrc magic?
2004-02-04 23:08 sblive 4ch output w/ jack - asoundrc magic? Joern Nettingsmeier
@ 2004-02-05 15:02 ` Takashi Iwai
2004-02-05 19:10 ` Joern Nettingsmeier
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Takashi Iwai @ 2004-02-05 15:02 UTC (permalink / raw)
To: Joern Nettingsmeier; +Cc: alsa-devel@lists.sourceforge.net, jackit-devel
At Thu, 05 Feb 2004 00:08:18 +0100,
Joern Nettingsmeier wrote:
>
> [crossposted to alsa-devel and jackit-devel]
>
> hi *!
>
> i'd like to use the rear outs of my sblive platinum with jack.
>
> the following works:
> # aplay some.wav -Dfront &
> # aplay someother.wav -Drear
> both signals end up at my mixer as expected, so it seems the devices
> are independent.
>
> front is hw:0,0 which is a duplex device.
> rear is hw:0,3 and is playback only.
hmm? hw:0,3 isn't for the rear output...
there is already a standard definition for 4.0 output, "surround40".
so, something like below would be better:
ctl.jtest {
type hw
card 0
}
pcm.jtest {
type asym
playback.pcm {
# route for mmap workaround
type route
slave.pcm surround40
ttable.0.0 1
ttable.1.1 1
ttable.2.2 1
ttable.3.3 1
}
capture.pcm {
# 2 channels only
type hw
card 0
}
}
and run jack with -d jtest -i 2 -o 6 options.
Takashi
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [Alsa-devel] sblive 4ch output w/ jack - asoundrc magic?
2004-02-05 15:02 ` [Alsa-devel] " Takashi Iwai
@ 2004-02-05 19:10 ` Joern Nettingsmeier
2004-02-05 19:26 ` Joern Nettingsmeier
2004-02-07 10:56 ` Joern Nettingsmeier
2 siblings, 0 replies; 6+ messages in thread
From: Joern Nettingsmeier @ 2004-02-05 19:10 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel@lists.sourceforge.net, jackit-devel
Takashi Iwai wrote:
> At Thu, 05 Feb 2004 00:08:18 +0100,
> Joern Nettingsmeier wrote:
>
>>[crossposted to alsa-devel and jackit-devel]
>>
>>hi *!
>>
>>i'd like to use the rear outs of my sblive platinum with jack.
>>
>>the following works:
>># aplay some.wav -Dfront &
>># aplay someother.wav -Drear
>>both signals end up at my mixer as expected, so it seems the devices
>>are independent.
>>
>>front is hw:0,0 which is a duplex device.
>>rear is hw:0,3 and is playback only.
>
>
> hmm? hw:0,3 isn't for the rear output...
>
> there is already a standard definition for 4.0 output, "surround40".
> so, something like below would be better:
>
> ctl.jtest {
> type hw
> card 0
> }
>
> pcm.jtest {
> type asym
> playback.pcm {
> # route for mmap workaround
> type route
> slave.pcm surround40
> ttable.0.0 1
> ttable.1.1 1
> ttable.2.2 1
> ttable.3.3 1
> }
> capture.pcm {
> # 2 channels only
> type hw
> card 0
> }
> }
>
> and run jack with -d jtest -i 2 -o 6 options.
you probably meant "-o 4", right?
works like a charm so far, many thanks!
jackd spits out a warning, though:
ALSA lib pcm.c:1168:(snd_pcm_link) SNDRV_PCM_IOCTL_LINK failed:
Operation already in progress
i'll play with it for a while, and then i'll send it to patrick for
inclusion in the alsa docs...
time to play :-D
jörn
--
"I never use EQ, never, never, never. I previously used to use mic
positioning but I've even given up on that too."
- Jezar on http://www.audiomelody.com
Jörn Nettingsmeier
Kurfürstenstr 49, 45138 Essen, Germany
http://spunk.dnsalias.org (my server)
http://www.linuxaudiodev.org (Linux Audio Developers)
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: sblive 4ch output w/ jack - asoundrc magic?
2004-02-05 15:02 ` [Alsa-devel] " Takashi Iwai
2004-02-05 19:10 ` Joern Nettingsmeier
@ 2004-02-05 19:26 ` Joern Nettingsmeier
2004-02-06 11:42 ` Takashi Iwai
2004-02-07 10:56 ` Joern Nettingsmeier
2 siblings, 1 reply; 6+ messages in thread
From: Joern Nettingsmeier @ 2004-02-05 19:26 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel@lists.sourceforge.net
Takashi Iwai wrote:
> At Thu, 05 Feb 2004 00:08:18 +0100,
> Joern Nettingsmeier wrote:
>
>>[crossposted to alsa-devel and jackit-devel]
[removed jackit-devel from cc:]
>>
>>hi *!
>>
>>i'd like to use the rear outs of my sblive platinum with jack.
>>
>>the following works:
>># aplay some.wav -Dfront &
>># aplay someother.wav -Drear
>>both signals end up at my mixer as expected, so it seems the devices
>>are independent.
>>
>>front is hw:0,0 which is a duplex device.
>>rear is hw:0,3 and is playback only.
>
>
> hmm? hw:0,3 isn't for the rear output...
not?
then what is it?
and is hw:0,0 a four-channel out, two channel in device?
i've had this card for a couple of years now, and i still don't
understand a fraction of it...
is the relationship of in and out jacks, mixer strips and alsa
devices documented somewhere?
regards,
jörn
--
"I never use EQ, never, never, never. I previously used to use mic
positioning but I've even given up on that too."
- Jezar on http://www.audiomelody.com
Jörn Nettingsmeier
Kurfürstenstr 49, 45138 Essen, Germany
http://spunk.dnsalias.org (my server)
http://www.linuxaudiodev.org (Linux Audio Developers)
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sblive 4ch output w/ jack - asoundrc magic?
2004-02-05 19:26 ` Joern Nettingsmeier
@ 2004-02-06 11:42 ` Takashi Iwai
0 siblings, 0 replies; 6+ messages in thread
From: Takashi Iwai @ 2004-02-06 11:42 UTC (permalink / raw)
To: Joern Nettingsmeier; +Cc: alsa-devel@lists.sourceforge.net
At Thu, 05 Feb 2004 20:26:10 +0100,
Joern Nettingsmeier wrote:
>
> Takashi Iwai wrote:
> > At Thu, 05 Feb 2004 00:08:18 +0100,
> > Joern Nettingsmeier wrote:
> >
> >>[crossposted to alsa-devel and jackit-devel]
>
> [removed jackit-devel from cc:]
>
> >>
> >>hi *!
> >>
> >>i'd like to use the rear outs of my sblive platinum with jack.
> >>
> >>the following works:
> >># aplay some.wav -Dfront &
> >># aplay someother.wav -Drear
> >>both signals end up at my mixer as expected, so it seems the devices
> >>are independent.
> >>
> >>front is hw:0,0 which is a duplex device.
> >>rear is hw:0,3 and is playback only.
> >
> >
> > hmm? hw:0,3 isn't for the rear output...
>
> not?
>
> then what is it?
it's FX8010 PCM output, mainly used for the spdif output.
> and is hw:0,0 a four-channel out, two channel in device?
hw:0,0 is used for all analog outputs.
basically it supports mono or 2-channel sterem streams, up to 32
streams simultaneously.
it has a hardware routing table per voice. by tuning this table, you
can send the output to front, rear or center/lfe FX bus.
you can find the trick in /usr/share/alsa/cards/EMU10k1.conf file.
> i've had this card for a couple of years now, and i still don't
> understand a fraction of it...
>
> is the relationship of in and out jacks, mixer strips and alsa
> devices documented somewhere?
alsa-kernel/Documentation/SB-Live-mixer.txt.
the only sure way to access the certain channel is to use the
pre-defined pcm name, such as "front", "surround40", "rear" and
"iec958". it assures that the output comes from the front jack
regardless of soundcard, and regardless what magic is done.
accessing via "hw" pcm is no sure way. it allows you to access
*directly* to the hardware, but then you have to tune up by yourself.
Takashi
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: sblive 4ch output w/ jack - asoundrc magic?
2004-02-05 15:02 ` [Alsa-devel] " Takashi Iwai
2004-02-05 19:10 ` Joern Nettingsmeier
2004-02-05 19:26 ` Joern Nettingsmeier
@ 2004-02-07 10:56 ` Joern Nettingsmeier
2 siblings, 0 replies; 6+ messages in thread
From: Joern Nettingsmeier @ 2004-02-07 10:56 UTC (permalink / raw)
To: Takashi Iwai; +Cc: alsa-devel@lists.sourceforge.net, jackit-devel
takashi, many thanks for your helpful reply. i'm enjoying
four-channel output with jack now :-D
i have added your .asound hint to
http://alsa.opensrc.org/index.php?page=SurroundSound
in the hope that other folks will find it useful.
best regards,
jo"rn
Takashi Iwai wrote:
> At Thu, 05 Feb 2004 00:08:18 +0100,
> Joern Nettingsmeier wrote:
>
>>[crossposted to alsa-devel and jackit-devel]
>>
>>hi *!
>>
>>i'd like to use the rear outs of my sblive platinum with jack.
>
> there is already a standard definition for 4.0 output, "surround40".
> so, something like below would be better:
>
> ctl.jtest {
> type hw
> card 0
> }
>
> pcm.jtest {
> type asym
> playback.pcm {
> # route for mmap workaround
> type route
> slave.pcm surround40
> ttable.0.0 1
> ttable.1.1 1
> ttable.2.2 1
> ttable.3.3 1
> }
> capture.pcm {
> # 2 channels only
> type hw
> card 0
> }
> }
>
> and run jack with -d jtest -i 2 -o 6 options.
>
>
> Takashi
--
"I never use EQ, never, never, never. I previously used to use mic
positioning but I've even given up on that too."
- Jezar on http://www.audiomelody.com
Jo"rn Nettingsmeier
Kurfu"rstenstr 49, 45138 Essen, Germany
http://spunk.dnsalias.org (my server)
http://www.linuxaudiodev.org (Linux Audio Developers)
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-02-07 10:56 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-04 23:08 sblive 4ch output w/ jack - asoundrc magic? Joern Nettingsmeier
2004-02-05 15:02 ` [Alsa-devel] " Takashi Iwai
2004-02-05 19:10 ` Joern Nettingsmeier
2004-02-05 19:26 ` Joern Nettingsmeier
2004-02-06 11:42 ` Takashi Iwai
2004-02-07 10:56 ` Joern Nettingsmeier
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.