From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerard Janssen Subject: Re: Re: [Alsa-user] How to select different S/PDIFoutput ports on a SBLive! Date: Fri, 20 Sep 2002 10:56:01 +0200 Sender: alsa-devel-admin@lists.sourceforge.net Message-ID: <4229AE35D6A@Octopus.et.tudelft.nl> References: <0H1P000C9NO5XV@mailhost1.tudelft.nl> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: In-Reply-To: Errors-To: alsa-devel-admin@lists.sourceforge.net List-Help: List-Post: List-Subscribe: , List-Unsubscribe: , List-Archive: To: Jaroslav Kysela Cc: "alsa-devel@lists.sourceforge.net" , "alsa-user@lists.sourceforge.net" List-Id: alsa-devel@alsa-project.org Hi Jaroslav, >> The SBLive! card can support four SPDIF output channels, indicated as >> SPDIF#0 - 3, which are located on the 12 pins or the 40 pins external >> connector (depending on the type of card). >> When I play a file to "spdif" or "iec958:AES0=0x42,AES1 = 0x82,AES2 = >> 0x02,AES3 = 0x02", the signal is send to the SPDIF#1 output. When I use >> "front" or "center_lfe", I can get music out of SPDIF#0-3 depending on the >> ALSA-mixer settings, however, the way the settings have to be chosen is not >> straight forward (trial and error). So apparently all SPDIF outputs are >> "available". >> >> I would like to select/address all four SPDIF outputs of the SBLive! card. >> Now I have the following questions: >> >> 1. How can the SPDIF output port be changed when using the "spdif" or >> "iec958" in the alsa player. I tried to change the channel value of AES2, >> but this had no effect at all. > >It's not possible. Actually, DSP code supports optical and coaxial digital >outs for LiveDrive, but I haven't information about physical connections >for them by hand. > >> 2. I tried to find the location where the SPDIF output port is set in the >> alsa code for the emu10k1. I also searched the emufx-code, since the spdif >> outputs come directly from the fx8010 processor, but I did not find it. >> Where is the SPDIF output port set? How can it be changed? > >Look for EXTIN_TOSLINK_L and EXTIN_COAX_SPDIF_L in emufx.c > >> B.t.w. I did find only three SPDIF channel status registers (SPCS0-2). Why >> are there only three SPCS's in stead of four? > >I think that the emu10k1 chip shomehow merges signals from two S/PDIF >inputs into one. I tried to find the spdif output port addresses by changing the register addresses of EXTOUT_TOSLINK_L/R in emu10k1.h to all 16 possible output address pairs between (00 - 1f). To do this, I removed the extout_mask check in emufx.c in the piece of code given below. I found the addresses of the four spdif output ports of the SBLive! card (I did/could not check this for the Audigity) and they are as follows: spdifo#0 = (0x02,0x03), which is the standard output, spdifo#1 = (0x04,0x05), spdifo#2 = (0x06,0x07) and spdifo#3 = (0x08,0x09). So in principle it seems to be possible to create 8 digital output channels on the SBLive!, however at the cost of some of its standard functionalities, namely the outputs of the center_lfe, headphone and rear channels to the LiveDrive (I think?). Now, I would like to implement three additional spdif outputs in the same way as the standard output, so without volume or tone control. I think, this is an interesting extension of the functionality of the SBLive, since by creating 8 independent digital outputs we get a functionality on a cheap soundcard which is now only available at expensive (professional) soundcards. The problem is that I am not a programmer, however, I would like to give it a try where any help from the ALSA community is very much appreciated. I have the following questions: 1. Is the code related to the standard spdif output in emufx.c, limited to the following code lines or is there other code involved? if (emu->fx8010.extout_mask & ((1<