PDA

View Full Version : Suono 2.1 con ALSA e Creative SoundBlaster X-Fi Titanium


Garrett
04-08-2011, 15:38
Buon pomeriggio a tutti,

ho il seguente problema che sicuramente per chi ha un po' più di esperienza, con il file di configurazione .asoundrc di ALSA, dovrebbe essere una cosa abbastanza semplice.

Premesso che il suono stereo 2.0 funziona bene e che utilizzo opensuse 11.4 con kde 4.7 phonon disattivato in favore di ALSA.

Ho cercato sulla documentazione ufficiale e non, che ho trovato scritta male e confusa purtroppo, ma non ho capito come configurare i segnali in modo da prendere il frontale, e inviarlo a "Center/LFE" con il filtro low cut a 80 Hz).

Ecco l'output di questo comando che riassume la situazione di quello che vedo nella schermata di kde dove si possono testare le varie uscite con il tasto prova

fabio@fabio-suselinux:~> aplay -L
null
Discard all samples (playback) or generate zero samples (capture)
front:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
Front speakers
rear:CARD=XFi,DEV=0
Creative X-Fi, Surround
Rear speakers
center_lfe:CARD=XFi,DEV=0
Creative X-Fi, Center/LFE
Center and Subwoofer speakers
side:CARD=XFi,DEV=0
Creative X-Fi, Side
Side speakers
surround40:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
4.0 Surround output to Front and Rear speakers
surround41:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=XFi,DEV=0
Creative X-Fi, Front/WaveIn
7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
iec958:CARD=XFi,DEV=0
Creative X-Fi, IEC958 Non-audio
IEC958 (S/PDIF) Digital Audio Output


Se eseguo la demo sul canale Center/LFE sento la gamma completa sul sub che ovviamente sta solo a dimostrare che il collegamento e l'uscita funziona ma è da gestire con una configurazione ad hoc.

Grazie per l'aiuto


PS:
Non ho capito se centra qualcosa o se semplicemente dipende dal tipo di scheda audio ma sempre nella finestra dove posso testare l'audio pare che gli "indirizzi hardware" delle varie uscite siano:


hw:0,0 (Front/WaveIn)
hw:0,1 (Surround)
hw:0,2 (Center/LFE)
hw:0,3 (Side)
hw:0,4 (IEC958 Non-audio)


Spero serva a qualcosa perchè non ho capito se cetra con il fatto che nei vari file .asoundrc sianos empre mappati invece in questo modo:


0 front left
1 front right,
2 rear left
3 rear right
4 center
5 lfe/subwoofer
6 side left
7 side right



--------------------------------------------------------------------------------------------------------------------------------
RISOLTO

http://frashtips.blogspot.com/2010/04/analogue-51-sound-for-soundblaster-x-fi.html

Analogue 5.1 Sound for Soundblaster X-Fi with upmix and lowpass
What is this all about the X-Fi support under Linux? Is there any? Can you get it to work?

First, the positiv answer: Yes you can ;-)
Now the negative one: The sound and possibilities are far away of what they could be.


So to the guys of you, witch have ever tried to connect their analogue 5.1 sound system to their X-Fi and then tried to play a common stereo mp3 file under Linux ... they will recognize that there is whether bass nor a 2.0 to 5.1 up-mix function.


The reason for this is, because the ALSA developers haven't any specification of any hardware DSP functionality of the Soundblaster X-Fi. That's why all these nice features, hardware acceleration and other gimmicks of the sound-card, which work so nice under Windows, are not available under Linux.


All what the current ALSA driver provides are 4 independent analogue stereo channels so you can have up to a 7.1 sound, but only if your sound-source completely matches you connected sound-system.


A very common scenario is, like mine, that there is a 5.1 sound-system connected and you want play a stereo mp3 file. Then the following happens.


Again, if you play your stereo file, the sound signals will be routed to the first stereo connector and because of your stupid connected sound-system, the stereo sound is exactly coming out, where it was routed to: your two satellite speakers.


