Re: Configuring ALSA and SCHIIT BIfrost for "bit perfect"

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

 



Hi Chris,

please follow two important rules on mailing lists:

1. Always reply to all. If you're worried about the size of a text
attachment, use a pastebin.

2. Do not top-post.

On 10.09.2012 01:01, chris hermansen wrote:
> Thank you very much for your kind help and offer of assistance.
> 
> I have zero experience around the kernel, so if you are prepared to
> send me a patch, that would be superb.

Sure. I attached one.

> A question (from my level 0 perspective): can I not patch the kernel I
> have, as opposed to getting one "unknown" to my current ubuntu
> distribution?  (or maybe I am so clueless I just don't understand what
> you are suggesting below).

This can be confusing when you do it the first time, but no worries. It
has been the first time for everyone once :)

Run

  git clone git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git

Use "git patch" to apply the patch attached to this email.

Then follow these rules to get a kernel package that you can install on
your Ubuntu:

  https://help.ubuntu.com/community/Kernel/Compile

> I am responding directly / just to you as the output of the lsusb is
> some 1600 lines and it seems imprudent to send it to the list as a
> whole.

Thanks for the thought. But again - please keep to the rules that are
established around here and that I described above.

> Also, the people at Schiit seem to be most approachable and I wonder
> if it would help others to provide some of this information to them,
> "once it's working" - what do you think?

Once we have a workaround, we can as well share it with them, sure.


Best regards,
Daniel



> On Sun, Sep 9, 2012 at 2:47 PM, Daniel Mack <zonque@xxxxxxxxx> wrote:
>> Hi,
>>
>> On 09.09.2012 23:26, chris hermansen wrote:
>>> I recently acquired a Schiit Bifrost and have been attempting to
>>> achieve (what I would call) "bit perfect" performance with 16 and 24
>>> bit music files at 44.1, 96 and 192K over the USB interface.
>>
>> [...]
>>
>>> In all of these cases, I end up with results that appear to be the
>>> same, or at least differ in ways indistinguishable to me.  To
>>> elaborate, if I play a 16bit/44.1K FLAC file, then switch to a 24 bit
>>> and/or higher resolution file, the audio for the second file is
>>> garbled in a very distinctive way - it sounds like it is being passed
>>> through some sort of "distortion network".  The basic nature of the
>>> melody is apparent, but everything sounds really odd.  If I stop the
>>> second song and restart it, often on this second try it will play
>>> fine.  Sometimes I have to do this more than once to get it to play
>>> fine.
>>
>> I have dealt with a number of USB audio interfaces lately that have
>> similar problems under Linux.
>>
>> The reason, as far as I could track it down, is that these interfaces do
>> not properly flush their feedback endpoint buffers when switching from
>> one sample rate to another, which results in wrong data being sent after
>> each stream start. The Linux driver has code for feedback format
>> auto-detection which gets confused by that and assumes a different
>> format, consequently sending data at a wrong rate.
>>
>> Some of these issues have been resolved by fixing the firmwares of
>> affected devices, for others I just recently submitted a patch that
>> makes the driver ignore the first n packets of a stream, to work around
>> that hardware bug:
>>
>>
>> https://git.kernel.org/?p=linux/kernel/git/tiwai/sound.git;a=commit;h=2b58fd5b
>>
>>> If anyone has any suggestions, I am willing to experiment (carefully)
>>> and document results.
>>
>> Yes, you could try building a kernel from
>>
>>   git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
>>
>> And add a quirk to sound/usb/quirks.c, in function
>> snd_usb_endpoint_start_quirk(). Just add a check for your device's USB
>> VID/PID and do the same "ep->skip_packets = 4" for the SYNC endpoint.
>>
>> If you're not sure what to do, send me the output of "lsusb -v" on your
>> system and I'll provide a patch.
>>
>>
>> Thanks,
>> Daniel
>>
> 
> 
> 

diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c
index 0f58b4b..5260d5b 100644
--- a/sound/usb/quirks.c
+++ b/sound/usb/quirks.c
@@ -770,6 +770,13 @@ void snd_usb_endpoint_start_quirk(struct snd_usb_endpoint *ep)
 	if ((le16_to_cpu(ep->chip->dev->descriptor.idVendor) == 0x23ba) &&
 	    ep->type == SND_USB_ENDPOINT_TYPE_SYNC)
 		ep->skip_packets = 4;
+
+	switch (ep->chip->usb_id) {
+	case USB_ID(0x0d8c, 0x0304): /* CMEDIA - Schiit USB Interface */
+		if (ep->type == SND_USB_ENDPOINT_TYPE_SYNC)
+			ep->skip_packets = 4;
+		break;
+	}
 }
 
 void snd_usb_ctl_msg_quirk(struct usb_device *dev, unsigned int pipe,
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Alsa-user mailing list
Alsa-user@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/alsa-user

[Index of Archives]     [ALSA Devel]     [Linux Audio Users]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

  Powered by Linux