File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed
Documentation/driver-api/soundwire Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -291,7 +291,7 @@ per stream. From ASoC DPCM framework, this stream state maybe linked to
291
291
292
292
.. code-block :: c
293
293
294
- int sdw_alloc_stream(char * stream_name);
294
+ int sdw_alloc_stream(char * stream_name, enum sdw_stream_type type );
295
295
296
296
The SoundWire core provides a sdw_startup_stream() helper function,
297
297
typically called during a dailink .startup() callback, which performs
Original file line number Diff line number Diff line change @@ -1806,12 +1806,13 @@ static int set_stream(struct snd_pcm_substream *substream,
1806
1806
* sdw_alloc_stream() - Allocate and return stream runtime
1807
1807
*
1808
1808
* @stream_name: SoundWire stream name
1809
+ * @type: stream type (could be PCM ,PDM or BPT)
1809
1810
*
1810
1811
* Allocates a SoundWire stream runtime instance.
1811
1812
* sdw_alloc_stream should be called only once per stream. Typically
1812
1813
* invoked from ALSA/ASoC machine/platform driver.
1813
1814
*/
1814
- struct sdw_stream_runtime * sdw_alloc_stream (const char * stream_name )
1815
+ struct sdw_stream_runtime * sdw_alloc_stream (const char * stream_name , enum sdw_stream_type type )
1815
1816
{
1816
1817
struct sdw_stream_runtime * stream ;
1817
1818
@@ -1823,6 +1824,7 @@ struct sdw_stream_runtime *sdw_alloc_stream(const char *stream_name)
1823
1824
INIT_LIST_HEAD (& stream -> master_list );
1824
1825
stream -> state = SDW_STREAM_ALLOCATED ;
1825
1826
stream -> m_rt_count = 0 ;
1827
+ stream -> type = type ;
1826
1828
1827
1829
return stream ;
1828
1830
}
@@ -1851,7 +1853,7 @@ int sdw_startup_stream(void *sdw_substream)
1851
1853
if (!name )
1852
1854
return - ENOMEM ;
1853
1855
1854
- sdw_stream = sdw_alloc_stream (name );
1856
+ sdw_stream = sdw_alloc_stream (name , SDW_STREAM_PCM );
1855
1857
if (!sdw_stream ) {
1856
1858
dev_err (rtd -> dev , "alloc stream failed for substream DAI %s\n" , substream -> name );
1857
1859
ret = - ENOMEM ;
Original file line number Diff line number Diff line change @@ -1019,7 +1019,7 @@ struct sdw_bus {
1019
1019
unsigned int lane_used_bandwidth [SDW_MAX_LANES ];
1020
1020
};
1021
1021
1022
- struct sdw_stream_runtime * sdw_alloc_stream (const char * stream_name );
1022
+ struct sdw_stream_runtime * sdw_alloc_stream (const char * stream_name , enum sdw_stream_type type );
1023
1023
void sdw_release_stream (struct sdw_stream_runtime * stream );
1024
1024
1025
1025
int sdw_compute_params (struct sdw_bus * bus , struct sdw_stream_runtime * stream );
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ int qcom_snd_sdw_startup(struct snd_pcm_substream *substream)
27
27
struct snd_soc_dai * codec_dai ;
28
28
int ret , i ;
29
29
30
- sruntime = sdw_alloc_stream (cpu_dai -> name );
30
+ sruntime = sdw_alloc_stream (cpu_dai -> name , SDW_STREAM_PCM );
31
31
if (!sruntime )
32
32
return - ENOMEM ;
33
33
You can’t perform that action at this time.
0 commit comments