So, sounds good, where is the problem now?


Well, there are two ;-)
You will hear no bass, because your sub-woofer never get a sound-signal.
Their is no sound of any other sound-speaker, isn't it possible to up-mix your stereo channel to the 5.1 sound-system?
Happily, there is a solution: asound.conf


It's the configuration file of fancy piece of software, belong to the ALSA sound-system. It replaces all the functionality of a hardware mixer and much more.

After a long journey through the web, I found out, the it seems, like nobody configured with it a Soundblaster X-Fi for up-mixing and low-pass-filtering to solve my problems.

First of all, make sure, that your Soundblaster X-Fi is your first soundcard. To do this, edit your modprobe.conf and add a line:

options snd-ctxfi index=0

Second, edit or create a file: asound.conf in your /etc folder with the following content:


# Virtual 5.1 device (softvol):
# for volume control
pcm.softvol {
type softvol
slave.pcm "six"
control {
name "UpMix51"
card 0
}
}

# software device with 6 channels
pcm.six {
type route
slave.pcm "multi"
ttable.0.0 1
ttable.1.1 1
ttable.2.2 1
ttable.3.3 1
ttable.4.4 1
ttable.5.5 1
}


# customize this, if your xfi hast not the index=0
# Splitting the channels into six different devices:
pcm.multi {
type multi
slaves {
a.pcm "hw:0,0"
a.channels 2

b.pcm "hw:0,1"
b.channels 2

c.pcm "hw:0,2"
c.channels 2
}
bindings {
0.slave a
0.channel 0
1.slave a
1.channel 1
2.slave b
2.channel 0
3.slave b
3.channel 1
4.slave c
4.channel 0
5.slave c
5.channel 1
}
}

# Low/Highpass for channel speration
# controls[ x ] specifies the crossover frequency x for the subwoofer.
# 80-120 for most common systems

pcm.lowpass_21to21 {
type ladspa
slave.pcm upmix_21to51
path "/usr/lib/ladspa"
channels 3
plugins {
0 {
id 1098 # Identity (Audio) (1098/identity_audio)
policy duplicate
input.bindings.0 "Input";
output.bindings.0 "Output";
}

1 {
id 1052 # High-pass filter

policy none
input.bindings.0 "Input";
output.bindings.0 "Output";
input {
controls [ 120 ]
}
}

2 {
id 1052 # High-pass filter

policy none
input.bindings.1 "Input";
output.bindings.1 "Output";
input {
controls [ 120 ]
}
}

3 {
id 1051 # Low-pass filter

policy none
input.bindings.2 "Input";
output.bindings.2 "Output";
input {
controls [ 120 ]
}
}

}
}

# upmix 2.0 to 5.1
pcm.upmix_20to51 {
type plug
slave.pcm "lowpass_21to21"
slave.channels 3
ttable {
0.0 1 # left channel
1.1 1 # right channel
0.2 0.5 # mix left and right ...
1.2 0.5 # channel for subwoofer
}
}

#upmix 2.1 to 5.1
pcm.upmix_21to51 {
type plug
#For use without software volume control
slave.pcm softvol
slave.channels 6
ttable {
0.0 1 # front left
1.1 1 # front right
0.2 1 # rear left
1.3 1 # rear right

# Front left/right to center.
0.4 0.5
1.4 0.5

# Power of the subwoofer, normally 1 (or if you like, more)

2.5 1
}
}

# Overwrite your default devices

pcm.!default {
type asym
playback.pcm "upmix_20to51"
}

pcm.!surround51 {
type plug
slave.pcm "softvol"
}




Restart your Linux ( or reload your sound-modules and your ALSA sound-system). Get your volumes up and be happy!

If you have questions, i will write a further blog with more configuration details.

Greetings






Con questo sistema ho risolto e anche se non ho il 5.1 per chi lo vuole è valido tanto come per il 2.1 perché in realtà è uno stereo 5.1
OTTIMO