Conseil d'achat carte son

C'est la rubrique connectique !

Conseil d'achat carte son

Messagepar Rascal74 » 07 Oct 2011 12:51

Bonjour,

Actuellement, j'ai relié la sortie spdif optique de ma télé Samsung LE32C530 à mon ordinateur qui est équipé d'une carte son à base de chipset CMI8768 et d'un kit d'enceintes 5.1.
Le problème c'est que cette carte son n'accepte pas le dolby digital 5.1, le son passe donc uniquement en stéréo.
Si je sélectionne le dolby digital dans les parametres de ma télé, je n'obtient tout simplement aucun son !
Hors, j'aimerai bien pouvoir profiter du dolby digital avec la TNT, et surtout je n'ai pas les moyens de me payer un vrai système home cinéma.

Je recherche donc une carte son qui prend en charge le dolby digital 5.1 via l'entrée spdif optique, et si possible bon marché.
Je ne joue pas avec mon ordinateur, donc je n'ai pas besoin d'une carte son destinée aux joueurs.
Enfin je suis sous Linux Ubuntu, mais j'ai aussi Seven sur le même PC, donc disons que ce n'est qu'un détail sans importance... :roll:

Merci d'avance pour vos précieux conseils !
Chamonix Mont-Blanc, Aiguille du Midi + les Moussoux (Chamonix 2)
Akira DHB-B36HR, Freebox V5, Samsung LE32C530
Avatar de l’utilisateur
Rascal74
Coccinelle
Coccinelle
 
Messages: 52
Inscription: 16 Sep 2011 19:25

Re: Conseil d'achat carte son

Messagepar vidéo-33 » 07 Oct 2011 13:17

dans le PC as tu les bon codecs pour décoder le 5+1 en AC3+ ?

attention : au niveau du TV très peu de programmes sont diffusés en 5+1
( de temps en temps quelques rares films en prime time sur certaines chaines )
*** Modérateur forum TVNT ***
Avatar de l’utilisateur
vidéo-33
Les retraités de la Brigade
Les retraités de la Brigade
 
Messages: 22765
Inscription: 13 Avr 2006 15:12
Localisation: Bordeaux Team Modérateur /Forum depuis Janv. 2005

Re: Conseil d'achat carte son

Messagepar Rascal74 » 07 Oct 2011 13:36

Cher vidéo-33, je me demande bien pourquoi tu me parle de codecs...
Une entrée son n'a absolument pas besoin de codecs. Les codecs ca sert pour la lecture de Divx, de DVD, ou pour décoder du DVB, genre TNT ou satellite, par exemple.
Une entrée son est soit gérée directement par la carte son au niveau matériel, soit gérée par le pilote de la carte son. En clair, même sans codecs, ca fonctionne !
S'il suffisait d'installer des codecs, je n'aurai même pas eu besoin de conseil, je me serai débrouillé tout seul comme un grand.
Merci quand même d'avoir essayé de m'aider...
Chamonix Mont-Blanc, Aiguille du Midi + les Moussoux (Chamonix 2)
Akira DHB-B36HR, Freebox V5, Samsung LE32C530
Avatar de l’utilisateur
Rascal74
Coccinelle
Coccinelle
 
Messages: 52
Inscription: 16 Sep 2011 19:25

Re: Conseil d'achat carte son

Messagepar vidéo-33 » 07 Oct 2011 13:53

How SPDIF output works.

How sound cards handle SPDIF

General info about SPDIF

Initially SPDIF was used only to transmit stereo PCM data in one direction from one device to another (for example from a CD player to a receiver). It is very straightforward: audio samples are transmitted at constant frequency, one-by-one (and bit-by-bit) in 32-bit blocks where 8 bits are used for synchronization and some side info and 24 bits are used for sample. In most cases, only 16-bit transmission is supported and low 8 bits of a sample are always zeroed.

Obviously, it is very limited (constant bitrate, no synchronization supported, etc). On other hand, it is very simple and cheap and so it became widespread.

Therefore, when multi-channel sound era came to home theaters, SPDIF was ideal candidate for digital interface to transmit multi-channel sound. However, it is a problem: current interface implementations work only with stereo 16-bit PCM but now it is required to transmit up to 6 channels (or 8 channels at present). It was decided not to change the interface but to transmit compressed multi-channel data instead of PCM (for digital interface it does not matter what to transmit). So receiver must recognize compressed data and decode it. For this purpose a new standard was introduced (IEC 61937) that describes how compressed data must be transmitted and how receivers can distinguish PCM and compressed data.

