All of lore.kernel.org
 help / color / mirror / Atom feed
* How to route "spdif" to an FXBUS of emu10k1
@ 2003-01-08 11:47 Gerard Janssen
  2003-01-08 15:30 ` Jaroslav Kysela
       [not found] ` <Pine.LNX.4.33.0301081618500.2215-100000@pnote.perex-int.cz >
  0 siblings, 2 replies; 4+ messages in thread
From: Gerard Janssen @ 2003-01-08 11:47 UTC (permalink / raw)
  To: alsa-devel

Hi,

By making slight changes in emufx.c, I could use all four spdif stereo
channels of the sblive! that are present on the audio-ext connector. These
spdif0..3 outputs can be accessed via: EXTOUT_TOSLINK_L,R ;
EXTOUT_HEADPHONE_L,R ; EXTOUT_REAR_L,R and EXTOUT_CENTER,LFE. By re-routing
"spdif", "front", "rear" and "center_lfe" to the respective outputs, four
stereo signals (8 channels) can be simultaneously send to these outputs. 

The "front", "rear" and "center_lfe" signals are alsmost perfectly
synchronized (within a few samples) and the small delays are constant.
However, the signal via "spdif" is not: its delay w.r.t. the other signals
is about 60 samples and changes randomly every time the application is
started. 
The "spdif" signal is taken from GPR(8) and GPR(9) in emufx.c. As far as I
could backtrace these signals come from etram, which probably is the cause
of the random delay.

A solution might be to put the "spdif" also directly in two FXBUS registers
(there are still 6 free FXBUS registers), as is done with the other
signals. However, I don't know how to do this.

I would appreciate any help or suggestions in routing "spdif" to an FXBUS.

Thanks,

Gerard Janssen


********************************************************************** 
Dr.ir. Gerard J.M. Janssen
Delft University of Technology 
Faculty of Information Technology and Systems (ITS) 
Wireless Mobile Communications Group
P.O. Box 5031, 2600 GA Delft, The Netherlands 
Phone +31-15-2786736, Fax +31-15-2781774 
E-mail G.Janssen@ITS.TUDelft.NL 
**********************************************************************




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to route "spdif" to an FXBUS of emu10k1
  2003-01-08 11:47 How to route "spdif" to an FXBUS of emu10k1 Gerard Janssen
@ 2003-01-08 15:30 ` Jaroslav Kysela
       [not found] ` <Pine.LNX.4.33.0301081618500.2215-100000@pnote.perex-int.cz >
  1 sibling, 0 replies; 4+ messages in thread
From: Jaroslav Kysela @ 2003-01-08 15:30 UTC (permalink / raw)
  To: Gerard Janssen; +Cc: alsa-devel

On Wed, 8 Jan 2003, Gerard Janssen wrote:

> Hi,
> 
> By making slight changes in emufx.c, I could use all four spdif stereo
> channels of the sblive! that are present on the audio-ext connector. These
> spdif0..3 outputs can be accessed via: EXTOUT_TOSLINK_L,R ;
> EXTOUT_HEADPHONE_L,R ; EXTOUT_REAR_L,R and EXTOUT_CENTER,LFE. By re-routing
> "spdif", "front", "rear" and "center_lfe" to the respective outputs, four
> stereo signals (8 channels) can be simultaneously send to these outputs. 
> 
> The "front", "rear" and "center_lfe" signals are alsmost perfectly
> synchronized (within a few samples) and the small delays are constant.
> However, the signal via "spdif" is not: its delay w.r.t. the other signals
> is about 60 samples and changes randomly every time the application is
> started. 
> The "spdif" signal is taken from GPR(8) and GPR(9) in emufx.c. As far as I
> could backtrace these signals come from etram, which probably is the cause
> of the random delay.
> 
> A solution might be to put the "spdif" also directly in two FXBUS registers
> (there are still 6 free FXBUS registers), as is done with the other
> signals. However, I don't know how to do this.
> 
> I would appreciate any help or suggestions in routing "spdif" to an FXBUS.

These steps are necessary:

