Commit f3016b8
soundwire: stream: sdw_stream_add_ functions can be called multiple times
The sdw_stream_add_slave/master() functions are called from the
.hw_params stage. We need to make sure the functions can be called
multiple times.
In this version, we assume that only 'audio' parameters provide in the
hw_params() can change. If the number of ports could change
dynamically depending on the stream configuration (number of channels,
etc), we would need to free-up all the stream resources and reallocate
them.
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Rander Wang <rander.wang@intel.com>
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Link: https://lore.kernel.org/r/20220126011715.28204-19-yung-chuan.liao@linux.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>1 parent 5e1df54 commit f3016b8
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
898 | 898 | | |
899 | 899 | | |
900 | 900 | | |
| 901 | + | |
| 902 | + | |
| 903 | + | |
| 904 | + | |
| 905 | + | |
901 | 906 | | |
902 | 907 | | |
903 | 908 | | |
| |||
972 | 977 | | |
973 | 978 | | |
974 | 979 | | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
975 | 985 | | |
976 | 986 | | |
977 | 987 | | |
| |||
1856 | 1866 | | |
1857 | 1867 | | |
1858 | 1868 | | |
| 1869 | + | |
| 1870 | + | |
| 1871 | + | |
1859 | 1872 | | |
1860 | 1873 | | |
1861 | 1874 | | |
1862 | 1875 | | |
1863 | 1876 | | |
1864 | 1877 | | |
| 1878 | + | |
| 1879 | + | |
1865 | 1880 | | |
1866 | 1881 | | |
1867 | 1882 | | |
| |||
1970 | 1985 | | |
1971 | 1986 | | |
1972 | 1987 | | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
1973 | 1992 | | |
1974 | 1993 | | |
1975 | 1994 | | |
| |||
1978 | 1997 | | |
1979 | 1998 | | |
1980 | 1999 | | |
| 2000 | + | |
| 2001 | + | |
| 2002 | + | |
| 2003 | + | |
1981 | 2004 | | |
1982 | 2005 | | |
1983 | 2006 | | |
1984 | 2007 | | |
| 2008 | + | |
1985 | 2009 | | |
1986 | 2010 | | |
1987 | 2011 | | |
| |||
0 commit comments