Because compressed data is transmitted in place of PCM data, the bitrate of compressed data must be exactly the same as uncompressed stereo 16-bit PCM bitrate. Most of compressed streams (even multi-channel) have lower bitrate. Because of this compressed stream must be padded with zeros to match PCM bitrate. But some DTS streams may have bitrate higher than PCM bitrate. It is impossible to transmit such streams over SPDIF.

So SPDIF interface has 2 modes: PCM data transmission and compressed data transmission. Unless noted we well use “SPDIF transmission”, “SPDIF output mode” and “SPDIF stream” terms only for encoded streams afterwards.

What is multi-channel AudioCD

Compressed data may be transmitted over SPDIF instead of PCM data. Therefore we can prepare an AudioCD and place compressed AC3 or DTS data instead of usual PCM data. When we playback this disk with a CD player connected to a receiver we'll get true multi-channel sound!

But this trick does not work with analog connection and portable CD players: we'll get terribly loud noise instead of nice music. Because of this AudioCDs with AC3/DTS tracks are rare.

What is 14bit DTS

As was said before, SPDIF data is transmitted instead of PCM data. Therefore, it may be mistakenly played back as PCM format and make harsh noise. To make this noise less unpleasant DTS stream may be converted from 16bit to 14bit format that reduces the loudness of the noise. This conversion is lossless and does not affect the quality of the sound.

14bit DTS format is usually used at multi-channel AudioCD with DTS track (AC3 format does not allow conversion). Therefore, when usual CD player plays it back it makes less noise.

DTS over SPDIF

There are two ways to transmit DTS stream over SPDIF:
* Wrapped - DTS stream is wrapped according to IEC 61937 standard. Each DTS frame is supplemented with SPDIF header and padded with zeros to match SPDIF bitrate.
* Padded - DTS stream is only padded with zeros to match SPDIF bitrate.

Note, that it may be impossible to convert padded DTS stream to wrapped one because excessive SPDIF header may break SPDIF bitrate restriction. Wrapped to padded stream conversion is always possible.

Multi-channel AudioCD usually use padded DTS stream type. Therefore, it may be impossible to decode it with a decoder that only supports wrapped stream type.

How sound cards transmit PCM over SPDIF

When some application starts a multi-channel PCM playback, sound card allows this. However, because of SPDIF interface can carry only two channels, sound card always downmixes multi-channel PCM data to stereo. PCM data transmitted over SPDIF is always stereo!

Some sound cards have several SPDIF outputs that can transmit multi-channel data (3 SPDIF outputs can transmit 6 channels). But most receivers do not support this function (even receivers with several SPDIF inputs). Therefore we will not consider this case afterwards.

SPDIF sample rates

SPDIF interface supports 3 standard sample rates: 48kHz, 44.1kHz and 32kHz. All other sample rates are impossible to transmit. Nevertheless, most audio cards support only 48kHz output. Therefore widely used 44.1kHz audio on such sound card cannot be SPDIF’ed.

SPDIF transmission monopoly

Sound cards allow playback of many audio streams at the same time (either by hardware or at driver level). How it works? All PCM audio streams from all applications are mixed, streams with different sample rates are resampled and result is sent to one physical output. Therefore, Windows works like it can playback any sound at any time. But SPDIF transmission requires playback monopoly because SPDIF stream is encoded and it cannot be resampled and mixed with other streams. Therefore, only one SPDIF transmission at a time is possible. Also all PCM output must be muted during this transmission.

When some application starts SPDIF transmission sound card must do following:
1) mute all PCM sounds
2) open exclusive SPDIF output channel
3) start transmission
4) prohibit any other try to start SPDIF transmission

When SPDIF transmission stops sound card must do following:
1) stop SPDIF transmission
2) close SPDIF output channel
3) restore all other PCM output
4) allow applications to start a new SPDIF transmission

For example, imagine that you have Winamp playing some music in background. You start watching a movie with AC3 sound track in SPDIF passthrough mode. When you start a movie, sound card mutes Winamp’s music and gives exclusive playback right to the media player. Media player starts playback. After receiving of some data receiver recognizes compressed SPDIF transmission and changes indication from “PCM” to “Dolby Digital”. When you pause (not stop) the movie playback, sound card closes SPDIF transmission and restores music playback from Winamp. Receiver does not recognize any compressed transmission anymore and changes “Dolby Digital” back to “PCM”. But exclusive right on SPDIF playback still belongs to the media player because it did not actually close SPDIF playback but just pause it. So if you try to start another movie in SPDIF mode (without closing of the current one) filter will fail to start SPDIF transmission and will start PCM playback. When you stop the first movie playback, the media player actually closes SPDIF output and exclusive SPDIF right sets free so any other application can use it.