1) remove the emufx PCM code (or the last two lines):

        /* 22: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[0]), GPR(gpr + 8), GPR_DBAC, C_ffffffff);
        /* 23: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[1]), GPR(gpr + 9), GPR_DBAC, C_ffffffff);

   you can do it without modification of driver code itself (see 
   SNDRV_EMU10K1_IOCTL_CODE_POKE and SNDRV_EMU10K1_IOCTL_CODE_PEEK ioctls)

2) replace these two lines in emufx:

        OP(icode, &ptr, iMACINT0, GPR(6), C_00000000, FXBUS(FXBUS_PCM_CENTER), C_00000004);
        OP(icode, &ptr, iMACINT0, GPR(7), C_00000000, FXBUS(FXBUS_PCM_LFE), C_00000004);

to

        OP(icode, &ptr, iMACINT0, GPR(6), C_00000000, FXBUS(8), C_00000004);
        OP(icode, &ptr, iMACINT0, GPR(7), C_00000000, FXBUS(9), C_00000004);

3) create a new "chn67" pcm in your .asoundrc:

pcm.chn67 {
        @args [ CARD ]
        @args.CARD {
                type string
        }
        type hooks
        slave.pcm {
                type hw
                card $CARD
                device 0
        }
        hooks.0 {
                type ctl_elems
                hook_args [
                        {
                                name "EMU10K1 PCM Send Volume"
                                index { @func private_pcm_subdevice }
                                lock true
                                value [ 0 0 0 0 255 0 0 0 0 255 0 0 ]
                        }
                        {
                                name "EMU10K1 PCM Send Routing"
                                index { @func private_pcm_subdevice }
                                lock true
                                value [ 0 1 2 3 8 9 0 1 8 9 0 1 ]
                        }
	}
}

Note: Send Routing is fxbus setup

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to route "spdif" to an FXBUS of emu10k1
       [not found] ` <Pine.LNX.4.33.0301081618500.2215-100000@pnote.perex-int.cz >
@ 2003-01-09  8:24   ` Gerard Janssen
  2003-01-09 12:00     ` Jaroslav Kysela
  0 siblings, 1 reply; 4+ messages in thread
From: Gerard Janssen @ 2003-01-09  8:24 UTC (permalink / raw)
  To: Jaroslav Kysela; +Cc: alsa-devel

Hi Jaroslav,

Many thanks for your reply. This realy solved my problem.

I have been able to implement a new PCM-stream and send it to empty FXBUS
registers. However, I could not find .asoundcr (I am using SUSE 8.1 with
ALSA_rc6). Where is it? In stead, I adapted alsa.conf, emu10k1.conf and
added a pcm_new.conf in /usr/share/alsa/ and this worked. 

After having done this, I am stuck with some questions. Why are there no
"Send Routing" lines in the "front" and "rear" config files, since they are
routed to FXBUS? 
Why do the lines:
>        /* 22: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[0]),
GPR(gpr + 8), GPR_DBAC, C_ffffffff);
>        /* 23: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[1]),
GPR(gpr + 9), GPR_DBAC, C_ffffffff);
have to be removed?

With kind regards,

Gerard Janssen

At 04:30 PM 1/8/03 +0100, Jaroslav Kysela wrote:
>On Wed, 8 Jan 2003, Gerard Janssen wrote:
>
>> Hi,
>> 
>> By making slight changes in emufx.c, I could use all four spdif stereo
>> channels of the sblive! that are present on the audio-ext connector. These
>> spdif0..3 outputs can be accessed via: EXTOUT_TOSLINK_L,R ;
>> EXTOUT_HEADPHONE_L,R ; EXTOUT_REAR_L,R and EXTOUT_CENTER,LFE. By re-routing
>> "spdif", "front", "rear" and "center_lfe" to the respective outputs, four
>> stereo signals (8 channels) can be simultaneously send to these outputs. 
>> 
>> The "front", "rear" and "center_lfe" signals are alsmost perfectly
>> synchronized (within a few samples) and the small delays are constant.
>> However, the signal via "spdif" is not: its delay w.r.t. the other signals
>> is about 60 samples and changes randomly every time the application is
>> started. 
>> The "spdif" signal is taken from GPR(8) and GPR(9) in emufx.c. As far as I
>> could backtrace these signals come from etram, which probably is the cause
>> of the random delay.
>> 
>> A solution might be to put the "spdif" also directly in two FXBUS registers
>> (there are still 6 free FXBUS registers), as is done with the other
>> signals. However, I don't know how to do this.
>> 
>> I would appreciate any help or suggestions in routing "spdif" to an FXBUS.
>
>These steps are necessary:
>
>1) remove the emufx PCM code (or the last two lines):
>
>        /* 22: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[0]),
GPR(gpr + 8), GPR_DBAC, C_ffffffff);
>        /* 23: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[1]),
GPR(gpr + 9), GPR_DBAC, C_ffffffff);
>
>   you can do it without modification of driver code itself (see 
>   SNDRV_EMU10K1_IOCTL_CODE_POKE and SNDRV_EMU10K1_IOCTL_CODE_PEEK ioctls)
>
>2) replace these two lines in emufx:
>
>        OP(icode, &ptr, iMACINT0, GPR(6), C_00000000,
FXBUS(FXBUS_PCM_CENTER), C_00000004);
>        OP(icode, &ptr, iMACINT0, GPR(7), C_00000000,
FXBUS(FXBUS_PCM_LFE), C_00000004);
>
>to
>
>        OP(icode, &ptr, iMACINT0, GPR(6), C_00000000, FXBUS(8), C_00000004);
>        OP(icode, &ptr, iMACINT0, GPR(7), C_00000000, FXBUS(9), C_00000004);
>
>3) create a new "chn67" pcm in your .asoundrc:
>
>pcm.chn67 {
>        @args [ CARD ]
>        @args.CARD {
>                type string
>        }
>        type hooks
>        slave.pcm {
>                type hw
>                card $CARD
>                device 0
>        }
>        hooks.0 {
>                type ctl_elems
>                hook_args [
>                        {
>                                name "EMU10K1 PCM Send Volume"
>                                index { @func private_pcm_subdevice }
>                                lock true
>                                value [ 0 0 0 0 255 0 0 0 0 255 0 0 ]
>                        }
>                        {
>                                name "EMU10K1 PCM Send Routing"
>                                index { @func private_pcm_subdevice }
>                                lock true
>                                value [ 0 1 2 3 8 9 0 1 8 9 0 1 ]
>                        }
>	}
>}
>
>Note: Send Routing is fxbus setup
>
>						Jaroslav
>
>-----
>Jaroslav Kysela <perex@suse.cz>
>Linux Kernel Sound Maintainer
>ALSA Project, SuSE Labs
>
>
>
>-------------------------------------------------------
>This SF.NET email is sponsored by:
>SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
>http://www.vasoftware.com
>_______________________________________________
>Alsa-devel mailing list
>Alsa-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/alsa-devel
> 
********************************************************************** 
Dr.ir. Gerard J.M. Janssen
Delft University of Technology 
Faculty of Information Technology and Systems (ITS) 
Wireless Mobile Communications Group
P.O. Box 5031, 2600 GA Delft, The Netherlands 
Phone +31-15-2786736, Fax +31-15-2781774 
E-mail G.Janssen@ITS.TUDelft.NL 
**********************************************************************




-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: How to route "spdif" to an FXBUS of emu10k1
  2003-01-09  8:24   ` Gerard Janssen
@ 2003-01-09 12:00     ` Jaroslav Kysela
  0 siblings, 0 replies; 4+ messages in thread
From: Jaroslav Kysela @ 2003-01-09 12:00 UTC (permalink / raw)
  To: Gerard Janssen; +Cc: alsa-devel

On Thu, 9 Jan 2003, Gerard Janssen wrote:

> Hi Jaroslav,
> 
> Many thanks for your reply. This realy solved my problem.
> 
> I have been able to implement a new PCM-stream and send it to empty FXBUS
> registers. However, I could not find .asoundcr (I am using SUSE 8.1 with
> ALSA_rc6). Where is it? In stead, I adapted alsa.conf, emu10k1.conf and
> added a pcm_new.conf in /usr/share/alsa/ and this worked. 

It's not necessary. The ~/.asoundrc file is also loaded, so you can store 
your local configuration there.

> After having done this, I am stuck with some questions. Why are there no
> "Send Routing" lines in the "front" and "rear" config files, since they are
> routed to FXBUS? 
> Why do the lines:
> >        /* 22: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[0]),
> GPR(gpr + 8), GPR_DBAC, C_ffffffff);
> >        /* 23: */ OP(icode, &ptr, iMACINT1, ETRAM_ADDR(ipcm->etram[1]),
> GPR(gpr + 9), GPR_DBAC, C_ffffffff);
> have to be removed?

I've a bit overlooked the code. The simplest way is to initialize GPR(8) 
and GPR(9) after the direct PCM part over ETRAM, so the 22: and 23: lines 
can be replaced with

        OP(icode, &ptr, iMACINT0, GPR(8), C_00000000, FXBUS(8), C_00000004);
        OP(icode, &ptr, iMACINT0, GPR(9), C_00000000, FXBUS(9), C_00000004);

						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SuSE Labs



-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-01-09 12:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-08 11:47 How to route "spdif" to an FXBUS of emu10k1 Gerard Janssen
2003-01-08 15:30 ` Jaroslav Kysela
     [not found] ` <Pine.LNX.4.33.0301081618500.2215-100000@pnote.perex-int.cz >
2003-01-09  8:24   ` Gerard Janssen
2003-01-09 12:00     ` Jaroslav Kysela

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.