Re: [Alsa-user] S32_LE format
John Sigler wrote: format : S32_LE msbits : 24 ... The first sample is stored as 00 00 a5 f5. Does this represent the value 0xf5a5? Yes. For the majority of samples, the first two bytes are 00 00. Is this because the input stream was, in fact, a 16-bit stream? Apparently. For the rest of the samples, the first two byte are 08 00. Why don't all the samples start with 00 00? Does this sequence 08 00 have a special meaning? Since only the upper 24 bits are used for sample values, the lowest eight bits are undefined. The sound card can set them to any value, although most chips do set them to zero. I don't know why the HDSP sets this bit in about half of the samples, it may be some form of dithering. Regards, Clemens - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] S32_LE format
John Sigler wrote: I experimented with the following command: $ arecord -vv -M -r 48000 -f S32_LE -t raw -d 60 -D hw /tmp/out which gave the following output: Recording raw data '/tmp/out' : Signed 32 bit Little Endian, Rate 48000 Hz, Mono Hardware PCM card 0 'HDSPM MADI' device 0 subdevice 0 Its setup is: stream : CAPTURE access : MMAP_NONINTERLEAVED format : S32_LE subformat: STD channels : 1 rate : 48000 exact rate : 48000 (48000/1) msbits : 24 buffer_size : 8192 period_size : 4096 period_time : 85333 tstamp_mode : NONE period_step : 1 avail_min: 4096 start_threshold : 1 stop_threshold : 8192 silence_threshold: 0 silence_size : 0 boundary : 1073741824 AFAIU, S32_LE means that each sample is a 32-bit signed quantity stored least-significant byte first, right? e.g. -2 (0xfffe) is stored as fe ff ff ff and 1 is stored as 01 00 00 00 right? The dump of the beginning /tmp/out follows: 00 00 a5 f5 08 00 43 f6 08 00 bc f6 00 00 20 f7 0010 08 00 9a f7 00 00 3e f8 00 00 11 f9 08 00 f2 f9 0020 00 00 a9 fa 08 00 42 fb 08 00 e7 fb 08 00 6b fc 0030 08 00 ae fc 00 00 f6 fc 00 00 75 fd 08 00 f3 fd 0040 00 00 31 fe 08 00 41 fe 00 00 62 fe 00 00 b5 fe 0050 00 00 30 ff 08 00 c2 ff 00 00 47 00 08 00 80 00 0060 00 00 65 00 00 00 47 00 00 00 63 00 08 00 ab 00 0070 00 00 f9 00 08 00 0c 01 08 00 c4 00 00 00 60 00 0080 08 00 1a 00 00 00 c3 ff 00 00 2d ff 08 00 7e fe 0090 00 00 d5 fd 00 00 2f fd 00 00 95 fc 00 00 03 fc 00a0 08 00 66 fb 00 00 d7 fa 08 00 6b fa 08 00 01 fa 00b0 08 00 91 f9 00 00 41 f9 00 00 e9 f8 08 00 4e f8 00c0 00 00 c4 f7 00 00 89 f7 00 00 2a f7 08 00 43 f6 00d0 08 00 f9 f4 00 00 81 f3 08 00 0f f2 08 00 ce f0 00e0 08 00 81 ef 08 00 08 ee 08 00 b2 ec 00 00 7e eb 00f0 08 00 27 ea 00 00 d4 e8 00 00 bd e7 00 00 b6 e6 The first sample is stored as 00 00 a5 f5. Does this represent the value 0xf5a5? For the majority of samples, the first two bytes are 00 00. Is this because the input stream was, in fact, a 16-bit stream? For the rest of the samples, the first two byte are 08 00. Why don't all the samples start with 00 00? Does this sequence 08 00 have a special meaning? Would anyone care to venture a guess? Regards. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user
Re: [Alsa-user] S32_LE format
On Thu, 13 Mar 2008 17:12:47 +0100 John Sigler [EMAIL PROTECTED] wrote: John Sigler wrote: I experimented with the following command: $ arecord -vv -M -r 48000 -f S32_LE -t raw -d 60 -D hw /tmp/out which gave the following output: Recording raw data '/tmp/out' : Signed 32 bit Little Endian, Rate 48000 Hz, Mono Hardware PCM card 0 'HDSPM MADI' device 0 subdevice 0 Its setup is: stream : CAPTURE access : MMAP_NONINTERLEAVED format : S32_LE subformat: STD channels : 1 rate : 48000 exact rate : 48000 (48000/1) msbits : 24 buffer_size : 8192 period_size : 4096 period_time : 85333 tstamp_mode : NONE period_step : 1 avail_min: 4096 start_threshold : 1 stop_threshold : 8192 silence_threshold: 0 silence_size : 0 boundary : 1073741824 AFAIU, S32_LE means that each sample is a 32-bit signed quantity stored least-significant byte first, right? e.g. -2 (0xfffe) is stored as fe ff ff ff and 1 is stored as 01 00 00 00 right? The dump of the beginning /tmp/out follows: 00 00 a5 f5 08 00 43 f6 08 00 bc f6 00 00 20 f7 0010 08 00 9a f7 00 00 3e f8 00 00 11 f9 08 00 f2 f9 0020 00 00 a9 fa 08 00 42 fb 08 00 e7 fb 08 00 6b fc 0030 08 00 ae fc 00 00 f6 fc 00 00 75 fd 08 00 f3 fd 0040 00 00 31 fe 08 00 41 fe 00 00 62 fe 00 00 b5 fe 0050 00 00 30 ff 08 00 c2 ff 00 00 47 00 08 00 80 00 0060 00 00 65 00 00 00 47 00 00 00 63 00 08 00 ab 00 0070 00 00 f9 00 08 00 0c 01 08 00 c4 00 00 00 60 00 0080 08 00 1a 00 00 00 c3 ff 00 00 2d ff 08 00 7e fe 0090 00 00 d5 fd 00 00 2f fd 00 00 95 fc 00 00 03 fc 00a0 08 00 66 fb 00 00 d7 fa 08 00 6b fa 08 00 01 fa 00b0 08 00 91 f9 00 00 41 f9 00 00 e9 f8 08 00 4e f8 00c0 00 00 c4 f7 00 00 89 f7 00 00 2a f7 08 00 43 f6 00d0 08 00 f9 f4 00 00 81 f3 08 00 0f f2 08 00 ce f0 00e0 08 00 81 ef 08 00 08 ee 08 00 b2 ec 00 00 7e eb 00f0 08 00 27 ea 00 00 d4 e8 00 00 bd e7 00 00 b6 e6 The first sample is stored as 00 00 a5 f5. Does this represent the value 0xf5a5? For the majority of samples, the first two bytes are 00 00. Is this because the input stream was, in fact, a 16-bit stream? For the rest of the samples, the first two byte are 08 00. Why don't all the samples start with 00 00? Does this sequence 08 00 have a special meaning? Would anyone care to venture a guess? Regards. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user I suggest to take another computer or signal generator and feed into the card in question something predictable as sine wave with reasonable amplitude - will above noise, safely below distortion. If the 08 00 phenomenon persists, file a bug. Regards, Sergei. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Alsa-user mailing list Alsa-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/alsa-user