Bug with switching between PCM and SPDIF

So, sound card handles switching between PCM and SPDIF output mode. But not all sound cards can do this correctly. When you pause SPDIF playback sound card change SPDIF mode to PCM and may not restore SPDIF after playback resumes. In some cases, sound card may disable PCM mode without enabling SPDIF. In the last case sound disappears ALL TOGETHER!

How the filter handles SPDIF

SPDIF modes

SPDIF transmission is used only when “Use SPDIF” option is enabled. It will be implied afterwards.

It is 3 SPDIF output modes possible:
1) SPDIF passthrough mode. In this mode, compressed stream is sent to SPDIF without any change. It is impossible to process compressed stream without decompression. Therefore no other filter option can work in this mode (even filter cannot display input/output levels). We cannot even change the sound volume from the computer (only receiver’s volume control works).
2) SPDIF encode mode. In this case, input stream is decoded, processed and encoded to AC3 that is sent over SPDIF. Because we have decoded stream in this case, all processing options work. We can change number of channels, control gain, etc before sending the result to the receiver. This allows any stream (even not directly supported by receiver or SPDIF at all) to be sent to receiver over SPDIF.
3) Disabled. Filter does not do SPDIF transmission.

DTS over SPDIF passthrough

AC3Filter supports both DTS output modes (wrapped and padded). You may set desired mode with “SPDIF/DTS output” options. “Auto” directs the filter to use wrapped format if possible and padded otherwise.

It may be impossible to convert padded DTS stream to wrapped one. Therefore, if you set the filter to use wrapped format, it may not enable DTS passthrough for some audio tracks (DTS from multi-channel AudioCD for instance) and use AC3 encode mode instead.

To reduce the possible noise level you can set the filter to convert DTS to 14bit format with “Convert to 14bit option”. This conversion increases the bitrate of the stream and converted stream may not match SPDIF bitrate restriction. Therefore, the filter does this conversion only when possible.

Note, that receiver/decoder may not support some combinations of wrapped/padded 16bit/14bit stream types.

SPDIF mode decision

How filter decides what mode to use for given input? Let’s see internal data flow diagram:

Image

It is two SPDIF decision points:

1. SPDIF passthrough decision. At this point filter does following checks:
1.1. Is given format supported by receiver and allowed for passthrough? This is controlled by “SPDIF passthrough” options. Only checked formats are allowed.
1.2. Is given sample rate allowed for SPDIF output? This is controlled by “Restrict sample rates” option. If restriction is enabled, filter allows only checked sample rates. (See below for details)
1.3. Does sound card support given SPDIF format? This check is done only when “Check output format support” option is enabled. It is not recommended to disable this check! (See below for details)
If all checks passed, filter enables SPDIF passthrough mode.

2. SPDIF encode decision. At this point filter does following checks:
2.1. Is encode allowed? This is controlled by “Use AC3 encoder” option.
2.2. Do we need to encode this stream? It is an option “Do not encode stereo PCM” to inhibit encoding of stereo PCM (See below for details)
2.3. Can current stream be encoded? Not all channel configurations and sample rates are allowed for AC3.
2.4. Is given sample rate allowed for SPDIF output?
2.5. Does sound card support given SPDIF format?
If all checks passed, filter enables SPDIF encode mode.

SPDIF output support

When filter tries to open SPDIF output it first asks: “Dear sound card, would you please playback SPDIF with X sample rate?”. If sound card can do it filter starts an SPDIF transmission. If sound card refuses filter disables SPDIF output.

The reason for this dialogue to fail may be:
1) Sound card does not support SPDIF output at all
2) Driver does not support SPDIF output (USB sound cards)
3) Driver does not support dynamical format change to/from SPDIF (SB Live 24bit)
4) Sample rate is not supported for SPDIF
5) Another process has open SPDIF transmission

Filter cannot get to know why sound card refuses SPDIF transmission. It can just to establish a fact. You can disable this dialogue with ‘Check output format support’ option on System page. But in most cases you’ll just get no sound at all instead of correct PCM output (that is better than nothing). So it is strongly not recommended to disable this option.

SPDIF-as-PCM trick

