€•ZŒsphinx.addnodes”Œdocument”“”)�”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)�”}”(hhh]”(hŒ pending_xref”“”)�”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…”�”}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ//translations/zh_CN/driver-api/soundwire/stream”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)�”}”(hhh]”hŒChinese (Traditional)”…”�”}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/zh_TW/driver-api/soundwire/stream”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒItalian”…”�”}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/it_IT/driver-api/soundwire/stream”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒJapanese”…”�”}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/ja_JP/driver-api/soundwire/stream”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒKorean”…”�”}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/ko_KR/driver-api/soundwire/stream”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒPortuguese (Brazilian)”…”�”}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/pt_BR/driver-api/soundwire/stream”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)�”}”(hhh]”hŒSpanish”…”�”}”hh–sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ//translations/sp_SP/driver-api/soundwire/stream”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)�”}”(hhh]”(hŒtitle”“”)�”}”(hŒAudio Stream in SoundWire”h]”hŒAudio Stream in SoundWire”…”�”}”(hh¼h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhh·h²hh³ŒI/var/lib/git/docbuild/linux/Documentation/driver-api/soundwire/stream.rst”h´KubhŒ paragraph”“”)�”}”(hŒBAn audio stream is a logical or virtual connection created between”h]”hŒBAn audio stream is a logical or virtual connection created between”…”�”}”(hhÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhŒ block_quote”“”)�”}”(hŒ…(1) System memory buffer(s) and Codec(s) (2) DSP memory buffer(s) and Codec(s) (3) FIFO(s) and Codec(s) (4) Codec(s) and Codec(s) ”h]”hŒenumerated_list”“”)�”}”(hhh]”(hŒ list_item”“”)�”}”(hŒ%System memory buffer(s) and Codec(s) ”h]”hÌ)�”}”(hŒ$System memory buffer(s) and Codec(s)”h]”hŒ$System memory buffer(s) and Codec(s)”…”�”}”(hhìh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khhèubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhhãubhç)�”}”(hŒ"DSP memory buffer(s) and Codec(s) ”h]”hÌ)�”}”(hŒ!DSP memory buffer(s) and Codec(s)”h]”hŒ!DSP memory buffer(s) and Codec(s)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhhãubhç)�”}”(hŒFIFO(s) and Codec(s) ”h]”hÌ)�”}”(hŒFIFO(s) and Codec(s)”h]”hŒFIFO(s) and Codec(s)”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hjubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhhãubhç)�”}”(hŒCodec(s) and Codec(s) ”h]”hÌ)�”}”(hŒCodec(s) and Codec(s)”h]”hŒCodec(s) and Codec(s)”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K hj0ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhhãubeh}”(h]”h ]”h"]”h$]”h&]”Œenumtype”Œarabic”Œprefix”Œ(”Œsuffix”Œ)”uh1háhhÝubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÊh´Khh·h²hubhÌ)�”}”(hŒÇwhich is typically driven by a DMA(s) channel through the data link. An audio stream contains one or more channels of data. All channels within stream must have same sample rate and same sample size.”h]”hŒÇwhich is typically driven by a DMA(s) channel through the data link. An audio stream contains one or more channels of data. All channels within stream must have same sample rate and same sample size.”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hŒ“Assume a stream with two channels (Left & Right) is opened using SoundWire interface. Below are some ways a stream can be represented in SoundWire.”h]”hŒ“Assume a stream with two channels (Left & Right) is opened using SoundWire interface. Below are some ways a stream can be represented in SoundWire.”…”�”}”(hjhh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khh·h²hubhÌ)�”}”(hŒ?Stream Sample in memory (System memory, DSP memory or FIFOs) ::”h]”hŒ +---------------+”h]”hX'+---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | | | 1 | | | Data Signal | | | L + R +----------------------------------+ L + R | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+”…”�”}”hj¤sbah}”(h]”h ]”h"]”h$]”h&]”j”j•uh1j„h³hÊh´Khh·h²hubhÌ)�”}”(hŒExample 2: Stereo Stream with L and R channels is captured from Slave to Master. Both Master and Slave is using single port. ::”h]”hŒ|Example 2: Stereo Stream with L and R channels is captured from Slave to Master. Both Master and Slave is using single port.”…”�”}”(hj²h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K)hh·h²hubj…)�”}”(hX'+---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | | | 1 | | | Data Signal | | | L + R +----------------------------------+ L + R | | (Data) | Data Direction | (Data) | +---------------+ <-----------------------+ +---------------+”h]”hX'+---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | | | 1 | | | Data Signal | | | L + R +----------------------------------+ L + R | | (Data) | Data Direction | (Data) | +---------------+ <-----------------------+ +---------------+”…”�”}”hjÀsbah}”(h]”h ]”h"]”h$]”h&]”j”j•uh1j„h³hÊh´K-hh·h²hubhÌ)�”}”(hŒ·Example 3: Stereo Stream with L and R channels is rendered by Master. Each of the L and R channel is received by two different Slaves. Master and both Slaves are using single port. ::”h]”hŒ´Example 3: Stereo Stream with L and R channels is rendered by Master. Each of the L and R channel is received by two different Slaves. Master and both Slaves are using single port.”…”�”}”(hjÎh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K7hh·h²hubj…)�”}”(hX‡+---------------+ Clock Signal +---------------+ | Master +---------+------------------------+ Slave | | Interface | | | Interface | | | | | 1 | | | | Data Signal | | | L + R +---+------------------------------+ L | | (Data) | | | Data Direction | (Data) | +---------------+ | | +-------------> +---------------+ | | | | | | +---------------+ | +----------------------> | Slave | | | Interface | | | 2 | | | | +----------------------------> | R | | (Data) | +---------------+”h]”hX‡+---------------+ Clock Signal +---------------+ | Master +---------+------------------------+ Slave | | Interface | | | Interface | | | | | 1 | | | | Data Signal | | | L + R +---+------------------------------+ L | | (Data) | | | Data Direction | (Data) | +---------------+ | | +-------------> +---------------+ | | | | | | +---------------+ | +----------------------> | Slave | | | Interface | | | 2 | | | | +----------------------------> | R | | (Data) | +---------------+”…”�”}”hjÜsbah}”(h]”h ]”h"]”h$]”h&]”j”j•uh1j„h³hÊh´K;hh·h²hubhÌ)�”}”(hX^Example 4: Stereo Stream with L and R channels is rendered by Master. Both of the L and R channels are received by two different Slaves. Master and both Slaves are using single port handling L+R. Each Slave device processes the L + R data locally, typically based on static configuration or dynamic orientation, and may drive one or more speakers. ::”h]”hX[Example 4: Stereo Stream with L and R channels is rendered by Master. Both of the L and R channels are received by two different Slaves. Master and both Slaves are using single port handling L+R. Each Slave device processes the L + R data locally, typically based on static configuration or dynamic orientation, and may drive one or more speakers.”…”�”}”(hjêh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KNhh·h²hubj…)�”}”(hX‡+---------------+ Clock Signal +---------------+ | Master +---------+------------------------+ Slave | | Interface | | | Interface | | | | | 1 | | | | Data Signal | | | L + R +---+------------------------------+ L + R | | (Data) | | | Data Direction | (Data) | +---------------+ | | +-------------> +---------------+ | | | | | | +---------------+ | +----------------------> | Slave | | | Interface | | | 2 | | | | +----------------------------> | L + R | | (Data) | +---------------+”h]”hX‡+---------------+ Clock Signal +---------------+ | Master +---------+------------------------+ Slave | | Interface | | | Interface | | | | | 1 | | | | Data Signal | | | L + R +---+------------------------------+ L + R | | (Data) | | | Data Direction | (Data) | +---------------+ | | +-------------> +---------------+ | | | | | | +---------------+ | +----------------------> | Slave | | | Interface | | | 2 | | | | +----------------------------> | L + R | | (Data) | +---------------+”…”�”}”hjøsbah}”(h]”h ]”h"]”h$]”h&]”j”j•uh1j„h³hÊh´KUhh·h²hubhÌ)�”}”(hŒ�Example 5: Stereo Stream with L and R channel is rendered by two different Ports of the Master and is received by only single Port of the Slave interface. ::”h]”hŒšExample 5: Stereo Stream with L and R channel is rendered by two different Ports of the Master and is received by only single Port of the Slave interface.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Khhh·h²hubj…)�”}”(hX+--------------------+ | | | +--------------+ +----------------+ | | || | | | | Data Port || L Channel | | | | 1 |------------+ | | | | L Channel || | +-----+----+ | | | (Data) || | L + R Channel || Data | | | Master +----------+ | +---+---------> || Port | | | Interface | | || 1 | | | +--------------+ | || | | | | || | +----------+ | | | Data Port |------------+ | | | | 2 || R Channel | Slave | | | R Channel || | Interface | | | (Data) || | 1 | | +--------------+ Clock Signal | L + R | | +---------------------------> | (Data) | +--------------------+ | | +----------------+”h]”hX+--------------------+ | | | +--------------+ +----------------+ | | || | | | | Data Port || L Channel | | | | 1 |------------+ | | | | L Channel || | +-----+----+ | | | (Data) || | L + R Channel || Data | | | Master +----------+ | +---+---------> || Port | | | Interface | | || 1 | | | +--------------+ | || | | | | || | +----------+ | | | Data Port |------------+ | | | | 2 || R Channel | Slave | | | R Channel || | Interface | | | (Data) || | 1 | | +--------------+ Clock Signal | L + R | | +---------------------------> | (Data) | +--------------------+ | | +----------------+”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j”j•uh1j„h³hÊh´Klhh·h²hubhÌ)�”}”(hŒßExample 6: Stereo Stream with L and R channel is rendered by 2 Masters, each rendering one channel, and is received by two different Slaves, each receiving one channel. Both Masters and both Slaves are using single port. ::”h]”hŒÜExample 6: Stereo Stream with L and R channel is rendered by 2 Masters, each rendering one channel, and is received by two different Slaves, each receiving one channel. Both Masters and both Slaves are using single port.”…”�”}”(hj"h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K�hh·h²hubj…)�”}”(hXP+---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 1 | | 1 | | | Data Signal | | | L +----------------------------------+ L | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+ +---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 2 | | 2 | | | Data Signal | | | R +----------------------------------+ R | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+”h]”hXP+---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 1 | | 1 | | | Data Signal | | | L +----------------------------------+ L | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+ +---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 2 | | 2 | | | Data Signal | | | R +----------------------------------+ R | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+”…”�”}”hj0sbah}”(h]”h ]”h"]”h$]”h&]”j”j•uh1j„h³hÊh´K…hh·h²hubhÌ)�”}”(hŒ×Example 7: Stereo Stream with L and R channel is rendered by 2 Masters, each rendering both channels. Each Slave receives L + R. This is the same application as Example 4 but with Slaves placed on separate links. ::”h]”hŒÔExample 7: Stereo Stream with L and R channel is rendered by 2 Masters, each rendering both channels. Each Slave receives L + R. This is the same application as Example 4 but with Slaves placed on separate links.”…”�”}”(hj>h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K—hh·h²hubj…)�”}”(hXP+---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 1 | | 1 | | | Data Signal | | | L + R +----------------------------------+ L + R | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+ +---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 2 | | 2 | | | Data Signal | | | L + R +----------------------------------+ L + R | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+”h]”hXP+---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 1 | | 1 | | | Data Signal | | | L + R +----------------------------------+ L + R | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+ +---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 2 | | 2 | | | Data Signal | | | L + R +----------------------------------+ L + R | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+”…”�”}”hjLsbah}”(h]”h ]”h"]”h$]”h&]”j”j•uh1j„h³hÊh´Kœhh·h²hubhÌ)�”}”(hŒuExample 8: 4-channel Stream is rendered by 2 Masters, each rendering a 2 channels. Each Slave receives 2 channels. ::”h]”hŒrExample 8: 4-channel Stream is rendered by 2 Masters, each rendering a 2 channels. Each Slave receives 2 channels.”…”�”}”(hjZh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´K®hh·h²hubj…)�”}”(hXP+---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 1 | | 1 | | | Data Signal | | | L1 + R1 +----------------------------------+ L1 + R1 | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+ +---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 2 | | 2 | | | Data Signal | | | L2 + R2 +----------------------------------+ L2 + R2 | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+”h]”hXP+---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 1 | | 1 | | | Data Signal | | | L1 + R1 +----------------------------------+ L1 + R1 | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+ +---------------+ Clock Signal +---------------+ | Master +----------------------------------+ Slave | | Interface | | Interface | | 2 | | 2 | | | Data Signal | | | L2 + R2 +----------------------------------+ L2 + R2 | | (Data) | Data Direction | (Data) | +---------------+ +-----------------------> +---------------+”…”�”}”hjhsbah}”(h]”h ]”h"]”h$]”h&]”j”j•uh1j„h³hÊh´K±hh·h²hubhÌ)�”}”(hX,Note1: In multi-link cases like above, to lock, one would acquire a global lock and then go on locking bus instances. But, in this case the caller framework(ASoC DPCM) guarantees that stream operations on a card are always serialized. So, there is no race condition and hence no need for global lock.”h]”hX,Note1: In multi-link cases like above, to lock, one would acquire a global lock and then go on locking bus instances. But, in this case the caller framework(ASoC DPCM) guarantees that stream operations on a card are always serialized. So, there is no race condition and hence no need for global lock.”…”�”}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÃhh·h²hubhÌ)�”}”(hX Note2: A Slave device may be configured to receive all channels transmitted on a link for a given Stream (Example 4) or just a subset of the data (Example 3). The configuration of the Slave device is not handled by a SoundWire subsystem API, but instead by the snd_soc_dai_set_tdm_slot() API. The platform or machine driver will typically configure which of the slots are used. For Example 4, the same slots would be used by all Devices, while for Example 3 the Slave Device1 would use e.g. Slot 0 and Slave device2 slot 1.”h]”hX Note2: A Slave device may be configured to receive all channels transmitted on a link for a given Stream (Example 4) or just a subset of the data (Example 3). The configuration of the Slave device is not handled by a SoundWire subsystem API, but instead by the snd_soc_dai_set_tdm_slot() API. The platform or machine driver will typically configure which of the slots are used. For Example 4, the same slots would be used by all Devices, while for Example 3 the Slave Device1 would use e.g. Slot 0 and Slave device2 slot 1.”…”�”}”(hj„h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÉhh·h²hubhÌ)�”}”(hŒúNote3: Multiple Sink ports can extract the same information for the same bitSlots in the SoundWire frame, however multiple Source ports shall be configured with different bitSlot configurations. This is the same limitation as with I2S/PCM TDM usages.”h]”hŒúNote3: Multiple Sink ports can extract the same information for the same bitSlots in the SoundWire frame, however multiple Source ports shall be configured with different bitSlot configurations. This is the same limitation as with I2S/PCM TDM usages.”…”�”}”(hj’h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÒhh·h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒ SoundWire Stream Management flow”h]”hŒ SoundWire Stream Management flow”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´KØubh¶)�”}”(hhh]”(h»)�”}”(hŒStream definitions”h]”hŒStream definitions”…”�”}”(hj´h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj±h²hh³hÊh´KÛubhÜ)�”}”(hX7(1) Current stream: This is classified as the stream on which operation has to be performed like prepare, enable, disable, de-prepare etc. (2) Active stream: This is classified as the stream which is already active on Bus other than current stream. There can be multiple active streams on the Bus. ”h]”hâ)�”}”(hhh]”(hç)�”}”(hŒ‡Current stream: This is classified as the stream on which operation has to be performed like prepare, enable, disable, de-prepare etc. ”h]”hÌ)�”}”(hŒ†Current stream: This is classified as the stream on which operation has to be performed like prepare, enable, disable, de-prepare etc.”h]”hŒ†Current stream: This is classified as the stream on which operation has to be performed like prepare, enable, disable, de-prepare etc.”…”�”}”(hjÍh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´KÝhjÉubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjÆubhç)�”}”(hŒ›Active stream: This is classified as the stream which is already active on Bus other than current stream. There can be multiple active streams on the Bus. ”h]”hÌ)�”}”(hŒšActive stream: This is classified as the stream which is already active on Bus other than current stream. There can be multiple active streams on the Bus.”h]”hŒšActive stream: This is classified as the stream which is already active on Bus other than current stream. There can be multiple active streams on the Bus.”…”�”}”(hjåh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kàhjáubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjÆubeh}”(h]”h ]”h"]”h$]”h&]”jNjOjPjQjRjSuh1háhjÂubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÊh´KÝhj±h²hubhÌ)�”}”(hXSoundWire Bus manages stream operations for each stream getting rendered/captured on the SoundWire Bus. This section explains Bus operations done for each of the stream allocated/released on Bus. Following are the stream states maintained by the Bus for each of the audio stream.”h]”hXSoundWire Bus manages stream operations for each stream getting rendered/captured on the SoundWire Bus. This section explains Bus operations done for each of the stream allocated/released on Bus. Following are the stream states maintained by the Bus for each of the audio stream.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kähj±h²hubeh}”(h]”Œstream-definitions”ah ]”h"]”Œstream definitions”ah$]”h&]”uh1hµhj h²hh³hÊh´KÛubh¶)�”}”(hhh]”(h»)�”}”(hŒSoundWire stream states”h]”hŒSoundWire stream states”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjh²hh³hÊh´KëubhÌ)�”}”(hŒHBelow shows the SoundWire stream states and state transition diagram. ::”h]”hŒEBelow shows the SoundWire stream states and state transition diagram.”…”�”}”(hj,h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kíhjh²hubj…)�”}”(hXH+-----------+ +------------+ +----------+ +----------+ | ALLOCATED +---->| CONFIGURED +---->| PREPARED +---->| ENABLED | | STATE | | STATE | | STATE | | STATE | +-----------+ +------------+ +---+--+---+ +----+-----+ ^ ^ ^ | | | __| |___________ | | | | v | v +----------+ +-----+------+ +-+--+-----+ | RELEASED |<----------+ DEPREPARED |<-------+ DISABLED | | STATE | | STATE | | STATE | +----------+ +------------+ +----------+”h]”hXH+-----------+ +------------+ +----------+ +----------+ | ALLOCATED +---->| CONFIGURED +---->| PREPARED +---->| ENABLED | | STATE | | STATE | | STATE | | STATE | +-----------+ +------------+ +---+--+---+ +----+-----+ ^ ^ ^ | | | __| |___________ | | | | v | v +----------+ +-----+------+ +-+--+-----+ | RELEASED |<----------+ DEPREPARED |<-------+ DISABLED | | STATE | | STATE | | STATE | +----------+ +------------+ +----------+”…”�”}”hj:sbah}”(h]”h ]”h"]”h$]”h&]”j”j•uh1j„h³hÊh´Kïhjh²hubhÌ)�”}”(hXNOTE: State transitions between ``SDW_STREAM_ENABLED`` and ``SDW_STREAM_DISABLED`` are only relevant when then INFO_PAUSE flag is supported at the ALSA/ASoC level. Likewise the transition between ``SDW_DISABLED_STATE`` and ``SDW_PREPARED_STATE`` depends on the INFO_RESUME flag.”h]”(hŒ NOTE: State transitions between ”…”�”}”(hjHh²hh³Nh´NubhŒliteral”“”)�”}”(hŒ``SDW_STREAM_ENABLED``”h]”hŒSDW_STREAM_ENABLED”…”�”}”(hjRh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjHubhŒ and ”…”�”}”(hjHh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_DISABLED``”h]”hŒSDW_STREAM_DISABLED”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjHubhŒr are only relevant when then INFO_PAUSE flag is supported at the ALSA/ASoC level. Likewise the transition between ”…”�”}”(hjHh²hh³Nh´NubjQ)�”}”(hŒ``SDW_DISABLED_STATE``”h]”hŒSDW_DISABLED_STATE”…”�”}”(hjvh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjHubhŒ and ”…”�”}”(hjHh²hh³Nh´NubjQ)�”}”(hŒ``SDW_PREPARED_STATE``”h]”hŒSDW_PREPARED_STATE”…”�”}”(hjˆh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjHubhŒ! depends on the INFO_RESUME flag.”…”�”}”(hjHh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Kýhjh²hubhÌ)�”}”(hŒÔNOTE2: The framework implements basic state transition checks, but does not e.g. check if a transition from DISABLED to ENABLED is valid on a specific platform. Such tests need to be added at the ALSA/ASoC level.”h]”hŒÔNOTE2: The framework implements basic state transition checks, but does not e.g. check if a transition from DISABLED to ENABLED is valid on a specific platform. Such tests need to be added at the ALSA/ASoC level.”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjh²hubeh}”(h]”Œsoundwire-stream-states”ah ]”h"]”Œsoundwire stream states”ah$]”h&]”uh1hµhj h²hh³hÊh´Këubh¶)�”}”(hhh]”(h»)�”}”(hŒStream State Operations”h]”hŒStream State Operations”…”�”}”(hj¹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj¶h²hh³hÊh´M ubhÌ)�”}”(hŒtBelow section explains the operations done by the Bus on Master(s) and Slave(s) as part of stream state transitions.”h]”hŒtBelow section explains the operations done by the Bus on Master(s) and Slave(s) as part of stream state transitions.”…”�”}”(hjÇh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hj¶h²hubh¶)�”}”(hhh]”(h»)�”}”(hŒSDW_STREAM_ALLOCATED”h]”hŒSDW_STREAM_ALLOCATED”…”�”}”(hjØh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjÕh²hh³hÊh´MubhÌ)�”}”(hŒwAllocation state for stream. This is the entry state of the stream. Operations performed before entering in this state:”h]”hŒwAllocation state for stream. This is the entry state of the stream. Operations performed before entering in this state:”…”�”}”(hjæh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjÕh²hubhÜ)�”}”(hX¤(1) A stream runtime is allocated for the stream. This stream runtime is used as a reference for all the operations performed on the stream. (2) The resources required for holding stream runtime information are allocated and initialized. This holds all stream related information such as stream type (PCM/PDM) and parameters, Master and Slave interface associated with the stream, stream state etc. ”h]”hâ)�”}”(hhh]”(hç)�”}”(hŒ‰A stream runtime is allocated for the stream. This stream runtime is used as a reference for all the operations performed on the stream. ”h]”hÌ)�”}”(hŒˆA stream runtime is allocated for the stream. This stream runtime is used as a reference for all the operations performed on the stream.”h]”hŒˆA stream runtime is allocated for the stream. This stream runtime is used as a reference for all the operations performed on the stream.”…”�”}”(hjÿh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjûubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjøubhç)�”}”(hŒþThe resources required for holding stream runtime information are allocated and initialized. This holds all stream related information such as stream type (PCM/PDM) and parameters, Master and Slave interface associated with the stream, stream state etc. ”h]”hÌ)�”}”(hŒýThe resources required for holding stream runtime information are allocated and initialized. This holds all stream related information such as stream type (PCM/PDM) and parameters, Master and Slave interface associated with the stream, stream state etc.”h]”hŒýThe resources required for holding stream runtime information are allocated and initialized. This holds all stream related information such as stream type (PCM/PDM) and parameters, Master and Slave interface associated with the stream, stream state etc.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mhjubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjøubeh}”(h]”h ]”h"]”h$]”h&]”jNjOjPjQjRjSuh1háhjôubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÊh´MhjÕh²hubhÌ)�”}”(hŒ[After all above operations are successful, stream state is set to ``SDW_STREAM_ALLOCATED``.”h]”(hŒBAfter all above operations are successful, stream state is set to ”…”�”}”(hj7h²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_ALLOCATED``”h]”hŒSDW_STREAM_ALLOCATED”…”�”}”(hj?h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhj7ubhŒ.”…”�”}”(hj7h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MhjÕh²hubhÌ)�”}”(hŒªBus implements below API for allocate a stream which needs to be called once per stream. From ASoC DPCM framework, this stream state maybe linked to .startup() operation.”h]”hŒªBus implements below API for allocate a stream which needs to be called once per stream. From ASoC DPCM framework, this stream state maybe linked to .startup() operation.”…”�”}”(hjWh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M hjÕh²hubj…)�”}”(hŒDint sdw_alloc_stream(char * stream_name, enum sdw_stream_type type);”h]”hŒDint sdw_alloc_stream(char * stream_name, enum sdw_stream_type type);”…”�”}”hjesbah}”(h]”h ]”h"]”h$]”h&]”j”j•Œforce”‰Œlanguage”Œc”Œhighlight_args”}”uh1j„h³hÊh´M$hjÕh²hubhÌ)�”}”(hŒÛThe SoundWire core provides a sdw_startup_stream() helper function, typically called during a dailink .startup() callback, which performs stream allocation and sets the stream pointer for all DAIs connected to a stream.”h]”hŒÛThe SoundWire core provides a sdw_startup_stream() helper function, typically called during a dailink .startup() callback, which performs stream allocation and sets the stream pointer for all DAIs connected to a stream.”…”�”}”(hjxh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M(hjÕh²hubeh}”(h]”Œsdw-stream-allocated”ah ]”h"]”Œsdw_stream_allocated”ah$]”h&]”uh1hµhj¶h²hh³hÊh´Mubh¶)�”}”(hhh]”(h»)�”}”(hŒSDW_STREAM_CONFIGURED”h]”hŒSDW_STREAM_CONFIGURED”…”�”}”(hj‘h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjŽh²hh³hÊh´M.ubhÌ)�”}”(hŒRConfiguration state of stream. Operations performed before entering in this state:”h]”hŒRConfiguration state of stream. Operations performed before entering in this state:”…”�”}”(hjŸh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M0hjŽh²hubhÜ)�”}”(hX±(1) The resources allocated for stream information in SDW_STREAM_ALLOCATED state are updated here. This includes stream parameters, Master(s) and Slave(s) runtime information associated with current stream. (2) All the Master(s) and Slave(s) associated with current stream provide the port information to Bus which includes port numbers allocated by Master(s) and Slave(s) for current stream and their channel mask. ”h]”hâ)�”}”(hhh]”(hç)�”}”(hŒËThe resources allocated for stream information in SDW_STREAM_ALLOCATED state are updated here. This includes stream parameters, Master(s) and Slave(s) runtime information associated with current stream. ”h]”hÌ)�”}”(hŒÊThe resources allocated for stream information in SDW_STREAM_ALLOCATED state are updated here. This includes stream parameters, Master(s) and Slave(s) runtime information associated with current stream.”h]”hŒÊThe resources allocated for stream information in SDW_STREAM_ALLOCATED state are updated here. This includes stream parameters, Master(s) and Slave(s) runtime information associated with current stream.”…”�”}”(hj¸h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M3hj´ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhj±ubhç)�”}”(hŒÍAll the Master(s) and Slave(s) associated with current stream provide the port information to Bus which includes port numbers allocated by Master(s) and Slave(s) for current stream and their channel mask. ”h]”hÌ)�”}”(hŒÌAll the Master(s) and Slave(s) associated with current stream provide the port information to Bus which includes port numbers allocated by Master(s) and Slave(s) for current stream and their channel mask.”h]”hŒÌAll the Master(s) and Slave(s) associated with current stream provide the port information to Bus which includes port numbers allocated by Master(s) and Slave(s) for current stream and their channel mask.”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M7hjÌubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhj±ubeh}”(h]”h ]”h"]”h$]”h&]”jNjOjPjQjRjSuh1háhj­ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÊh´M3hjŽh²hubhÌ)�”}”(hŒ\After all above operations are successful, stream state is set to ``SDW_STREAM_CONFIGURED``.”h]”(hŒBAfter all above operations are successful, stream state is set to ”…”�”}”(hjðh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_CONFIGURED``”h]”hŒSDW_STREAM_CONFIGURED”…”�”}”(hjøh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjðubhŒ.”…”�”}”(hjðh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M;hjŽh²hubhÌ)�”}”(hXBus implements below APIs for CONFIG state which needs to be called by the respective Master(s) and Slave(s) associated with stream. These APIs can only be invoked once by respective Master(s) and Slave(s). From ASoC DPCM framework, this stream state is linked to .hw_params() operation.”h]”hXBus implements below APIs for CONFIG state which needs to be called by the respective Master(s) and Slave(s) associated with stream. These APIs can only be invoked once by respective Master(s) and Slave(s). From ASoC DPCM framework, this stream state is linked to .hw_params() operation.”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M>hjŽh²hubj…)�”}”(hX±int sdw_stream_add_master(struct sdw_bus * bus, struct sdw_stream_config * stream_config, const struct sdw_ports_config * ports_config, struct sdw_stream_runtime * stream); int sdw_stream_add_slave(struct sdw_slave * slave, struct sdw_stream_config * stream_config, const struct sdw_ports_config * ports_config, struct sdw_stream_runtime * stream);”h]”hX±int sdw_stream_add_master(struct sdw_bus * bus, struct sdw_stream_config * stream_config, const struct sdw_ports_config * ports_config, struct sdw_stream_runtime * stream); int sdw_stream_add_slave(struct sdw_slave * slave, struct sdw_stream_config * stream_config, const struct sdw_ports_config * ports_config, struct sdw_stream_runtime * stream);”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j”j•js‰jtjujv}”uh1j„h³hÊh´MChjŽh²hubeh}”(h]”Œsdw-stream-configured”ah ]”h"]”Œsdw_stream_configured”ah$]”h&]”uh1hµhj¶h²hh³hÊh´M.ubh¶)�”}”(hhh]”(h»)�”}”(hŒSDW_STREAM_PREPARED”h]”hŒSDW_STREAM_PREPARED”…”�”}”(hj8h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj5h²hh³hÊh´MQubhÌ)�”}”(hŒLPrepare state of stream. Operations performed before entering in this state:”h]”hŒLPrepare state of stream. Operations performed before entering in this state:”…”�”}”(hjFh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MShj5h²hubhÜ)�”}”(hXx(0) Steps 1 and 2 are omitted in the case of a resume operation, where the bus bandwidth is known. (1) Bus parameters such as bandwidth, frame shape, clock frequency, are computed based on current stream as well as already active stream(s) on Bus. Re-computation is required to accommodate current stream on the Bus. (2) Transport and port parameters of all Master(s) and Slave(s) port(s) are computed for the current as well as already active stream based on frame shape and clock frequency computed in step 1. (3) Computed Bus and transport parameters are programmed in Master(s) and Slave(s) registers. The banked registers programming is done on the alternate bank (bank currently unused). Port(s) are enabled for the already active stream(s) on the alternate bank (bank currently unused). This is done in order to not disrupt already active stream(s). (4) Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect. (5) Ports of Master(s) and Slave(s) for current stream are prepared by programming PrepareCtrl register. ”h]”hâ)�”}”(hhh]”(hç)�”}”(hŒ_Steps 1 and 2 are omitted in the case of a resume operation, where the bus bandwidth is known. ”h]”hÌ)�”}”(hŒ^Steps 1 and 2 are omitted in the case of a resume operation, where the bus bandwidth is known.”h]”hŒ^Steps 1 and 2 are omitted in the case of a resume operation, where the bus bandwidth is known.”…”�”}”(hj_h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MUhj[ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjXubhç)�”}”(hŒÖBus parameters such as bandwidth, frame shape, clock frequency, are computed based on current stream as well as already active stream(s) on Bus. Re-computation is required to accommodate current stream on the Bus. ”h]”hÌ)�”}”(hŒÕBus parameters such as bandwidth, frame shape, clock frequency, are computed based on current stream as well as already active stream(s) on Bus. Re-computation is required to accommodate current stream on the Bus.”h]”hŒÕBus parameters such as bandwidth, frame shape, clock frequency, are computed based on current stream as well as already active stream(s) on Bus. Re-computation is required to accommodate current stream on the Bus.”…”�”}”(hjwh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MXhjsubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjXubhç)�”}”(hŒ¿Transport and port parameters of all Master(s) and Slave(s) port(s) are computed for the current as well as already active stream based on frame shape and clock frequency computed in step 1. ”h]”hÌ)�”}”(hŒ¾Transport and port parameters of all Master(s) and Slave(s) port(s) are computed for the current as well as already active stream based on frame shape and clock frequency computed in step 1.”h]”hŒ¾Transport and port parameters of all Master(s) and Slave(s) port(s) are computed for the current as well as already active stream based on frame shape and clock frequency computed in step 1.”…”�”}”(hj�h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M]hj‹ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjXubhç)�”}”(hXUComputed Bus and transport parameters are programmed in Master(s) and Slave(s) registers. The banked registers programming is done on the alternate bank (bank currently unused). Port(s) are enabled for the already active stream(s) on the alternate bank (bank currently unused). This is done in order to not disrupt already active stream(s). ”h]”hÌ)�”}”(hXTComputed Bus and transport parameters are programmed in Master(s) and Slave(s) registers. The banked registers programming is done on the alternate bank (bank currently unused). Port(s) are enabled for the already active stream(s) on the alternate bank (bank currently unused). This is done in order to not disrupt already active stream(s).”h]”hXTComputed Bus and transport parameters are programmed in Master(s) and Slave(s) registers. The banked registers programming is done on the alternate bank (bank currently unused). Port(s) are enabled for the already active stream(s) on the alternate bank (bank currently unused). This is done in order to not disrupt already active stream(s).”…”�”}”(hj§h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mahj£ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjXubhç)�”}”(hŒ}Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect. ”h]”hÌ)�”}”(hŒ|Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect.”h]”hŒ|Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect.”…”�”}”(hj¿h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mghj»ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjXubhç)�”}”(hŒePorts of Master(s) and Slave(s) for current stream are prepared by programming PrepareCtrl register. ”h]”hÌ)�”}”(hŒdPorts of Master(s) and Slave(s) for current stream are prepared by programming PrepareCtrl register.”h]”hŒdPorts of Master(s) and Slave(s) for current stream are prepared by programming PrepareCtrl register.”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MjhjÓubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjXubeh}”(h]”h ]”h"]”h$]”h&]”jNjOjPjQjRjSŒstart”Kuh1háhjTubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÊh´MUhj5h²hubhÌ)�”}”(hŒZAfter all above operations are successful, stream state is set to ``SDW_STREAM_PREPARED``.”h]”(hŒBAfter all above operations are successful, stream state is set to ”…”�”}”(hjøh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_PREPARED``”h]”hŒSDW_STREAM_PREPARED”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjøubhŒ.”…”�”}”(hjøh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mmhj5h²hubhÌ)�”}”(hX<Bus implements below API for PREPARE state which needs to be called once per stream. From ASoC DPCM framework, this stream state is linked to .prepare() operation. Since the .trigger() operations may not follow the .prepare(), a direct transition from ``SDW_STREAM_PREPARED`` to ``SDW_STREAM_DEPREPARED`` is allowed.”h]”(hŒüBus implements below API for PREPARE state which needs to be called once per stream. From ASoC DPCM framework, this stream state is linked to .prepare() operation. Since the .trigger() operations may not follow the .prepare(), a direct transition from ”…”�”}”(hjh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_PREPARED``”h]”hŒSDW_STREAM_PREPARED”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjubhŒ to ”…”�”}”(hjh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_DEPREPARED``”h]”hŒSDW_STREAM_DEPREPARED”…”�”}”(hj2h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjubhŒ is allowed.”…”�”}”(hjh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mphj5h²hubj…)�”}”(hŒ;int sdw_prepare_stream(struct sdw_stream_runtime * stream);”h]”hŒ;int sdw_prepare_stream(struct sdw_stream_runtime * stream);”…”�”}”hjJsbah}”(h]”h ]”h"]”h$]”h&]”j”j•js‰jtjujv}”uh1j„h³hÊh´Mvhj5h²hubeh}”(h]”Œsdw-stream-prepared”ah ]”h"]”Œsdw_stream_prepared”ah$]”h&]”uh1hµhj¶h²hh³hÊh´MQubh¶)�”}”(hhh]”(h»)�”}”(hŒSDW_STREAM_ENABLED”h]”hŒSDW_STREAM_ENABLED”…”�”}”(hjdh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhjah²hh³hÊh´M|ubhÌ)�”}”(hŒ‚Enable state of stream. The data port(s) are enabled upon entering this state. Operations performed before entering in this state:”h]”hŒ‚Enable state of stream. The data port(s) are enabled upon entering this state. Operations performed before entering in this state:”…”�”}”(hjrh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M~hjah²hubhÜ)�”}”(hX(1) All the values computed in SDW_STREAM_PREPARED state are programmed in alternate bank (bank currently unused). It includes programming of already active stream(s) as well. (2) All the Master(s) and Slave(s) port(s) for the current stream are enabled on alternate bank (bank currently unused) by programming ChannelEn register. (3) Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect and port(s) associated with current stream are enabled. ”h]”hâ)�”}”(hhh]”(hç)�”}”(hŒ¬All the values computed in SDW_STREAM_PREPARED state are programmed in alternate bank (bank currently unused). It includes programming of already active stream(s) as well. ”h]”hÌ)�”}”(hŒ«All the values computed in SDW_STREAM_PREPARED state are programmed in alternate bank (bank currently unused). It includes programming of already active stream(s) as well.”h]”hŒ«All the values computed in SDW_STREAM_PREPARED state are programmed in alternate bank (bank currently unused). It includes programming of already active stream(s) as well.”…”�”}”(hj‹h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M�hj‡ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhj„ubhç)�”}”(hŒ—All the Master(s) and Slave(s) port(s) for the current stream are enabled on alternate bank (bank currently unused) by programming ChannelEn register. ”h]”hÌ)�”}”(hŒ–All the Master(s) and Slave(s) port(s) for the current stream are enabled on alternate bank (bank currently unused) by programming ChannelEn register.”h]”hŒ–All the Master(s) and Slave(s) port(s) for the current stream are enabled on alternate bank (bank currently unused) by programming ChannelEn register.”…”�”}”(hj£h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M…hjŸubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhj„ubhç)�”}”(hŒ´Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect and port(s) associated with current stream are enabled. ”h]”hÌ)�”}”(hŒ³Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect and port(s) associated with current stream are enabled.”h]”hŒ³Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect and port(s) associated with current stream are enabled.”…”�”}”(hj»h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M‰hj·ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhj„ubeh}”(h]”h ]”h"]”h$]”h&]”jNjOjPjQjRjSuh1háhj€ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÊh´M�hjah²hubhÌ)�”}”(hŒYAfter all above operations are successful, stream state is set to ``SDW_STREAM_ENABLED``.”h]”(hŒBAfter all above operations are successful, stream state is set to ”…”�”}”(hjÛh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_ENABLED``”h]”hŒSDW_STREAM_ENABLED”…”�”}”(hjãh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjÛubhŒ.”…”�”}”(hjÛh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M�hjah²hubhÌ)�”}”(hŒ¨Bus implements below API for ENABLE state which needs to be called once per stream. From ASoC DPCM framework, this stream state is linked to .trigger() start operation.”h]”hŒ¨Bus implements below API for ENABLE state which needs to be called once per stream. From ASoC DPCM framework, this stream state is linked to .trigger() start operation.”…”�”}”(hjûh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M�hjah²hubj…)�”}”(hŒ:int sdw_enable_stream(struct sdw_stream_runtime * stream);”h]”hŒ:int sdw_enable_stream(struct sdw_stream_runtime * stream);”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”j”j•js‰jtjujv}”uh1j„h³hÊh´M”hjah²hubeh}”(h]”Œsdw-stream-enabled”ah ]”h"]”Œsdw_stream_enabled”ah$]”h&]”uh1hµhj¶h²hh³hÊh´M|ubh¶)�”}”(hhh]”(h»)�”}”(hŒSDW_STREAM_DISABLED”h]”hŒSDW_STREAM_DISABLED”…”�”}”(hj#h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´M™ubhÌ)�”}”(hŒƒDisable state of stream. The data port(s) are disabled upon exiting this state. Operations performed before entering in this state:”h]”hŒƒDisable state of stream. The data port(s) are disabled upon exiting this state. Operations performed before entering in this state:”…”�”}”(hj1h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M›hj h²hubhÜ)�”}”(hXå(1) All the Master(s) and Slave(s) port(s) for the current stream are disabled on alternate bank (bank currently unused) by programming ChannelEn register. (2) All the current configuration of Bus and active stream(s) are programmed into alternate bank (bank currently unused). (3) Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect and port(s) associated with current stream are disabled. ”h]”hâ)�”}”(hhh]”(hç)�”}”(hŒ˜All the Master(s) and Slave(s) port(s) for the current stream are disabled on alternate bank (bank currently unused) by programming ChannelEn register. ”h]”hÌ)�”}”(hŒ—All the Master(s) and Slave(s) port(s) for the current stream are disabled on alternate bank (bank currently unused) by programming ChannelEn register.”h]”hŒ—All the Master(s) and Slave(s) port(s) for the current stream are disabled on alternate bank (bank currently unused) by programming ChannelEn register.”…”�”}”(hjJh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MžhjFubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjCubhç)�”}”(hŒvAll the current configuration of Bus and active stream(s) are programmed into alternate bank (bank currently unused). ”h]”hÌ)�”}”(hŒuAll the current configuration of Bus and active stream(s) are programmed into alternate bank (bank currently unused).”h]”hŒuAll the current configuration of Bus and active stream(s) are programmed into alternate bank (bank currently unused).”…”�”}”(hjbh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¢hj^ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjCubhç)�”}”(hŒµOnce all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect and port(s) associated with current stream are disabled. ”h]”hÌ)�”}”(hŒ´Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect and port(s) associated with current stream are disabled.”h]”hŒ´Once all the values are programmed, Bus initiates switch to alternate bank where all new values programmed gets into effect and port(s) associated with current stream are disabled.”…”�”}”(hjzh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¥hjvubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjCubeh}”(h]”h ]”h"]”h$]”h&]”jNjOjPjQjRjSuh1háhj?ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÊh´Mžhj h²hubhÌ)�”}”(hŒZAfter all above operations are successful, stream state is set to ``SDW_STREAM_DISABLED``.”h]”(hŒBAfter all above operations are successful, stream state is set to ”…”�”}”(hjšh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_DISABLED``”h]”hŒSDW_STREAM_DISABLED”…”�”}”(hj¢h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjšubhŒ.”…”�”}”(hjšh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M©hj h²hubhÌ)�”}”(hŒ©Bus implements below API for DISABLED state which needs to be called once per stream. From ASoC DPCM framework, this stream state is linked to .trigger() stop operation.”h]”hŒ©Bus implements below API for DISABLED state which needs to be called once per stream. From ASoC DPCM framework, this stream state is linked to .trigger() stop operation.”…”�”}”(hjºh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M¬hj h²hubhÌ)�”}”(hŒ`When the INFO_PAUSE flag is supported, a direct transition to ``SDW_STREAM_ENABLED`` is allowed.”h]”(hŒ>When the INFO_PAUSE flag is supported, a direct transition to ”…”�”}”(hjÈh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_ENABLED``”h]”hŒSDW_STREAM_ENABLED”…”�”}”(hjÐh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjÈubhŒ is allowed.”…”�”}”(hjÈh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M°hj h²hubhÌ)�”}”(hŒðFor resume operations where ASoC will use the .prepare() callback, the stream can transition from ``SDW_STREAM_DISABLED`` to ``SDW_STREAM_PREPARED``, with all required settings restored but without updating the bandwidth and bit allocation.”h]”(hŒbFor resume operations where ASoC will use the .prepare() callback, the stream can transition from ”…”�”}”(hjèh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_DISABLED``”h]”hŒSDW_STREAM_DISABLED”…”�”}”(hjðh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjèubhŒ to ”…”�”}”(hjèh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_PREPARED``”h]”hŒSDW_STREAM_PREPARED”…”�”}”(hjh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjèubhŒ\, with all required settings restored but without updating the bandwidth and bit allocation.”…”�”}”(hjèh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´M³hj h²hubj…)�”}”(hŒ;int sdw_disable_stream(struct sdw_stream_runtime * stream);”h]”hŒ;int sdw_disable_stream(struct sdw_stream_runtime * stream);”…”�”}”hjsbah}”(h]”h ]”h"]”h$]”h&]”j”j•js‰jtjujv}”uh1j„h³hÊh´M¸hj h²hubeh}”(h]”Œsdw-stream-disabled”ah ]”h"]”Œsdw_stream_disabled”ah$]”h&]”uh1hµhj¶h²hh³hÊh´M™ubh¶)�”}”(hhh]”(h»)�”}”(hŒSDW_STREAM_DEPREPARED”h]”hŒSDW_STREAM_DEPREPARED”…”�”}”(hj4h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj1h²hh³hÊh´M¾ubhÌ)�”}”(hŒODe-prepare state of stream. Operations performed before entering in this state:”h]”hŒODe-prepare state of stream. Operations performed before entering in this state:”…”�”}”(hjBh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÀhj1h²hubhÜ)�”}”(hX/(1) All the port(s) of Master(s) and Slave(s) for current stream are de-prepared by programming PrepareCtrl register. (2) The payload bandwidth of current stream is reduced from the total bandwidth requirement of bus and new parameters calculated and applied by performing bank switch etc. ”h]”hâ)�”}”(hhh]”(hç)�”}”(hŒrAll the port(s) of Master(s) and Slave(s) for current stream are de-prepared by programming PrepareCtrl register. ”h]”hÌ)�”}”(hŒqAll the port(s) of Master(s) and Slave(s) for current stream are de-prepared by programming PrepareCtrl register.”h]”hŒqAll the port(s) of Master(s) and Slave(s) for current stream are de-prepared by programming PrepareCtrl register.”…”�”}”(hj[h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÃhjWubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjTubhç)�”}”(hŒ¨The payload bandwidth of current stream is reduced from the total bandwidth requirement of bus and new parameters calculated and applied by performing bank switch etc. ”h]”hÌ)�”}”(hŒ§The payload bandwidth of current stream is reduced from the total bandwidth requirement of bus and new parameters calculated and applied by performing bank switch etc.”h]”hŒ§The payload bandwidth of current stream is reduced from the total bandwidth requirement of bus and new parameters calculated and applied by performing bank switch etc.”…”�”}”(hjsh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÆhjoubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhjTubeh}”(h]”h ]”h"]”h$]”h&]”jNjOjPjQjRjSuh1háhjPubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÊh´MÃhj1h²hubhÌ)�”}”(hŒ\After all above operations are successful, stream state is set to ``SDW_STREAM_DEPREPARED``.”h]”(hŒBAfter all above operations are successful, stream state is set to ”…”�”}”(hj“h²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_DEPREPARED``”h]”hŒSDW_STREAM_DEPREPARED”…”�”}”(hj›h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhj“ubhŒ.”…”�”}”(hj“h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÊhj1h²hubhÌ)�”}”(hŒåBus implements below API for DEPREPARED state which needs to be called once per stream. ALSA/ASoC do not have a concept of 'deprepare', and the mapping from this stream state to ALSA/ASoC operation may be implementation specific.”h]”hŒéBus implements below API for DEPREPARED state which needs to be called once per stream. ALSA/ASoC do not have a concept of ‘deprepare’, and the mapping from this stream state to ALSA/ASoC operation may be implementation specific.”…”�”}”(hj³h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÍhj1h²hubhÌ)�”}”(hŒ�When the INFO_PAUSE flag is supported, the stream state is linked to the .hw_free() operation - the stream is not deprepared on a TRIGGER_STOP.”h]”hŒ�When the INFO_PAUSE flag is supported, the stream state is linked to the .hw_free() operation - the stream is not deprepared on a TRIGGER_STOP.”…”�”}”(hjÁh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÒhj1h²hubhÌ)�”}”(hŒ¨Other implementations may transition to the ``SDW_STREAM_DEPREPARED`` state on TRIGGER_STOP, should they require a transition through the ``SDW_STREAM_PREPARED`` state.”•7'h]”(hŒ,Other implementations may transition to the ”…”�”}”(hjÏh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_DEPREPARED``”h]”hŒSDW_STREAM_DEPREPARED”…”�”}”(hj×h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjÏubhŒE state on TRIGGER_STOP, should they require a transition through the ”…”�”}”(hjÏh²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_PREPARED``”h]”hŒSDW_STREAM_PREPARED”…”�”}”(hjéh²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhjÏubhŒ state.”…”�”}”(hjÏh²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MÖhj1h²hubj…)�”}”(hŒ=int sdw_deprepare_stream(struct sdw_stream_runtime * stream);”h]”hŒ=int sdw_deprepare_stream(struct sdw_stream_runtime * stream);”…”�”}”hj sbah}”(h]”h ]”h"]”h$]”h&]”j”j•js‰jtjujv}”uh1j„h³hÊh´MÚhj1h²hubeh}”(h]”Œsdw-stream-deprepared”ah ]”h"]”Œsdw_stream_deprepared”ah$]”h&]”uh1hµhj¶h²hh³hÊh´M¾ubh¶)�”}”(hhh]”(h»)�”}”(hŒSDW_STREAM_RELEASED”h]”hŒSDW_STREAM_RELEASED”…”�”}”(hj h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hºhj h²hh³hÊh´MàubhÌ)�”}”(hŒLRelease state of stream. Operations performed before entering in this state:”h]”hŒLRelease state of stream. Operations performed before entering in this state:”…”�”}”(hj) h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mâhj h²hubhÜ)�”}”(hX(1) Release port resources for all Master(s) and Slave(s) port(s) associated with current stream. (2) Release Master(s) and Slave(s) runtime resources associated with current stream. (3) Release stream runtime resources associated with current stream. ”h]”hâ)�”}”(hhh]”(hç)�”}”(hŒ^Release port resources for all Master(s) and Slave(s) port(s) associated with current stream. ”h]”hÌ)�”}”(hŒ]Release port resources for all Master(s) and Slave(s) port(s) associated with current stream.”h]”hŒ]Release port resources for all Master(s) and Slave(s) port(s) associated with current stream.”…”�”}”(hjB h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mähj> ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhj; ubhç)�”}”(hŒQRelease Master(s) and Slave(s) runtime resources associated with current stream. ”h]”hÌ)�”}”(hŒPRelease Master(s) and Slave(s) runtime resources associated with current stream.”h]”hŒPRelease Master(s) and Slave(s) runtime resources associated with current stream.”…”�”}”(hjZ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´MçhjV ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhj; ubhç)�”}”(hŒARelease stream runtime resources associated with current stream. ”h]”hÌ)�”}”(hŒ@Release stream runtime resources associated with current stream.”h]”hŒ@Release stream runtime resources associated with current stream.”…”�”}”(hjr h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mêhjn ubah}”(h]”h ]”h"]”h$]”h&]”uh1hæhj; ubeh}”(h]”h ]”h"]”h$]”h&]”jNjOjPjQjRjSuh1háhj7 ubah}”(h]”h ]”h"]”h$]”h&]”uh1hÛh³hÊh´Mähj h²hubhÌ)�”}”(hŒZAfter all above operations are successful, stream state is set to ``SDW_STREAM_RELEASED``.”h]”(hŒBAfter all above operations are successful, stream state is set to ”…”�”}”(hj’ h²hh³Nh´NubjQ)�”}”(hŒ``SDW_STREAM_RELEASED``”h]”hŒSDW_STREAM_RELEASED”…”�”}”(hjš h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1jPhj’ ubhŒ.”…”�”}”(hj’ h²hh³Nh´Nubeh}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mìhj h²hubhÌ)�”}”(hŒÍBus implements below APIs for RELEASE state which needs to be called by all the Master(s) and Slave(s) associated with stream. From ASoC DPCM framework, this stream state is linked to .hw_free() operation.”h]”hŒÍBus implements below APIs for RELEASE state which needs to be called by all the Master(s) and Slave(s) associated with stream. From ASoC DPCM framework, this stream state is linked to .hw_free() operation.”…”�”}”(hj² h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mïhj h²hubj…)�”}”(hŒÎint sdw_stream_remove_master(struct sdw_bus * bus, struct sdw_stream_runtime * stream); int sdw_stream_remove_slave(struct sdw_slave * slave, struct sdw_stream_runtime * stream);”h]”hŒÎint sdw_stream_remove_master(struct sdw_bus * bus, struct sdw_stream_runtime * stream); int sdw_stream_remove_slave(struct sdw_slave * slave, struct sdw_stream_runtime * stream);”…”�”}”hjÀ sbah}”(h]”h ]”h"]”h$]”h&]”j”j•js‰jtjujv}”uh1j„h³hÊh´Móhj h²hubhÌ)�”}”(hŒnThe .shutdown() ASoC DPCM operation calls below Bus API to release stream assigned as part of ALLOCATED state.”h]”hŒnThe .shutdown() ASoC DPCM operation calls below Bus API to release stream assigned as part of ALLOCATED state.”…”�”}”(hjÏ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mûhj h²hubhÌ)�”}”(hŒHIn .shutdown() the data structure maintaining stream state are freed up.”h]”hŒHIn .shutdown() the data structure maintaining stream state are freed up.”…”�”}”(hjÝ h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËh³hÊh´Mþhj h²hubj…)�”}”(hŒEnumerated list start value not ordinal-1: “0â€� (ordinal 0)”…”�”}”(hjí h²hh³Nh´Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hËhjê ubah}”(h]”h ]”h"]”h$]”h&]”Œlevel”KŒtype”ŒINFO”Œsource”hÊŒline”Kuh1jè hjTubaŒtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nh²hub.