0

(This post has been tagged "sony" for Sony Engineers to find, as per: https://developer.sony.com/develop/audio-control-api/get-support)

Hello. I have having a problem with the Sony Audio Control API. When formatting JSON requests to select Sound Fields, the following is successful:

{
    "id":4,
    "method":"setSoundSettings",
    "params":[{
        "settings":[{
            "target":"autoFormatDirect_2ch",
            "value":"2chStereo"
        }]
    }],
    "version":"1.1"
}

However, when "value" is set to "auto" instead of "2chStereo" it fails with:

{
    "error": [
        3,
        "illegal argument"
    ],
    "id": 4
}

According to the docs for setSoundSettings, "auto" is what I need to select AFD mode. https://developer.sony.com/develop/audio-control-api/api-references/api-overview-2#_setsoundsettings_v1_1

I am testing on a Sony STR-DN1080. Many thanks.

Shog9
  • 156,901
  • 35
  • 231
  • 235
grolschie
  • 2,163
  • 2
  • 12
  • 29

1 Answers1

0

By using the getSoundSettings

{
 "method":"getSoundSettings",
 "id":73,
 "params":[
  {
   "target":"autoFormatDirect_2ch"
  }
 ],
 "version":"1.1"
}

I get that for "autoFormatDirect_2ch" the following values are supported by STR-DN1080:

  • "2chStereo"
  • "multiStereo"
  • "direct"
  • "off"

but this is how you change settings for the A.F.D

If you want the receiver to use the AFD mode set the "soundField" to "audioFormatDecoding"

{
  "method":"setSoundSettings",
  "id":5,
  "params":[{
      "settings":[
        {
          "target":"soundField",
          "value":"audioFormatDecoding"
        }
      ]}
  ],
  "version":"1.1"
}

Unfortunately the list in the documentation of all valid inputs for the "setSoundSettings":"soundField" is not complete. So you have to use "getSoundSettings" to get all currently supported values.

Hope this helped

David - Sony
  • 161
  • 4
  • Thank you, David! That works. The documentation needs a bit of work, including removal of dead links to the API reference. Can you please tell me if there is a setting to select Spotify as in input? And also if selecting Neural:X soundField is possible please? – grolschie Sep 03 '18 at 23:17
  • Suggestion: add symbols in the documentation to signify which values are supported by each product/model. For example: 'In case "target" is "autoFormatDirect_2ch" ͣ ͨ ' where ͣ and ͨ are products/models. – grolschie Sep 03 '18 at 23:23
  • "Can you please tell me if there is a setting to select Spotify as in input?" @grolschie Unfortunately not via the Audio Control API, you can get close but not all the way. I think you can do it by using chromecast, but have not tested my self. – David - Sony Sep 04 '18 at 07:27
  • Thank you. I guess Sony's Music Center (Songpal) app uses another method of communication because Spotify appears in the list of inputs. What about the Neural:X sound field, is that possible? – grolschie Sep 04 '18 at 07:46
  • Sony's Music Center starts the spotify app and spotify is using chrome cast to connect to the speakers. To set the "Neural:X" you set the soundField to "neuralX" in stead of "audioFormatDecoding" – David - Sony Sep 04 '18 at 08:38
  • Thank you for that! The Spotify method is interesting. The Spotify app shows it's connected to the DN1080 via Spotify:Connect and the built-in Chromecast doesn't show up in the list of devices in the app. Interesting. – grolschie Sep 04 '18 at 10:25
  • David, are you able to forward a request to the API developers please? It would be awesome if they implemented a function to display the audio source format, like the Display Mode button does on the front panel, please. The "display" button on the remote does something else entirely! Thanks in advance. – grolschie Sep 27 '18 at 20:35
  • The receiver is using the proprietary communication API from Spotify, and it only fully works for payed subscriptions of Spotify. Think you can achieve the same functionality using one Spotify's API's, have a look at https://developer.spotify.com/ (note: there are multiple API's there, in case the first you look at don't works for your requirements). I have a vague recollection of seeing that the current source is Spotify, think it was from getPlayingContentInfo but I'm not able to check right now. – David - Sony Sep 28 '18 at 01:06