Sound card tricking may solve problems number 2 and 3. Because of PCM nature of SPDIF transmission we can trick the sound card and say that we want to transmit PCM data, but send compressed stream instead. This is controlled by “Output SPDIF as PCM” option.

However, this trick works only when sound card does not alter our data and transmit it bit-by-bit directly to SPDIF output:
1) Volume settings in both sound card mixer and player must be at maximum level. Otherwise sound card applies gain to our compressed stream and breaks it.
2) It must be no other sound playing. Otherwise sound card will mix PCM and compressed data what leads to destruction of compressed data structure. Therefore, you must disable any background music. Any sound during movie playback (like ICQ notification, or something other) will temporarily break normal playback and produce loud noise.
3) Sound card must truly support the given sample rate. Many sound cards support only 48kHz and do sample rate conversion for other sample rates. Sample rate conversion like any other manipulation breaks compressed stream.

Filter cannot control first two conditions so you must set volume and disable all background sounds manually. But filter may verify sample rate and prohibit SPDIF transmissions with incorrect sample rates (thus protecting you from the loud noise caused of broken compressed stream and eliminating the need to enable/disable SPDIF each time for movies with different sample rates).

Warning! This option may force the filter to produce LOUD noise if used incorrectly!

SPDIF sample rate check

SPDIF sample rate check is controlled by “Restrict sample rates” option. If this option is enabled, SPDIF transmission will be enabled only for streams with allowed sample rates. Generally, this option is required when SPDIF-as-PCM trick is used.

Suppose that we have sound card that supports only 48kHz. With SPDIF-as-PCM trick, we transmit compressed data in PCM output mode. Sound card agrees to playback any sample rate but does sample rate conversion for “incorrect” sample rates. Therefore, movies with 48kHz audio track will be played correctly and 44.1kHz will produce terrible noise. To eliminate this we must enable SPDIF transmission only for “good” sample rates and use plain PCM output for any other sample rate.

This option is useful anyway. Without SPDIF-as-PCM trick, it forces the filter to report about disallowed sample rate instead of simply stating that sound card cannot do SPDIF transmission.

Why not to encode stereo PCM

When encoding to AC3 loss of quality occurs (it is an axiom for any lossy encoding format like mp3, ac3, ogg, aac and others). It is the only way to transmit 6 channels over SPDIF with reasonable low distortions. But if we have stereo track why we need to encode it and loose quality? As was said before SPDIF interface was initially used to transmit stereo PCM data. Therefore, when we have stereo PCM it is better not to encode it to AC3 but transmit it 'as is' without any quality loss.

Stereo encoding is controlled by “Do not encode stereo PCM” option. When this option is enabled, stereo output will not be encoded. Note that SPDIF status will be set to ‘Disabled’ even in case when SPDIF is enabled and allowed. Sometimes it may be dubious why. Nevertheless, it is recommended not to disable this option.

This option affects only stereo output. Multi-channel output will be encoded anyway (unless “Use AC3 encoder” option is disabled).

SPDIF status reporting

At the “Decoder info” box filter displays processing information. If “Use SPDIF” checkbox is enabled current SPDIF status with all SPDIF options is also shown there. Example:

Code:

Input format: DTS - 44100
User format: PCM16 - 0
Output format: PCM16 3/2.1 (5.1) 44100

Use SPDIF
SPDIF status: Disabled (Disallowed sample rate)
SPDIF passthrough for: AC3 DTS
Use AC3 encoder (do not encode stereo PCM)
Check SPDIF sample rate (allow: 48kHz)
Query for SPDIF output support



This means that we have 44.1kHz DTS track at input. Current output format is PCM 5.1 (6 channels) 44.1kHz. 'Use SPDIF' is enabled but transmission was not set because sample rate is incorrect for SPDIF transmission. Below we can see that sample rate check is enabled and 48kHz is the only allowed sample rate.

Let’s summarize reasons why SPDIF transmission may not be possible:
* Do not encode stereo PCM - We have stereo output and “Do not encode stereo PCM” option is enabled.
* Disallowed sample rate - “Restrict SPDIF sample rate” option is enabled and sample rate of the current track is not allowed.
* SPDIF output is not supported - Sound card refused to open SPDIF output channel. See SPDIF output support for more info.
* AC3 encoder disabled - SPDIF passthrough is forbidden and “Use AC3 encoder” option is disabled.

SPDIF pause bug

