Official moOde 6.5.2 support thread - Printable Version +- Moode Forum (https://moodeaudio.org/forum) +-- Forum: moOde audio player (https://moodeaudio.org/forum/forumdisplay.php?fid=3) +--- Forum: Support (https://moodeaudio.org/forum/forumdisplay.php?fid=7) +--- Thread: Official moOde 6.5.2 support thread (/showthread.php?tid=2474) |
RE: Official moOde 6.5.2 support thread - JonPike - 05-27-2020 (05-26-2020, 11:18 PM)Tim Curtis Wrote: Source repo for Crossfeed Thanks... Now if only I wasn't more rust than language skills in regards to C... So, I have two Moode setups in front of me, one with an Allo Boss, and one with a Schiit Modi 3. So, what I see happening, is on both my DACS, when you are not doing any resampling, and you turn on the crossfeed (or one of the two EQ's) what you see in the audio info is that the output is 32bit and whatever the input sample rate is. Like a 32/* resample has been applied. No problem, music plays on both. If you do resampling, and select a particular bitrate, as expected you get a different bitrate, but up to a point on my Schiit. I select 32/384 and the resampler says it did 384, but the output says 32/192. Still plays OK. Now, if I turn on the crossfeed/EQ, I get the ALSA device warning, and no sound. Seems any resampling choice above 32/192 will be broken in this case. On the other system, with the Allo Boss, I do not see a different output bitrate above 32/192, I see the ouput matching what the resampler is set to, all the way to 32/384. And, it plays, even with the crossfeeed on. So, it seems odd, but possibly expected behavior for the crossfeed/EQ blocks to "resample" or convert the bitsream to 32b. I'm researching now, since I was under the impression that a Schiit Modi 3 was a 32/384 DAC. Now, on their site, I see "up to 24/192" Edit: OK, have done some datasheet trolling... The Schiit has a AKM4490, a decent chip that can go to 768kbit and 11.2mHz DSD, IF the rest is up to it. And, it looks like the USB interface cant quite fully follow. Chip in question there, is a CM6631A and it tops out at 32/192. So I would think, that the Modi 3 is self limited by it's USB interface. I do see some error codes in response to it in the boot up log with dmesg, that I want to ask about later, and there are a few differences in the formats, so maybe the Modi isn't being set up as perfectly as possible, but it looks like we're overreaching the DAC. Interesting question on how, without the crossfeed on, somehow Mood seems to "know" and provide it with 32/192, but the crossfeed prevents that. Maybe that can be preserved with crossfeed/EQ on. RE: Official moOde 6.5.2 support thread - Tim Curtis - 05-27-2020 The audio interfaces are different for your two DAC's and so results can be different. The USB DAC will be using the universal Linux USB audio driver and its "Quirks" file that contains definitions of USB DAC's and their custom requirements. Your DAC is prolly in the Quirks file and its correctly reporting its max sample rate of 192K. The I2S DAC has its own custom driver and so more likely to not cause issues. Also, ALSA will always try to provide the bit depth that the audio device accepts. it zero-pad's it so no loss of bit-perfect-ness. This all happens behind the scenes. What exactly are you trying to achieve with regard to resampling and your two DAC's? RE: Official moOde 6.5.2 support thread - TheOldPresbyope - 05-27-2020 @JonPike I'm not sure I followed your dissection of the Schiit Modi 3, but moOde can only work with the capabilities of DACs as reported through ALSA. Tim has included in moOde the command-line utility alsacap which can tell you what ALSA believes to be true about yours. Here's its output for the USB Khadas Tone Board on my living room system: Code: pi@moodelr:~ $ alsacap -C 1 while here's its output for the USB-BT adapter on a test system: Code: pi@moode3b:~ $ alsacap -C 1 In both cases, I restricted the search to card 1 because I knew that was how the DAC of interest was enumerated. Try the --help command to see other alsacap options. Here's the man page and here's a more extensive article by Volker Schatz who wrote the utility: A close look at ALSA. Regards, Kent RE: Official moOde 6.5.2 support thread - JonPike - 05-28-2020 (05-27-2020, 01:42 AM)Tim Curtis Wrote: The audio interfaces are different for your two DAC's and so results can be different. Yep... Due to my Schiit being a USB device, the data has to flow thru a USB interface, and of course whatever is the slowest link will define the limits. I'm curious as to what's in the Quirks file for the Schiit... where is that located? And yes, sounds like it's correct, in that it seems 192khz is the right "top speed", for the USB interface, but I'm interested anyway. A good question would be, since it can change or limit to 192 when I resample to something higher and play successfully, why does it NOT do that when the crossfeed/EQ is engaged? Overall, was succumbing to a bit of audiophilia.. just thought I'd play with higher bitrate resampling and see if it made any difference. On the Allo Boss, I think you get the filtering turned off, so that might actually be audible. The Schiit, using a different chip, probably not. The Modi 3, I thought was good to 32/384, especially since it played when I set it there... but as we see, appearances aren't always what they seem. Also was trying to crosscheck the earlier poster reporting a sudden similar problem since I had 6.4.2 and a 6.5.2 players handy. I saw the problem on both, so I'm wondering if he also did the same thing I did, inadvertently change sample rates. Would be good to hear back from him to see if his issue is actually the same kind of thing. RE: Official moOde 6.5.2 support thread - Tim Curtis - 05-29-2020 I don't track these files and so I'm just posting for reference purposes but for USB audio devices here are some links to the quirks file. Upstream sound/usb quirks file https://github.com/torvalds/linux/blob/master/sound/usb/quirks.c Raspberry Pi Linux downstream file for the 5.4.y kernel https://github.com/raspberrypi/linux/blob/rpi-5.4.y/sound/usb/quirks.c RE: Official moOde 6.5.2 support thread - JonPike - 05-29-2020 (05-27-2020, 03:46 PM)TheOldPresbyope Wrote: @JonPike Ah, thanks for that. The article especially, that will help a lot with me understanding ALSA better. I was using the Modi 3 on my 6.5.2 player. Here's what I see in the Audio Info: Audio Device Device: USB audio device Chip: Interface: USB Formats: S16_LE, S32_LE, S24_3LE Platform: Pi-3B 1GB v1.2 And what I see with alsacap: (not showing the Pi's audio jack and two HDMI devices) Card 1, ID `S3', name `Schiit Modi 3' Device 0, ID `USB Audio', name `USB Audio', 1 subdevices (1 available) 2 channels, sampling rate 44100..192000 Hz Sample formats: S16_LE, S32_LE, S24_3LE Buffer size range from 16 to 262144 Period size range from 8 to 131072 So, it seems that the Modi 3 is recognized as handling 32b data, and rates up to 192k. This follows with what the Cmedia USB interface chip can do, (and not what the Schiit website says, which is 24b). And, probably everything setup wise is OK in that regard. The weird thing, is when you resample higher than that. So, if I sample to a higher rate than 192k, I'd expect no sound and a error message. What happens is this, from the Audio Info window: Resampling to 32/384, no cross Input / Output Source: http://stream-tx3.radioparadise.com/aac-320 Encoded at: VBR compression Decoded to: 16 bit, 44.1 kHz, Stereo, 320 kbps Destination: Local Output rate: 32 bit, 192 kHz, Stereo, 12.288 Mbps DSP operations Volume ctl: Software (MPD 32-bit float with dither) Resampling: 32 bit, 384 kHz, Stereo (SoX very high quality) Polarity inv: off Crossfade: off Crossfeed: off Notice that I've set it to resample to 32/384, but the output ends up 32/192. And it plays, since the Modi can handle that. Not sure what's exactly happening here, but it looks like some resampling or altering of the commanded setting to a different (the max valid?) rate. Now, if I turn on the Crossfeed, or select an EQ, this breaks, and I get no decode or output, looking like this, along with the ALSA no device msg like Morias saw: Input / Output Source: http://stream-tx3.radioparadise.com/aac-320 Encoded at: VBR compression Decoded to: 0 bps Destination: Local Output rate: 0 bps DSP operations Volume ctl: Software (MPD 32-bit float with dither) Resampling: 32 bit, 384 kHz, Stereo (SoX very high quality) Polarity inv: off Crossfade: off Crossfeed: 700 Hz 4.5 dB If I lower the resampling rate to 32/192, it works with the crossfeed on. So, it looks like the system will "protect" you from setting beyond the rate of your DAC, but if you enable a feature it will not. Maybe that's not what's happening, but that's the result. It's perhaps a low level bug, but if it would be possible to maintain the "protecting" behavior with the crossfeed/EQ on, it would keep people from stumbling into a confusing non playing situation. I have no idea if the stuff doing this is near the surface in Moode land, or deep under the hood of ALSA.... A possible clue is that if you don't do any resampling, and you turn on the crossfeed/EQ you get the same data rate as you had on the input, but the reported depth on output changes to 32b. As Tim explained, that's something ALSA will do, but in this case only when those features are on. RE: Official moOde 6.5.2 support thread - TheOldPresbyope - 05-29-2020 @JonPike As your alsacap output shows, your Schiit is reporting it can handle 32-bit material so moOde/MPD/ALSA will send it, but in a quick search of the InterWEB, I see others saying it converts 32-bit material back down to 24-bit internally. Why don't you ask Schiit? Regards, Kent RE: Official moOde 6.5.2 support thread - Tim Curtis - 05-29-2020 MPD and ALSA will try to play a bit depth and sample rate that your DAC will accept but the DSP plugins most of which are not maintained anymore have their own limits and methods of failing that neither MPD not ALSA have control over. Also when you set MPD to resample at bit depths and rates that are incompatible with either the DSP plugin and/or the audio device there can be unexpected results. RE: Official moOde 6.5.2 support thread - Tim Curtis - 05-29-2020 What happens inside a DAC is interesting to say the least. RE: Official moOde 6.5.2 support thread - JonPike - 05-29-2020 (05-29-2020, 12:38 AM)TheOldPresbyope Wrote: @JonPike I may.. but that probably isn't part of the issue here. From data sheets, we know that the core DAC can handle up to 32/768, if set up for it, but the USB interface can handle a max of 32/192. The SPDIF input is limited to 24/192. The issue seems to be in the software, someplace... in the parts that feed the audio devices, resample, bit pad, and apply filtering. I had thought it might be some config issue with the Schiit, but I dont think so now. The name dosen't appear in the quirks, it gets reported as it should, etc. As Tim says, you have to figure what the different pieces along the way have as limitations. I found a mention in the history of the crossfeed, that it has a 192k limit, but in the above code there's a line saying max rate is 384? Looks like the guy who wrote it has been gone 5+ years and isn't available to ask. What do you think, Tim? Maybe there's some kind of error handling in the main line audio stuff, for when you attempt to resample to something over what the stated device limit is, and the EQ blocks don't support and break it? The error msg sounds like its reporting not finding a (faster than exists) device. Anyway, don't want to beat a dead horse, or even one that's just feeling poorly... Was hoping it might be an easy thing to find. Overall conclusion, if you're using a Schiit Modi 3 (or any other dac that has limits?) and you want to resample and do some DSP, best keep it below the limit it should perform at. |