All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Courtier-Dutton <James@superbug.demon.co.uk>
To: alsa-devel@lists.sourceforge.net
Subject: Re: How to put 16bit none audio PCM data stream into a 32bit none audio S/P-DIF transport stream?
Date: Tue, 08 Apr 2003 22:28:22 +0100	[thread overview]
Message-ID: <3E933EF6.5030601@superbug.demon.co.uk> (raw)
In-Reply-To: <20030408205515.GB6940@ulima.unil.ch>

Gregoire Favre wrote:

>On Tue, Apr 08, 2003 at 11:39:31PM +0200, Benny Sjostrand wrote:
>
>  
>
>>Exaclty what do you mean with 32bit spdif ? Sorry, I feel a little bit 
>>newbie about
>>the SPDIF protocol specific details.
>>    
>>
>
>Well,
>
>I have just copied an expert, Dr. Werner Fink, as he spoke in the
>vdr@linuxtv.org mailing list about a problem with AC3overDVB:
>
>"As long as the hardware on the DVB cards are not able to put
>the 16bit none audio PCM data stream into a 32bit none audio
>S/P-DIF transport stream all receivers which uses the bit flags
>of the S/P-DIF transport stream for identifying none audio
>loose.  All S/P-DIF data get from the DVB card to not have the
>none audio bit set.  AFAIK this is a hardware bug (or better
>this is the information I've got from TT) ..."
>
>So I guessed if we are some for which the CS46xx driver don't work with
>our receivers with the same sympton (here from the readme of AC3overDVB:
>"If your receiver doesn't detect the encapsulated stream (at the
>beginning of replay in general) you will hear the digital data played as
>PCM data. It's a spiky noise. Don't turn up the volume too much, or the
>speakers may be damaged. You have been warned!").
>
>  
>
Maybe I can try to clarify things a bit.
SPDIF uses 32bits to carry info bits and the audio data. This 32bits is 
called a frame.
The audio data can be anything up to 24 bits, and then the rest are the 
info bits (Like Copy-Protect, Non-audio etc.) .
Most computer audio cards hold the info bits in a single register and 
automatically fill in each frame's info bits using the contents of the 
register.
This leaves the other audio data to be filled by the PCM stream.
Most audio cards only support 16 bits, and very few support 24 bits, and 
virtually none support access to all 32 bits.
So, "iec958:AES0=0x6,AES1=0x82,AES2=0x0,AES3=0x2" sets the info bits 
register, with the audio data coming from the PCM.
For AC3 non-audio spdif, it uses only 16 bits, so we have no problem.
The real problem with AC3 via SPDIF on computer sound cards is the 
sample rate.
A lot of audio cards can only do SPDIF non-audio data at 48khz.
Your sample is requesting 44.1khz which could be the problem.
I do not know if your audio card support 44.1khz non-audio spdif. My SB 
Live definitely does not. My SB Live can output standard PCM data at 
different SPDIF rates, but it does re-sampling in hardware. If I wish to 
bypass the re-sampling hardware (bypass needed otherwise the non-audio 
data gets mangled) in my SB Live I have to use 48khz.

A good source of 48 khz non-audio AC3 sound is playing DVDs.
I know xine handles SPDIF passthru of AC3 soundtracks on DVDs quite easily.
At least this will test if the problem is 48/44.1 khz or something else.

Cheers
James





-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/

  reply	other threads:[~2003-04-08 21:28 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-08 14:02 How to put 16bit none audio PCM data stream into a 32bit none audio S/P-DIF transport stream? Gregoire Favre
2003-04-08 14:28 ` Paul Davis
2003-04-08 15:50   ` Takashi Iwai
2003-04-08 16:42     ` Gregoire Favre
2003-04-08 20:30       ` James Courtier-Dutton
2003-04-08 20:44         ` Gregoire Favre
2003-04-09 10:34         ` James Courtier-Dutton
2003-04-09 11:06           ` Gregoire Favre
2003-04-09 16:50             ` James Courtier-Dutton
2003-04-09 17:58               ` Gregoire Favre
2003-04-10 17:43               ` James Courtier-Dutton
2003-04-08 21:39     ` Benny Sjostrand
2003-04-08 20:55       ` Gregoire Favre
2003-04-08 21:28         ` James Courtier-Dutton [this message]
2003-04-08 21:55           ` Gregoire Favre
2003-04-09  6:59           ` Benny Sjostrand
2003-04-09  8:28             ` Gregoire Favre
2003-04-09 11:09               ` Takashi Iwai
2003-04-09 11:43                 ` Gregoire Favre
2003-04-09 13:11                   ` Takashi Iwai
2003-04-09 17:58                     ` Gregoire Favre
2003-04-10 11:21                     ` James Courtier-Dutton
2003-04-10 11:26                       ` Gregoire Favre
2003-04-13 11:41                         ` Benny Sjostrand
2003-04-13 17:05                           ` Gregoire Favre
2003-04-13 18:21                             ` Benny Sjostrand
2003-04-13 18:30                               ` Gregoire Favre
2003-04-13 23:23                                 ` Benny Sjostrand
2003-04-14 19:06                                   ` Gregoire Favre
2003-04-14 22:20                                     ` Benny Sjostrand
2003-04-14 21:27                                       ` Gregoire Favre
2003-04-14 23:00                                         ` Benny Sjostrand
2003-04-14 22:14                                           ` Gregoire Favre
2003-04-09 21:17               ` Benny Sjostrand
2003-04-09 20:38                 ` Gregoire Favre
  -- strict thread matches above, loose matches on Subject: below --
2003-04-08 23:33 Peter Heatwole

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3E933EF6.5030601@superbug.demon.co.uk \
    --to=james@superbug.demon.co.uk \
    --cc=alsa-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.