I write to share my solution to enable the Sonos S2 Controller to access my Mac music library; it has been frustrating but I believe the solution is quite simple. First, I have a Mac mini (M1, 2020) running the latest version of macOS Big Sur (version 11.5). My music library is located in the default location. I have the Sonos S2 controller installed on my iPhone. My Sonos system has a Boost, Playbar, Play 1, and Roam. The problem was that my Mac would not allow the Sonos controller to access my music library.
To make this work, go to the Apple Menu and click on System Preferences. Then, click on the Sharing folder. Then check File Sharing. Add your Media folder to the Shared folder list. Once you add the folder, you will see several users with privileges listed. Add SonosDMS with Read Only privileges. While you are here, please write down the Computer Name; you will need this information for the final step. Close the folder.
Next, click on the Apple Music application. Go to the menu bar, click on Music then select Preferences. A folder will open with General, Playback, Files, Restrictions, and Advanced options. Select Files. There you will see your Music Media folder location. Write this information down exactly. The format is: /Macintosh HD/Users/UserName/Music/Music/Media.
Now open the Sonos S2 controller on your device. My app is installed on my iPhone. Click on the cog (settings) at the lower right hand side of the screen. You will see the Settings screen, Select System, then Music Library, then Music Library Setup. Since I only have one music library, I deleted the existing music library address since it did not work. Now click Add Shared Music Library. Here is where all the information comes together. The COMPLETE network address to your Music library is as follows:
//Computer Name/Macintosh HD/Users/UserName/Music/Music/Media
Recall the that you found the Computer Name in your Sharing Folder and the UserName listed in the Music library address on YOUR computer.
Next add the user name and password of the user whose account holds the music library. If you have done everything correctly, the Sonos S2 controller will begin to index your library. The library will appear when the indexing is complete. Hope this helps!