<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/soundwire/stream.c, branch linux-4.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2024-11-08T15:19:03Z</updated>
<entry>
<title>soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps"</title>
<updated>2024-11-08T15:19:03Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2024-09-09T16:47:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=45fe2dca538477b9f86f2ddb6d6472e38557d7ae'/>
<id>urn:sha1:45fe2dca538477b9f86f2ddb6d6472e38557d7ae</id>
<content type='text'>
commit 233a95fd574fde1c375c486540a90304a2d2d49f upstream.

This reverts commit ab8d66d132bc8f1992d3eb6cab8d32dda6733c84 because it
breaks codecs using non-continuous masks in source and sink ports.  The
commit missed the point that port numbers are not used as indices for
iterating over prop.sink_ports or prop.source_ports.

Soundwire core and existing codecs expect that the array passed as
prop.sink_ports and prop.source_ports is continuous.  The port mask still
might be non-continuous, but that's unrelated.

Reported-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Closes: https://lore.kernel.org/all/b6c75eee-761d-44c8-8413-2a5b34ee2f98@linux.intel.com/
Fixes: ab8d66d132bc ("soundwire: stream: fix programming slave ports for non-continous port maps")
Acked-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Reviewed-by: Charles Keepax &lt;ckeepax@opensource.cirrus.com&gt;
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Tested-by: Peter Ujfalusi &lt;peter.ujfalusi@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20240909164746.136629-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>soundwire: stream: fix programming slave ports for non-continous port maps</title>
<updated>2024-09-04T11:13:08Z</updated>
<author>
<name>Krzysztof Kozlowski</name>
</author>
<published>2024-07-29T14:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d63d5363dea478efd3ea37274332e399f4e5447'/>
<id>urn:sha1:2d63d5363dea478efd3ea37274332e399f4e5447</id>
<content type='text'>
commit ab8d66d132bc8f1992d3eb6cab8d32dda6733c84 upstream.

Two bitmasks in 'struct sdw_slave_prop' - 'source_ports' and
'sink_ports' - define which ports to program in
sdw_program_slave_port_params().  The masks are used to get the
appropriate data port properties ('struct sdw_get_slave_dpn_prop') from
an array.

Bitmasks can be non-continuous or can start from index different than 0,
thus when looking for matching port property for given port, we must
iterate over mask bits, not from 0 up to number of ports.

This fixes allocation and programming slave ports, when a source or sink
masks start from further index.

Fixes: f8101c74aa54 ("soundwire: Add Master and Slave port programming")
Cc: stable@vger.kernel.org
Signed-off-by: Krzysztof Kozlowski &lt;krzysztof.kozlowski@linaro.org&gt;
Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20240729140157.326450-1-krzysztof.kozlowski@linaro.org
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>soundwire: stream: fix memory leak in stream config error path</title>
<updated>2021-05-22T08:59:30Z</updated>
<author>
<name>Rander Wang</name>
</author>
<published>2021-03-31T00:46:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=342260fe821047c3d515e3d28085d73fbdce3e80'/>
<id>urn:sha1:342260fe821047c3d515e3d28085d73fbdce3e80</id>
<content type='text'>
[ Upstream commit 48f17f96a81763c7c8bf5500460a359b9939359f ]

When stream config is failed, master runtime will release all
slave runtime in the slave_rt_list, but slave runtime is not
added to the list at this time. This patch frees slave runtime
in the config error path to fix the memory leak.

Fixes: 89e590535f32 ("soundwire: Add support for SoundWire stream management")
Signed-off-by: Rander Wang &lt;rander.wang@intel.com&gt;
Reviewed-by: Keyon Jie &lt;yang.jie@intel.com&gt;
Reviewed-by: Guennadi Liakhovetski &lt;guennadi.liakhovetski@linux.intel.com&gt;
Reviewed-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Bard Liao &lt;yung-chuan.liao@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20210331004610.12242-1-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soundwire: stream: fix out of boundary access on port properties</title>
<updated>2019-07-14T06:11:05Z</updated>
<author>
<name>Srinivas Kandagatla</name>
</author>
<published>2019-05-22T16:24:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6b1ce3971e05de54ae531484e3d93c2992d1bab9'/>
<id>urn:sha1:6b1ce3971e05de54ae531484e3d93c2992d1bab9</id>
<content type='text'>
[ Upstream commit 03ecad90d3798be11b033248bbd4bbff4425a1c7 ]

Assigning local iterator to array element and using it again for
indexing would cross the array boundary.
Fix this by directly referring array element without using the local
variable.

