lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202206241810.WpWByPvV-lkp@intel.com>
Date:   Sat, 25 Jun 2022 10:58:07 +0800
From:   kernel test robot <lkp@...el.com>
To:     Kuninori Morimoto <kuninori.morimoto.gx@...esas.com>
Cc:     llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        linux-kernel@...r.kernel.org
Subject: [morimoto:2022-06-24-v1 10/11] drivers/soundwire/qcom.c:1137:22:
 error: no member named 'playback' in 'struct snd_soc_dai_driver'

tree:   https://github.com/morimoto/linux 2022-06-24-v1
head:   9de9be5a1cdd14856aa6f947194b9adf234a3d35
commit: aca2860c80242fb2acba5ebf0eb8a4a8ce9d204d [10/11] remove
config: hexagon-randconfig-r041-20220624
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6fa9120080c35a5ff851c3fc3358692c4ef7ce0d)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://github.com/morimoto/linux/commit/aca2860c80242fb2acba5ebf0eb8a4a8ce9d204d
        git remote add morimoto https://github.com/morimoto/linux
        git fetch --no-tags morimoto 2022-06-24-v1
        git checkout aca2860c80242fb2acba5ebf0eb8a4a8ce9d204d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/soundwire/ drivers/staging/greybus/ sound/soc/

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@...el.com>

All errors (new ones prefixed by >>):

>> drivers/soundwire/qcom.c:1137:22: error: no member named 'playback' in 'struct snd_soc_dai_driver'
                           stream = &dais[i].playback;
                                     ~~~~~~~ ^
>> drivers/soundwire/qcom.c:1139:22: error: no member named 'capture' in 'struct snd_soc_dai_driver'
                           stream = &dais[i].capture;
                                     ~~~~~~~ ^
   2 errors generated.
--
>> drivers/staging/greybus/audio_codec.c:482:27: error: no member named 'playback' in 'struct snd_soc_dai_driver'
                   sig_bits = dai->driver->playback.sig_bits;
                              ~~~~~~~~~~~  ^
>> drivers/staging/greybus/audio_codec.c:484:27: error: no member named 'capture' in 'struct snd_soc_dai_driver'
                   sig_bits = dai->driver->capture.sig_bits;
                              ~~~~~~~~~~~  ^
