Closed marek-obuchowicz closed 2 years ago
I was facing the exact issue. After finding out about v12 (I'm not using HifiBerryOs so that took a while) I checked the diff between v11 and v12 xmls and noticed the asmrc input has changed from 2 to 3. I then looked for this parameter in SigmaStudio and found it in the RegisterControls > ROUTING_MATRIX tab. ASRC7, which is supposed to handle SPDIF input, had its source set to "From DSP core outputs". After changing this to "From SPDIF receiver" toslink input worked perfectly!
This is what it should look like.
I still wish HiFiBerry would upload the v12 project here, though.
@jarvick257 thanks for your response, that's actually a great way to reverse-engineer changes. Is there anything else that differs between those two profiles, or just this ASRC routing change?
Yes there were a couple more changes but most of those look pretty cryptic in the xml so not really sure what they are.
I asked because after changing ASRC input, I'm still getting issues with signal detection and mixing. I can workaround them in SigmaStudio by editing profile and adding a mixer instead of input detection logic (which seems to be broken). @hifiberry is there any chance to get any feedback from you? :)
If you create push your own project via SigmaStudio you need to add the correct metadata to it. Make sure all the SPDIF registers are set correctly in your metadata. Read the registers and check iff all contain the correct values. Don't expect with ANY SigmaStudio project that you just push it to the DSP and it'll work. Without the correct metadata nothing will happen.
sure, metadata is in place as described on your page. TosLink signal is detected correctly ("sources" website shows if / if not there is an incoming signal, it works ok) but still there's nothing on output after changing just the ASRC source - somehow v11 logic seems to be broken in terms of signal detection or mixing.
any chance for uploading sigmastudio project v12 to this repo? Seems that the issue we're discussing here has already been solved by you :)
There were no major changes in v12. The v12 project was never saved. Therefore, I can't upload it.
But there were changes that fixed problems, so it would help people to start with a sigmastudio project file v12 instead of v11, even the change is minor. As marek said, the problem is already solved by you, so it would be helpful to not research it again and again :-)
@hifiberry maybe the fixed project file could be uploaded with another version name (like v12-1)? By doing that, we are not going to introduce any possible incompatiblity between already released v12 (where source project is missing), in case that there were indeed more changes to v12. That could unblock a few users, like those participating in this thread. If it helps, let me know, I can create a PR when there's some spare time.
In the community (forum) of Hifiberry this is also questioned from different people. As far as i understand this following links answer of support team from today, the difference in v11 and v12 is not in the projectfile, it is only in the metadata. So this would be a more detailed explanation for the non existing v12 project file :-)
https://support.hifiberry.com/hc/en-us/community/posts/360014328577
As far as i understand this following links answer of support team from today, the difference in v11 and v12 is not in the projectfile,
Ok, thats not true. I started with the SigmaStudio File v11 and had the above already mentioned problems with TOSLINK input. Spotify for example was no problem, but TOSLINK input was not detected nor played.
When i used the Hifiberry OS official v12 (and reboot) it worked.
Then i took the SigmaStudio project v11 and just changed the already above mentioned ASRC7 input from SPDIF, then compile, metadata and so on (and reboot) it works now with TOSLINK.
After my posting above i also had some issues with signal detection on TOSLINK. TOSLINK was playing, but the detection was not working, perhaps like @marek-obuchowicz also observed.
My attention went then to the "SPDIF on" switch in the "input detection" schematic. It was off, but i think it needs to be on. After that, it worked.
So i opened my first pull request ever with these changes:
changed ASRC7 source to "From S/PDIF receiver"
Schematic "Input Selection" Switch "SPDIF On" was off in v11, so i switched it to "on"
@marek-obuchowicz can you confirm this v12-1 works for you, just with open and deploy?
For an possible v13 i also have found more settings i changed, testings are ongoing:
Visual rearrangement for better readability and understanding
Disabled not needed functions (less power consumption and heat dissipation)
"Power_Clocking":
Serial Input 3 disabled
Serial Input 1 disabled
PDM1 Input disabled
PDM0 Input disabled
ADC0 disabled
SPDIF_RX "Output strength on lock loss" changed to weak, because seems "safer" to me.
From the ADAU1451 Datasheet: S/PDIF receiver behavior in the event that lock is lost. Applies to the output of the recovered frame clock from the S/PDIF receiver. Strong; output is continued as well as is possible when the receiver notices a loss of lock condition, which may result in some data corruption. Weak; output is interrupted as soon as receiver notices a loss of lock condition.
Error or different point of view regarding channel assignment (at least the analog output). Some people already asked in the hifiberry community if left/right is reversed on the dac+dsp card. The answer was mostly there is no left/right carved in stone and that this could be changed, if wanted, in the dsp programm.
GPIO13/MP13 used in schematic "Hardware mute"
Also a little odd: i did the routine with programming, metadata etc. a douzen times, but the checksum just changed one time, instead for every little detail changed.
@RPhilbo Thanks for this. About the changes you plan for a future version:
Error or different point of view regarding channel assignment It's not needed to change the DSP program for this, it can be directly changed in the HiFiBerryOS GUI.
Also a little odd: i did the routine with programming, metadata etc. a douzen times, but the checksum just changed one time, instead for every little detail changed. Checksum is only calculated on the program, NOT the register set. Therefore, changing some register settings won't change the checksum.
@RPhilbo I just ordered toslink cables, have none free at the moment to connect hifiberry. As soon as they arrive (i'd expect next week), i'll be able to check your profile. Is there an XML profile, built from your project, which I could check, or do you prefer me to go with the sigmastudio build process and add metadata?
@marek-obuchowicz of course i can provide the xml file, maybe i also do a PR to put it into the xml folder.
@marek-obuchowicz yesterday i finally found some time to push the xml file, and the PR38 was also already accepted. So I'm curious if it works for you. :-)
Its under hifiberry-dsp/sample_files/xml/
hifiberry-os currently includes updated dacdsp profile, version 12. This repository contains only the older version, v11, in
sample_files/dspproj
directory. Can we expect SigmaStudio profile version 12 to be added to this repo?Reason for asking: I'm having trouble with TosLink In in v11 (both pre-compiled profile from hifiberry-os as well as source profile uploaded w/ SigmaStudio) - input detection block does not recognise incoming signal, even though there is a SPDIF-Lock and there is signal coming in, with severe volume). It works fine with dacdsp-v12.xml (included in hifiberry-os). Therefore, uploading a fixed project v12 here would be highly appreciated.