[linux-dvb] API ioctls for Bypass and RAW Audio
Dr. Werner Fink
werner at suse.de
Mon Oct 24 12:50:51 CEST 2005
On Sun, Oct 23, 2005 at 12:52:18AM +0200, Oliver Endriss wrote:
> Dr. Werner Fink wrote:
> > How to extend the DVB API 3 for RAW Audio replay?
> > Do I need a new ioctl or should I extend
> > AUDIO_SELECT_SOURCE by something like AUDIO_SOURCE_MEMORY_RAW
> > or use the AUDIO_SET_STREAMTYPE and define a type
> > class AUDIO_CAP_RAW_XXX.
> Hm - nobody seems to care about raw audio output.
> Should we drop it for now?
> > > ... currently the first one is NOP in av7110.c and the second
> > > is not implemented. For the second I've found in audio.h of
> > > the API for the user space:
> > >
> > > typedef uint16_t audio_attributes_t;
> > > /* bits: descr. */
> > > /* 15-13 audio coding mode (0=ac3, 2=mpeg1, 3=mpeg2ext, 4=LPCM, 6=DTS, */
> > > /* 12 multichannel extension */
> > > /* 11-10 audio type (0=not spec, 1=language included) */
> > > /* 9- 8 audio application mode (0=not spec, 1=karaoke, 2=surround) */
> > > /* 7- 6 Quantization / DRC (mpeg audio: 1=DRC exists)(lpcm: 0=16bit, */
> > > /* 5- 4 Sample frequency fs (0=48kHz, 1=96kHz) */
> > > /* 2- 0 number of audio channels (n+1 channels) */
> > >
> > > it seems that for the bit field 5-4 the value 2 for 44.1kHz and
> > > the value 3 for 32kHz are missed.
> > >
> > > For what the ioctls AUDIO_SET_STREAMTYPE and AUDIO_SET_ATTRIBUTES
> > > should by used.
> The tuxbox people use AUDIO_SET_STREAMTYPE this way:
> void Decoder::SetStreamType(int type)
> uint val=0;
> switch ( type )
> case TYPE_ES:
> case TYPE_PES:
> case TYPE_MPEG1:
> if (fd.audio != -1 && ::ioctl(fd.audio, AUDIO_SET_STREAMTYPE, val)<0 )
> eDebug("AUDIO_SET_STREAMTYPE failed (%m)");
Guess: the type `TYPE_ES' (Elementary Stream) is identical to
what I've called `RAW' Audio. Also `TYPE_MPEG1' seems _not_
to be Mepg Audio within PES (Packetized Elementary Stream).
> The API is very vague about these ioctls.
> [Stream] type is an int but acceptable values are not defined anywhere.
> Maybe the API designers could comment on this.
AC3 loop through sound card http://bitstreamout.sourceforge.net/
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
More information about the linux-dvb