>> drivers/staging/greybus/audio_codec.c:666:4: error: field designator 'playback' does not refer to any field in type 'struct snd_soc_dai_driver'
                   .playback = {
                    ^
>> drivers/staging/greybus/audio_codec.c:676:4: error: field designator 'capture' does not refer to any field in type 'struct snd_soc_dai_driver'
                   .capture = {
                    ^
>> drivers/staging/greybus/audio_codec.c:1018:18: error: invalid application of 'sizeof' to an incomplete type 'struct snd_soc_dai_driver[]'
           for (i = 0; i < ARRAY_SIZE(gbaudio_dai); i++) {
                           ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:55:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^~~~~
   drivers/staging/greybus/audio_codec.c:1075:17: error: invalid application of 'sizeof' to an incomplete type 'struct snd_soc_dai_driver[]'
                           gbaudio_dai, ARRAY_SIZE(gbaudio_dai));
                                        ^~~~~~~~~~~~~~~~~~~~~~~
   include/linux/kernel.h:55:32: note: expanded from macro 'ARRAY_SIZE'
   #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
                                  ^~~~~
   6 errors generated.
--
>> sound/soc/soc-core.c:357:22: error: no member named 'playback' in 'struct snd_soc_dai_driver'
                   codec_dai->driver->playback.stream_name,
                   ~~~~~~~~~~~~~~~~~  ^
   include/linux/dev_printk.h:163:47: note: expanded from macro 'dev_dbg'
                   dev_printk(KERN_DEBUG, dev, dev_fmt(fmt), ##__VA_ARGS__); \
                                                               ^~~~~~~~~~~
   include/linux/dev_printk.h:129:34: note: expanded from macro 'dev_printk'
                   _dev_printk(level, dev, fmt, ##__VA_ARGS__);            \
                                                  ^~~~~~~~~~~
   1 error generated.
--
>> sound/soc/soc-dapm.c:1081:21: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
           if (rtd->dai_link->num_params <= 1)
                              ^~~~~~~~~~
                              c2c_params
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
>> sound/soc/soc-dapm.c:1081:21: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
           if (rtd->dai_link->num_params <= 1)
                              ^~~~~~~~~~
                              c2c_params
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                               ^
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
>> sound/soc/soc-dapm.c:1081:21: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
           if (rtd->dai_link->num_params <= 1)
                              ^~~~~~~~~~
                              c2c_params
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                                        ^
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
   sound/soc/soc-dapm.c:4046:59: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
           if (ucontrol->value.enumerated.item[0] >= rtd->dai_link->num_params)
                                                                    ^~~~~~~~~~
                                                                    c2c_params
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
   sound/soc/soc-dapm.c:4046:59: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
           if (ucontrol->value.enumerated.item[0] >= rtd->dai_link->num_params)
                                                                    ^~~~~~~~~~
                                                                    c2c_params
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                               ^
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
   sound/soc/soc-dapm.c:4046:59: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
           if (ucontrol->value.enumerated.item[0] >= rtd->dai_link->num_params)
                                                                    ^~~~~~~~~~
                                                                    c2c_params
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                                        ^
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
   sound/soc/soc-dapm.c:4168:21: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
           if (rtd->dai_link->num_params > 1) {
                              ^~~~~~~~~~
                              c2c_params
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
   sound/soc/soc-dapm.c:4168:21: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
           if (rtd->dai_link->num_params > 1) {
                              ^~~~~~~~~~
                              c2c_params
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                               ^
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
   sound/soc/soc-dapm.c:4168:21: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
           if (rtd->dai_link->num_params > 1) {
                              ^~~~~~~~~~
                              c2c_params
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                                        ^
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
   sound/soc/soc-dapm.c:4170:25: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
                                               rtd->dai_link->num_params,
                                                              ^~~~~~~~~~
                                                              c2c_params
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
>> sound/soc/soc-dapm.c:4181:22: error: no member named 'params' in 'struct snd_soc_dai_link'
                                                   rtd->dai_link->params,
                                                   ~~~~~~~~~~~~~  ^
   sound/soc/soc-dapm.c:4182:22: error: no member named 'num_params' in 'struct snd_soc_dai_link'
                                                   rtd->dai_link->num_params,
                                                   ~~~~~~~~~~~~~  ^
   sound/soc/soc-dapm.c:4208:23: error: no member named 'num_params' in 'struct snd_soc_dai_link'; did you mean 'c2c_params'?
                                      rtd->dai_link->num_params, w_param_text);
                                                     ^~~~~~~~~~
                                                     c2c_params
   include/sound/soc.h:697:42: note: 'c2c_params' declared here
           const struct snd_soc_pcm_stream_params *c2c_params;
                                                   ^
>> sound/soc/soc-dapm.c:4232:19: error: no member named 'playback' in 'struct snd_soc_dai_driver'
           if (dai->driver->playback.stream_name) {
               ~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^~~~
>> sound/soc/soc-dapm.c:4232:19: error: no member named 'playback' in 'struct snd_soc_dai_driver'
           if (dai->driver->playback.stream_name) {
               ~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                               ^~~~
>> sound/soc/soc-dapm.c:4232:19: error: no member named 'playback' in 'struct snd_soc_dai_driver'
           if (dai->driver->playback.stream_name) {
               ~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                                        ^~~~
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^~~~
   sound/soc/soc-dapm.c:4234:32: error: no member named 'playback' in 'struct snd_soc_dai_driver'
                   template.name = dai->driver->playback.stream_name;
                                   ~~~~~~~~~~~  ^
   sound/soc/soc-dapm.c:4235:33: error: no member named 'playback' in 'struct snd_soc_dai_driver'
                   template.sname = dai->driver->playback.stream_name;
                                    ~~~~~~~~~~~  ^
>> sound/soc/soc-dapm.c:4248:19: error: no member named 'capture' in 'struct snd_soc_dai_driver'
           if (dai->driver->capture.stream_name) {
               ~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^~~~
   fatal error: too many errors emitted, stopping now [-ferror-limit=]
   20 errors generated.
--
>> sound/soc/soc-pcm.c:2853:21: error: no member named 'params' in 'struct snd_soc_dai_link'
           if (rtd->dai_link->params) {
               ~~~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^~~~
>> sound/soc/soc-pcm.c:2853:21: error: no member named 'params' in 'struct snd_soc_dai_link'
           if (rtd->dai_link->params) {
               ~~~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                               ^~~~
>> sound/soc/soc-pcm.c:2853:21: error: no member named 'params' in 'struct snd_soc_dai_link'
           if (rtd->dai_link->params) {
               ~~~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                                        ^~~~
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^~~~
   sound/soc/soc-pcm.c:2904:21: error: no member named 'params' in 'struct snd_soc_dai_link'
           if (rtd->dai_link->params)
               ~~~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^~~~
   sound/soc/soc-pcm.c:2904:21: error: no member named 'params' in 'struct snd_soc_dai_link'
           if (rtd->dai_link->params)
               ~~~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                               ^~~~
   sound/soc/soc-pcm.c:2904:21: error: no member named 'params' in 'struct snd_soc_dai_link'
           if (rtd->dai_link->params)
               ~~~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                                        ^~~~
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^~~~
   sound/soc/soc-pcm.c:2913:46: error: no member named 'params' in 'struct snd_soc_dai_link'
           if (rtd->dai_link->no_pcm || rtd->dai_link->params) {
                                        ~~~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                      ^~~~
   sound/soc/soc-pcm.c:2913:46: error: no member named 'params' in 'struct snd_soc_dai_link'
           if (rtd->dai_link->no_pcm || rtd->dai_link->params) {
                                        ~~~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:61: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                               ^~~~
   sound/soc/soc-pcm.c:2913:46: error: no member named 'params' in 'struct snd_soc_dai_link'
           if (rtd->dai_link->no_pcm || rtd->dai_link->params) {
                                        ~~~~~~~~~~~~~  ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:86: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : __trace_if_value(cond))
                                                                                        ^~~~
   include/linux/compiler.h:69:3: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
            ^~~~
   9 errors generated.
..


vim +1137 drivers/soundwire/qcom.c

02efb49aa805ce Srinivas Kandagatla 2020-01-13  1117  
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1118  static int qcom_swrm_register_dais(struct qcom_swrm_ctrl *ctrl)
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1119  {
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1120  	int num_dais = ctrl->num_dout_ports + ctrl->num_din_ports;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1121  	struct snd_soc_dai_driver *dais;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1122  	struct snd_soc_pcm_stream *stream;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1123  	struct device *dev = ctrl->dev;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1124  	int i;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1125  
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1126  	/* PDM dais are only tested for now */
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1127  	dais = devm_kcalloc(dev, num_dais, sizeof(*dais), GFP_KERNEL);
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1128  	if (!dais)
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1129  		return -ENOMEM;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1130  
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1131  	for (i = 0; i < num_dais; i++) {
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1132  		dais[i].name = devm_kasprintf(dev, GFP_KERNEL, "SDW Pin%d", i);
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1133  		if (!dais[i].name)
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1134  			return -ENOMEM;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1135  
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1136  		if (i < ctrl->num_dout_ports)
02efb49aa805ce Srinivas Kandagatla 2020-01-13 @1137  			stream = &dais[i].playback;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1138  		else
02efb49aa805ce Srinivas Kandagatla 2020-01-13 @1139  			stream = &dais[i].capture;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1140  
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1141  		stream->channels_min = 1;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1142  		stream->channels_max = 1;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1143  		stream->rates = SNDRV_PCM_RATE_48000;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1144  		stream->formats = SNDRV_PCM_FMTBIT_S16_LE;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1145  
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1146  		dais[i].ops = &qcom_swrm_pdm_dai_ops;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1147  		dais[i].id = i;
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1148  	}
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1149  
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1150  	return devm_snd_soc_register_component(ctrl->dev,
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1151  						&qcom_swrm_dai_component,
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1152  						dais, num_dais);
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1153  }
02efb49aa805ce Srinivas Kandagatla 2020-01-13  1154  

:::::: The code at line 1137 was first introduced by commit
:::::: 02efb49aa805cee643a643ab61a1118c2fd08b80 soundwire: qcom: add support for SoundWire controller

:::::: TO: Srinivas Kandagatla <srinivas.kandagatla@...aro.org>
:::::: CC: Vinod Koul <vkoul@...nel.org>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

View attachment "config" of type "text/plain" (119555 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