As was said before some sound cards have a bug with pausing of SPDIF playback. After pause sound card switches to PCM output mode and does not restore SPDIF playback afterwards. In this case, sound card requires complete reinit (i.e. we need to close current audio playback and open it back again) after each pause/seek command. It is controlled by “Force SPDIF to reinit after seek/pause” option. Enable this option ONLY if your sound card has this bug because it breaks normal data flow in DirectShow.

Technical details
It is no direct support for sound card reinit neither in DirectShow nor in any media player. But solution exists. Filter changes output format to PCM and sends several null samples to downstream. So sound card has to close current SPDIF output channel, and open PCM output. After that filter changes output format back to SPDIF and continues transmission from the point it was stopped. Sound card has to open a new SPDIF output channel and starts playback normally.

Details for programmers
Problem occurs with IDirectSoundBuffer::Stop(). Following code switches sound card to PCM mode:

IDirectSoundBuffer8 *ds_buf;
// open, init, start playback...

ds_buf->Stop();
ds_buf->Play(0, 0, DSBPLAY_LOOPING);

It does not matter that Play() is called just after Stop() or after some time. Anyway after Stop() SPDIF transmission stops forever.


SPDIF and post-processing

Some players may use post-processing filters (equalizers, DRC, etc). Usually such filters do not support SPDIF because SPDIF stream cannot be processed at all.

Normally when 'Use SPDIF' option is enabled filter publish 2 output formats: SPDIF and PCM at the same time. It means that filter says: "I can do both PCM and SPDIF output, choose one that you can use, but know that SPDIF is preferred". If sound card that does not support SPDIF, it can choose PCM and work properly with using of AC3Filter. Also if movie contains sound track that cannot be SPDIF'ed on current sound card (for example 44100Hz track) AC3Filter will switch to PCM playback automatically.

Now let's consider a media player that does audio post-processing. If player see that AC3Filter can do PCM output it decides to do post-processing and inserts post-processing filter after AC3Filter. When playback starts AC3Filter asks next filter (that is post-processing filter): "Could you accept SPDIF stream"? Post-processing filter refuses and AC3Fitler starts PCM playback and reports that "SPDIF output is not supported".

The best way to force SPDIF to work in this case is to disable ALL audio post-processing options of your player (equalizers, DRC, etc) or use another player. Some filters installed with super-mega-codec-packs may be used automatically. In this case it's better to uninstall such filters.

But sometimes it's very hard to determine how to force the player not to use post-processing. SPDIF-as-PCM trick cannot force the problem because post-processing filter will certainly break the SPDIF stream. In this case it is possible for AC3Filter not to publish PCM format in SPDIF mode with 'Disallow PCM output in SPDIF mode' option. When this option is enabled filter says that it supports only SPDIF output. Player cannot use post-processing filter after AC3Filter (because post-processing will refuse to work with SPDIF stream) and will be forced to connect AC3Filter directly to sound card renderer filter.

Warning! Using 'Disallow PCM output in SPDIF mode' option may force the player to not use AC3Filter in some cases. If an audio track of a certain movie cannot be SPDIF'ed, the player will not use AC3Filter at all. You have to disable 'Use SPDIF' option to use AC3Filter with this film and enable it back again if you want to watch another movie in SPDIF mode.
*** Modérateur forum TVNT ***
Avatar de l’utilisateur
vidéo-33
Les retraités de la Brigade
Les retraités de la Brigade
 
Messages: 22765
Inscription: 13 Avr 2006 15:12
Localisation: Bordeaux Team Modérateur /Forum depuis Janv. 2005

Re: Conseil d'achat carte son

Messagepar Rascal74 » 07 Oct 2011 14:19

Tu as vraiment besoin de te justifier ?
Non seulement tu ne réponds pas à ma question, mais en plus tu copie-colle une explication de 10 kms, en anglais, et que tu ne semble pas avoir compris toi-même.
Soit tu me donne une explication claire et précise et en français, soit tu ferai mieux de ne rien dire...

Je vais aller poser la question sur hfr, j'aurai sûrement plus de chances d'obtenir une réponse adaptée à mes besoins.
Je rappelle juste que je demandais un conseil d'achat de carte son, au cas où quelqu'un qui s'y connait un peu en informatique passe par là...
Chamonix Mont-Blanc, Aiguille du Midi + les Moussoux (Chamonix 2)
Akira DHB-B36HR, Freebox V5, Samsung LE32C530
Avatar de l’utilisateur
Rascal74
Coccinelle
Coccinelle
 
Messages: 52
Inscription: 16 Sep 2011 19:25