Signed-off-by: Srinivas Kandagatla &lt;srinivas.kandagatla@linaro.org&gt;
Acked-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>soundwire: Fix acquiring bus lock twice during master release</title>
<updated>2018-08-27T04:19:48Z</updated>
<author>
<name>Sanyog Kale</name>
</author>
<published>2018-07-27T09:14:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8d6ccf5cebbc7ed1dee9986e36853a78dfb64084'/>
<id>urn:sha1:8d6ccf5cebbc7ed1dee9986e36853a78dfb64084</id>
<content type='text'>
As part of sdw_stream_remove_master(), sdw_stream_remove_slave() is called
which results in bus lock being acquired twice.

So, fix it by performing specific Slave remove operations in
sdw_release_master_stream() instead of calling sdw_stream_remove_slave().

Signed-off-by: Sanyog Kale &lt;sanyog.r.kale@intel.com&gt;
Signed-off-by: Shreyas NC &lt;shreyas.nc@intel.com&gt;
Acked-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>soundwire: Fix incorrect exit after configuring stream</title>
<updated>2018-08-27T04:19:48Z</updated>
<author>
<name>Shreyas NC</name>
</author>
<published>2018-07-27T09:14:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=3fef1a2259c556cce34df2791688cb3001f81c92'/>
<id>urn:sha1:3fef1a2259c556cce34df2791688cb3001f81c92</id>
<content type='text'>
In sdw_stream_add_master() after the Master ports are configured,
the stream is released incorrectly.

So, fix it by avoiding stream release after configuring the Master
for the stream.
While at it, rename the label appropriately.

Signed-off-by: Shreyas NC &lt;shreyas.nc@intel.com&gt;
Acked-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>soundwire: Fix duplicate stream state assignment</title>
<updated>2018-08-27T04:19:48Z</updated>
<author>
<name>Shreyas NC</name>
</author>
<published>2018-07-27T09:14:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0aebe40bae6cf5652fdc3d05ecee15fbf5748194'/>
<id>urn:sha1:0aebe40bae6cf5652fdc3d05ecee15fbf5748194</id>
<content type='text'>
For a SoundWire stream it is expected that a Slave is added to the
stream before Master is added.

So, move the stream state to CONFIGURED after the first Slave is
added and remove the stream state assignment for Master add.
Along with these changes, add additional comments to explain the same.

Signed-off-by: Shreyas NC &lt;shreyas.nc@intel.com&gt;
Acked-by: Pierre-Louis Bossart &lt;pierre-louis.bossart@linux.intel.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>docs: Fix more broken references</title>
<updated>2018-06-15T21:11:26Z</updated>
<author>
<name>Mauro Carvalho Chehab</name>
</author>
<published>2018-05-08T18:14:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=34962fb8070cb5a60b686a5ee11f81f2978836bd'/>
<id>urn:sha1:34962fb8070cb5a60b686a5ee11f81f2978836bd</id>
<content type='text'>
As we move stuff around, some doc references are broken. Fix some of
them via this script:
	./scripts/documentation-file-ref-check --fix

Manually checked that produced results are valid.

Acked-by: Matthias Brugger &lt;matthias.bgg@gmail.com&gt;
Acked-by: Takashi Iwai &lt;tiwai@suse.de&gt;
Acked-by: Jeff Kirsher &lt;jeffrey.t.kirsher@intel.com&gt;
Acked-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Acked-by: Miguel Ojeda &lt;miguel.ojeda.sandonis@gmail.com&gt;
Signed-off-by: Mauro Carvalho Chehab &lt;mchehab+samsung@kernel.org&gt;
Acked-by: Jonathan Corbet &lt;corbet@lwn.net&gt;
</content>
</entry>
<entry>
<title>soundwire: Add stream configuration APIs</title>
<updated>2018-05-11T16:17:06Z</updated>
<author>
<name>Sanyog Kale</name>
</author>
<published>2018-04-26T13:08:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5c3eb9f7bdf1f141e051605b7b4225b1e83820a2'/>
<id>urn:sha1:5c3eb9f7bdf1f141e051605b7b4225b1e83820a2</id>
<content type='text'>
Add APIs for prepare, enable, disable and de-prepare stream.

Signed-off-by: Sanyog Kale &lt;sanyog.r.kale@intel.com&gt;
Signed-off-by: Shreyas NC &lt;shreyas.nc@intel.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
<entry>
<title>soundwire: Add bank switch routine</title>
<updated>2018-05-11T16:17:05Z</updated>
<author>
<name>Sanyog Kale</name>
</author>
<published>2018-04-26T13:08:28Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=99b8a5d608a64254f22483f6b67a98f26d3eac8c'/>
<id>urn:sha1:99b8a5d608a64254f22483f6b67a98f26d3eac8c</id>
<content type='text'>
SoundWire supports two registers banks. So, program the alternate bank
with new configuration and then performs bank switch.

Signed-off-by: Sanyog Kale &lt;sanyog.r.kale@intel.com&gt;
Signed-off-by: Shreyas NC &lt;shreyas.nc@intel.com&gt;
Signed-off-by: Vinod Koul &lt;vkoul@kernel.org&gt;
</content>
</entry>
</feed>
