[alsa-devel] Resend: Incorrect sbits for snd-usb-audio
Hi,
I had send this out earlier back in September, but never got a response.
I have a Focusrite Scarlett 2i4 USB Audio Interface. The audio format exposed by ALSA for this device is S32_LE. From the hardware specs and lsusb. it supposed to only have a 24 bit resolution (with the LSB bits set to 0):
AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 4 bBitResolution 24
When I query the sbits for this device, I expect it to return 24, but instead it returns 32. Looking through the usb audio driver code, it doesn't look like this information is actually exposed to userspace. The 'parse_audio_format_i_type' in usb/format.c merely returns the supported formats, but doesn't include any msbits info. (and it doesn't look like it can be easily changed to return the msbits info as well).
Was this intentionally left out, or is this a missing feature in the driver?
Thanks,
Sander
At Fri, 6 Dec 2013 14:57:46 -0600, Sander Jansen wrote:
Hi,
I had send this out earlier back in September, but never got a response.
I have a Focusrite Scarlett 2i4 USB Audio Interface. The audio format exposed by ALSA for this device is S32_LE. From the hardware specs and lsusb. it supposed to only have a 24 bit resolution (with the LSB bits set to 0):
AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 4 bBitResolution 24
When I query the sbits for this device, I expect it to return 24, but instead it returns 32. Looking through the usb audio driver code, it doesn't look like this information is actually exposed to userspace. The 'parse_audio_format_i_type' in usb/format.c merely returns the supported formats, but doesn't include any msbits info. (and it doesn't look like it can be easily changed to return the msbits info as well).
Was this intentionally left out, or is this a missing feature in the driver?
It's just because of laziness because almost no applications check the msbit but only the format type. Feel free to send an enhancement patch.
thanks,
Takashi
On Sun, Dec 8, 2013 at 3:20 AM, Takashi Iwai tiwai@suse.de wrote:
At Fri, 6 Dec 2013 14:57:46 -0600, Sander Jansen wrote:
Hi,
I had send this out earlier back in September, but never got a response.
I have a Focusrite Scarlett 2i4 USB Audio Interface. The audio format exposed by ALSA for this device is S32_LE. From the hardware specs and lsusb. it supposed to only have a 24 bit resolution (with the LSB bits
set
to 0):
AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 4 bBitResolution 24
When I query the sbits for this device, I expect it to return 24, but instead it returns 32. Looking through the usb audio driver code, it doesn't look like this information is actually exposed to userspace. The 'parse_audio_format_i_type' in usb/format.c merely returns the supported formats, but doesn't include any msbits info. (and it doesn't look like
it
can be easily changed to return the msbits info as well).
Was this intentionally left out, or is this a missing feature in the
driver?
It's just because of laziness because almost no applications check the msbit but only the format type. Feel free to send an enhancement patch.
Thanks for the clarification. I may give that a shot.
Sander
On Sun, Dec 8, 2013 at 12:27 PM, Sander Jansen s.jansen@gmail.com wrote:
On Sun, Dec 8, 2013 at 3:20 AM, Takashi Iwai tiwai@suse.de wrote:
At Fri, 6 Dec 2013 14:57:46 -0600, Sander Jansen wrote:
Hi,
I had send this out earlier back in September, but never got a response.
I have a Focusrite Scarlett 2i4 USB Audio Interface. The audio format exposed by ALSA for this device is S32_LE. From the hardware specs and lsusb. it supposed to only have a 24 bit resolution (with the LSB bits
set
to 0):
AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 4 bBitResolution 24
When I query the sbits for this device, I expect it to return 24, but instead it returns 32. Looking through the usb audio driver code, it doesn't look like this information is actually exposed to userspace. The 'parse_audio_format_i_type' in usb/format.c merely returns the
supported
formats, but doesn't include any msbits info. (and it doesn't look like
it
can be easily changed to return the msbits info as well).
Was this intentionally left out, or is this a missing feature in the
driver?
It's just because of laziness because almost no applications check the msbit but only the format type. Feel free to send an enhancement patch.
Thanks for the clarification. I may give that a shot.
Sander
Forgive my ignorance, but to which git tree should this patch be developed on?
git://git.alsa-project.org/alsa-kernel.git https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/ ?
Thanks,
Sander
At Sun, 8 Dec 2013 12:47:31 -0600, Sander Jansen wrote:
[1 <text/plain; UTF-8 (7bit)>] On Sun, Dec 8, 2013 at 12:27 PM, Sander Jansen s.jansen@gmail.com wrote:
On Sun, Dec 8, 2013 at 3:20 AM, Takashi Iwai tiwai@suse.de wrote:
At Fri, 6 Dec 2013 14:57:46 -0600, Sander Jansen wrote:
Hi,
I had send this out earlier back in September, but never got a response.
I have a Focusrite Scarlett 2i4 USB Audio Interface. The audio format exposed by ALSA for this device is S32_LE. From the hardware specs and lsusb. it supposed to only have a 24 bit resolution (with the LSB bits
set
to 0):
AudioStreaming Interface Descriptor: bLength 6 bDescriptorType 36 bDescriptorSubtype 2 (FORMAT_TYPE) bFormatType 1 (FORMAT_TYPE_I) bSubslotSize 4 bBitResolution 24
When I query the sbits for this device, I expect it to return 24, but instead it returns 32. Looking through the usb audio driver code, it doesn't look like this information is actually exposed to userspace. The 'parse_audio_format_i_type' in usb/format.c merely returns the
supported
formats, but doesn't include any msbits info. (and it doesn't look like
it
can be easily changed to return the msbits info as well).
Was this intentionally left out, or is this a missing feature in the
driver?
It's just because of laziness because almost no applications check the msbit but only the format type. Feel free to send an enhancement patch.
Thanks for the clarification. I may give that a shot.
Sander
Forgive my ignorance, but to which git tree should this patch be developed on?
git://git.alsa-project.org/alsa-kernel.git https://git.kernel.org/cgit/linux/kernel/git/tiwai/sound.git/ ?
The latter, at best against for-next branch of sound.git tree.
Takashi
participants (2)
-
Sander Jansen
-
Takashi Iwai