Debian Codegraph @

doc/a52.txt

raw
1 A52 OUTPUT PLUGIN
2 =================
3
4 This plugin converts S16(P), S32P, or FLTP formats to an A52 compressed
5 stream and sends it to an S/PDIF output. It requires libavcodec for
6 encoding the audio stream.
7
8 The input format is determined by the version of libavcodec it is
9 compiled against and which ac3 codec libavcodec is configured to use.
10
11 A global configuration, /usr/share/alsa/alsa.conf.d/60-a52-encoder.conf
12 defines a52 PCMs for devices with the IEC958 non-audio status bit set.
13
14 A PCM using this plugin can be manually defined like below:
15
16 pcm.myout {
17 type a52
18 }
19
20 In addition, the following options are available:
21
22 - The "card" option specifies the card ID or number of the SPDIF.
23 The output PCM becomes "iec958:{CARD=$CARD}" with extra AESx
24 settings. When omitted, the default card is used.
25
26 - The "slavepcm" option specifies a string of the slave PCM
27 explicitly. This is useful if a device has no proper SPDIF
28 configuration (e.g. usb-audio), or if you want to pass your own PCM
29 definition. This option is exclusive with "card" option.
30
31 - The "rate" option specifies the input/output sample rate in HZ.
32 The accepted rate is either 44100 or 48000.
33 When omitted, 48000 is used.
34
35 - The "channels" option specifies the number of _input_ channels.
36 It must be either 2, 4 or 6. The default value is 6.
37
38 - The "bitrate" option specifies the bit-rate of the compressed
39 stream in kbps. Too small or too big value may not be accepted by
40 the encoder. When omitted, 448 is used.
41
42 - The "format" option specifies the output format type. It's either
43 S16_LE or S16_BE. As default, S16_LE is used.
44
45 An example using the secondary card, 44.1kHz, 4 channels, output
46 bitrate 256kbps and output format S16_BE looks like below:
47
48 pcm.myout {
49 type a52
50 card 1
51 rate 44100
52 channels 4
53 bitrate 256
54 format S16_BE
55 }
56
57 For using slavepcm option,
58
59 pcm.mypcm {
60 card 1
61 device 2
62 }
63
64 pcm.myout {
65 type a52
66 slavepcm "mypcm"
67 }
68
69
70 The plugin only reads the format determined by libavcodec (native-
71 endian S16(P), S32P or FLTP) as input, so you'll need a plug layer to
72 appropriately convert it.