dbmaxpayne / Sonos-DSP

Make Sonos Play:5 Gen. 1 recycle-mode speakers sing again
5 stars 1 forks source link

Various Issues #2

Open nanobyte84 opened 3 months ago

nanobyte84 commented 3 months ago

Hi Mark, I own two recycled Play:5 and want to make them work again. So I was very happy to find your approach which is by far the best you can find on the internet since I don't want to use a different amp etc. Sadly I don't get it to work.

If I do a getStatus I get:

Event register: 0 Master volume: -15dB Register 0x02: 0 # Clock Configuration and Power Control -> Power Down Register 0x03: 32 # PWM Channel Power Down Control -> One Channel Off Register 0x04: 192 # Misc. Config -> Digital Interface Format -> TDM Register 0x05: 8 # Ramp Configuration -> Down Enabled, Speed 0.1s Register 0x06: 0 # Volume Control -> No Auto-Mute on Errors Register 0x12: 0 # Channel Mute -> All Muted Register 0x31: 4 # PWM Config -> Oversampling off, Full- / Half-bridge Settings Register 0x33: 13 # PWMOUT Delay -> 13 * PWM_MCLK Register 0x43: 32 # Secret register not in datasheet, but set by Sonos Logic Board Register 0x5A: 0 # Secret register not in datasheet, but set by Sonos Logic Board

I tried with two rasperrypi zeros and heading the same issue in 32bit on my zero 1 and 64bit on my zero 2. Also what is not documented is to be sure to keep the username 'pi' (i used sonospi before)

i2c: smb: i2c-1 # set bus i2c-1 smb_detect: 0..3 # list of monitored smb bus by i2cdetect eeprom: ic: '24c64' slaveaddr: 0x4c writestrobe: 26

in ~/.comet/config.yaml

Now when I do: speaker-test -t wav -c 1 it stays silent and I get:

speaker-test 1.2.4

Playback device is default Stream parameters are 48000Hz, S16_LE, 1 channels WAV file(s) Rate set to 48000Hz (requested 48000Hz) Buffer size range from 12000 to 18000 Period size range from 6000 to 6000 Using max buffer size 18000 Periods = 4 was set period_size = 6000 was set buffer_size = 18000 0 - Front Left

Maybe you could give me some advice (t.me/ms_vtrust)

dbmaxpayne commented 3 months ago

Hi,

Thanks for checking out my project :) Seems like you're the first person to really try things out. I have just replaced the Files directory with a Files.zip. Seems like Github's web interface drops certain files during an upload. The Ecomet part should make more sense now.

The fact you are able to use the getStatus command will certainy let you amplify some tunes in the near future. Don't give up and let me know if I can help in any other way.

Cheers, Mark

nanobyte84 commented 3 months ago

I am actually working on it. Can't wait hearing the tunes ;-) I will cleanup the script as soon I got it to work and let you know when I am stuck... THX in advance

nanobyte84 commented 3 months ago

Can you please let me know which version of Raspbian you are using? I finally got the speakertest to work - yay! But I still have a lot of problems - will report as soon I have updates. Do you think there is a way we can have a chat?

dbmaxpayne commented 3 months ago

Happy to hear that you heard some sound :)

lsb_release -a
No LSB modules are available.
Distributor ID: Raspbian
Description:    Raspbian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
uname -a
Linux hostname 6.1.0-rpi4-rpi-v6 #1 Raspbian 1:6.1.54-1+rpt2 (2023-10-05) armv6l GNU/Linux

The script and project itself also still has some minor problems for me (bluetooth doesn't always work without stuttering, sometimes the speaker pops upon boot), but I stopped investigating further as my main use scenario (squeezebox player) was already working well enough and I had put countless hours of work into it before even starting this project here. Some would say "why not just buy a new speaker?!", but well... 🤣 If you can contribute some fixes or whatever findings you might have, I'd be happy to merge them.

nanobyte84 commented 3 months ago

Ok thx. For me it is the same, by now I invested already way too much time. But it is also for educational purpose. Maybe i will kick out the raspi and replace it by an esp32 and maybe try to connect an old Amazon echo dot as audio source...

dbmaxpayne commented 3 months ago

That all should work, too. I also thought about using an ESP32 for my project, but when I saw how much computational power the necessary sampe rate conversion to 48kHz costs on the RPi, I quickly dropped that approach. Especially because I already had the RPis laying around anyway.

Either way: Bluetooth works in like 6/10 cases, too. I just seldomly use it and the squeezebox-player side of things is used almost every day.