Re: RE : RE : M-Audio Audiophile USB, native little endian (S16_LE) ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-
Summary: Audiophile-usb fix (corrects little-endianness in 16bit
modes, resets interfaces at device initialization, and updates the
documentation)

Signed-Of-By: Thibault Le Meur <Thibault.LeMeur@xxxxxxxxxx>

Thanks, applied now.


Takashi

Hi,

Hakan reported to me (off-list) that the AC3 function works correctly with the device except in device_setup=0x00 mode because the interface is reported to be little endian whereas it is in fact big-endian (in this mode only).

With the help of Hakan I made a fix and updated the doc accordingly.
Hakan could you test this fix (to be applied after my last one) and report if it is ok for you ?

Takashi, in case everything is ok and you want to apply the patch:

Summary: Fixed AC3 interface in device_setup=0x00 mode thanks to Hakan Lennestal and updated documentation
Signed-Of-By: Thibault Le Meur <Thibault.LeMeur@xxxxxxxxxx>


Thanks in advance,
Thibault


--- alsa-kernel/Documentation/Audiophile-Usb.txt	2007-07-12 23:15:04.000000000 +0200
+++ new/alsa-kernel/Documentation/Audiophile-Usb.txt	2007-07-12 23:00:04.000000000 +0200
@@ -1,4 +1,4 @@
-	Guide to using M-Audio Audiophile USB with ALSA and Jack	v1.4
+	Guide to using M-Audio Audiophile USB with ALSA and Jack	v1.5
 	========================================================
 
 	    Thibault Le Meur <Thibault.LeMeur@xxxxxxxxxx>
@@ -12,6 +12,8 @@
  - Added Low Endianness nature of 16bits-modes
    found by Hakan Lennestal <Hakan.Lennestal@xxxxxxxxxxxxxxx>
  - Modifying document structure
+* v1.5 - Thibault Le Meur (2007-07-12)
+ - Added AC3/DTS passthru info
 
 
 1 - Audiophile USB Specs and correct usage
@@ -105,9 +107,12 @@
 
 In this mode, the device uses Big Endian byte-encoding so that 
 supported audio format are S16_BE for 16-bit depth modes and S24_3BE for 
-24-bits depth mode. One exception is the hw:1,2 port which is reported 
-to be Little Endian compliant (supposedly supporting S16_LE) but processes 
-in fact only S16_BE streams.
+24-bits depth mode.
+
+One exception is the hw:1,2 port which was reported to be Little Endian 
+compliant (supposedly supporting S16_LE) but processes in fact only S16_BE streams.
+This has been fixed in kernel 2.6.23 and above and now the hw:1,2 interface 
+is reported to be big endian in this default driver mode.
 
 Examples:
  * playing a S24_3BE encoded raw file to the Ao port
@@ -116,6 +121,8 @@
    % arecord -D hw:1,1 -c2  -t raw -r48000 -fS24_3BE test.raw
  * playing a S16_BE encoded raw file to the Do port
    % aplay -D hw:1,1 -c2 -t raw -r48000 -fS16_BE test.raw
+ * playing an ac3 sample file to the Do port
+   % aplay -D hw:1,2 --channels=6 ac3_S16_BE_encoded_file.raw
 
 If you're happy with the default Alsa driver mode and don't experience any 
 issue with this mode, then you can skip the following chapter.
@@ -205,13 +212,16 @@
 
 3.2.1.3 - AC3 w/ DTS passthru mode
 
-This mode is untested, I have no AC3 compliant device to test it. I uses:
+Thanks to Hakan Lennestal, I now have a report saying that this mode works.
 
  * device_setup=0x03
    - 16bits 48kHz mode with only the Do port enabled 
-   - AC3 with DTS passthru (not tested)
+   - AC3 with DTS passthru
    - Caution with this setup the Do port is mapped to the pcm device hw:1,0
 
+The command line used to playback the AC3/DTS encoded .wav-files in this mode:
+   % aplay -D hw:1,0 --channels=6 ac3_S16_LE_encoded_file.raw
+
 3.2.2 - How to use the device_setup parameter
 ----------------------------------------------
 
--- alsa-kernel/usb/usbaudio.c	2007-07-12 23:15:05.000000000 +0200
+++ new/alsa-kernel/usb/usbaudio.c	2007-07-12 22:33:32.000000000 +0200
@@ -2532,7 +2532,18 @@
 		 *        but we give normal PCM format to get the existing
 		 *        apps working...
 		 */
-		pcm_format = SNDRV_PCM_FORMAT_S16_LE;
+		switch (chip->usb_id) {
+
+		case USB_ID(0x0763, 0x2003): /* M-Audio Audiophile USB */
+			if (device_setup[chip->index] == 0x00 && 
+			    fp->altsetting == 6)
+				pcm_format = SNDRV_PCM_FORMAT_S16_BE;
+			else
+				pcm_format = SNDRV_PCM_FORMAT_S16_LE;
+			break;
+		default:
+			pcm_format = SNDRV_PCM_FORMAT_S16_LE;
+		}
 	} else {
 		pcm_format = parse_audio_format_i_type(chip, fp, format, fmt);
 		if (pcm_format < 0)
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux