Skip to contentSkip to conversation

More CS4630 improvements, finally multi PCM channel support

DISCUSSION Benny Sjostrand 2 participants 3 messages Jul 31, 2002 – Aug 1, 2002

lore
Share & tools
lore
#0 lore raw

Hi!

I've implemented multi PCM channel support for cs46xx based soundcards, the PCM multichannel should work on any soundcard
with a cs4630 DSP. It should be possible to play 31 simultaneous PCM playbacks at 6 diferents sample rates. 1 slot is always reserved for capture, therefor 31. Each time the DSP needs to instanciate a SRC (Sample Rate Converter) task it costs memory and MIPS in the DSP therefor there only reserved place for 6 simultaneous SRC. PCM channels with the same sample rate shared the same SRC. The part of the driver that resource handles the PCM channel and SRC instances on DSP is complex, so there many drastic changes in cs46xx_lib.c, hopefully nothing that worked before is broken.
NOTE: i've not tested 31 simultaneous playback yet, only 6 for the moment (in theory all 31 should work)

That's it, ending up here, the aditional feutures should be:
- PCM multichannel.
- Secondary CODEC, ALSA mixer, front && rear output (same output from rear && front).
- SPDIF output. (i believe that i need some more help from Cirrus and maybe Hercules and other card manufacturers to get SPDIF input working)

And this is like my "pre-proposal" to a patch for the ALSA project. For the moment i'm not planning to try implement any other feutures before getting this parts "stable enough", but we will see, things change quickly -:)

Downloads:
http://www.cucumelo.org/~gorm/alsa-driver-0.9.0rc2-bs20020731.diff.gz
http://www.cucumelo.org/~gorm/alsa-driver-0.9.0rc2-bs20020731.tar.gz

/Benny

-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

#1 lore raw
Quoted 3 lines · On 2002.07.31 15:11 Benny Sjostrand wrote:

Hi!

I've implemented multi PCM channel support for cs46xx based soundcards, the PCM multichannel should work on any soundcard

The surprises just don't stop coming!

[...]

Quoted 6 lines

That's it, ending up here, the aditional feutures should be:
- PCM multichannel.
- Secondary CODEC, ALSA mixer, front && rear output (same output from rear && front).
- SPDIF output. (i believe that i need some more help from Cirrus and maybe Hercules and other card manufacturers to get SPDIF input working)

Currently, SPDIF and rear-out is not functional on the Santa Cruz. But
multichannel PCM works great!
I'm waiting for Turtle Beach to respond to a request for Santa Cruz
documentation. If this fails, I will try to contact Videologic for some docs on the Sonic Fury, the same card with a different name. Hopefully they will provide some information that will help getting SPDIF and rear-out working.

Thanks Benny,

-- Peter Heatwole
"Murphy was just a well known pessimist."

-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31

#2 lore raw
In reply to Benny Sjostrand

Hi Again!

It did not take long time before i found "yet another bug" in my code, related to the PCM multichannel stuff. If you are playing various PCM channels and repently got a pure sinus signal instead (of whatever you was playing). No pain, no gain, ...
Anyone that have downloaded my yesterday snapshot better apply this patch:

dsp_spos_scb_lib.c Thu Aug 1 07:25:14 2002 renamed from home/pub/src/alsa-driver-0.9.0rc2-bs20020731/alsa-kernel/pci/cs46xx/dsp_spos_scb_lib.c Wed Jul 31 23:19:19 2002 +6 -0
@@ -148,6 +148,12 @@
       spin_lock_irqsave(&chip->reg_lock, flags);   
    /* update entry in DSP RAM */
    snd_cs46xx_poke(chip,
+                    (scb->address + SCBsubListPtr) << 2,
+                    (scb->sub_list_ptr->address << 0x10) |
+                    (scb->next_scb_ptr->address));
+
+    /* update parent entry in DSP RAM */
+    snd_cs46xx_poke(chip,
                    (scb->parent_scb_ptr->address + SCBsubListPtr) << 2,
                    (scb->parent_scb_ptr->sub_list_ptr->address << 0x10) |
                    (scb->parent_scb_ptr->next_scb_ptr->address));

-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf