All of lore.kernel.org
 help / color / mirror / Atom feed
* sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'
@ 2020-02-06  5:29 ` kbuild test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2020-02-06  5:29 UTC (permalink / raw)
  To: Kai Vehmanen
  Cc: kbuild-all, linux-kernel, Mark Brown, Takashi Iwai, Pierre-Louis Bossart

[-- Attachment #1: Type: text/plain, Size: 2643 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4c7d00ccf40db99bfb7bd1857bcbf007275704d8
commit: 7de9a47c8971bdec07cc9a62e948382003c5908f ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi
date:   3 months ago
config: i386-randconfig-e003-20200206 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout 7de9a47c8971bdec07cc9a62e948382003c5908f
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: sound/soc/intel/boards/hda_dsp_common.o: in function `hda_dsp_hdmi_build_controls':
>> sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'

vim +76 sound/soc/intel/boards/hda_dsp_common.c

    36	
    37	#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
    38	/*
    39	 * Search card topology and register HDMI PCM related controls
    40	 * to codec driver.
    41	 */
    42	int hda_dsp_hdmi_build_controls(struct snd_soc_card *card,
    43					struct snd_soc_component *comp)
    44	{
    45		struct hdac_hda_priv *hda_pvt;
    46		struct hda_codec *hcodec;
    47		struct snd_pcm *spcm;
    48		struct hda_pcm *hpcm;
    49		int err = 0, i = 0;
    50	
    51		if (!comp)
    52			return -EINVAL;
    53	
    54		hda_pvt = snd_soc_component_get_drvdata(comp);
    55		hcodec = &hda_pvt->codec;
    56	
    57		list_for_each_entry(hpcm, &hcodec->pcm_list_head, list) {
    58			spcm = hda_dsp_hdmi_pcm_handle(card, i);
    59			if (spcm) {
    60				hpcm->pcm = spcm;
    61				hpcm->device = spcm->device;
    62				dev_dbg(card->dev,
    63					"%s: mapping HDMI converter %d to PCM %d (%p)\n",
    64					__func__, i, hpcm->device, spcm);
    65			} else {
    66				hpcm->pcm = 0;
    67				hpcm->device = SNDRV_PCM_INVALID_DEVICE;
    68				dev_warn(card->dev,
    69					 "%s: no PCM in topology for HDMI converter %d\n\n",
    70					 __func__, i);
    71			}
    72			i++;
    73		}
    74		snd_hdac_display_power(hcodec->core.bus,
    75				       HDA_CODEC_IDX_CONTROLLER, true);
  > 76		err = snd_hda_codec_build_controls(hcodec);
    77		if (err < 0)
    78			dev_err(card->dev, "unable to create controls %d\n", err);
    79		snd_hdac_display_power(hcodec->core.bus,
    80				       HDA_CODEC_IDX_CONTROLLER, false);
    81	
    82		return err;
    83	}
    84	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 42351 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'
@ 2020-02-06  5:29 ` kbuild test robot
  0 siblings, 0 replies; 8+ messages in thread
From: kbuild test robot @ 2020-02-06  5:29 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2719 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   4c7d00ccf40db99bfb7bd1857bcbf007275704d8
commit: 7de9a47c8971bdec07cc9a62e948382003c5908f ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi
date:   3 months ago
config: i386-randconfig-e003-20200206 (attached as .config)
compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
reproduce:
        git checkout 7de9a47c8971bdec07cc9a62e948382003c5908f
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   ld: sound/soc/intel/boards/hda_dsp_common.o: in function `hda_dsp_hdmi_build_controls':
>> sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'

vim +76 sound/soc/intel/boards/hda_dsp_common.c

    36	
    37	#if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA_AUDIO_CODEC)
    38	/*
    39	 * Search card topology and register HDMI PCM related controls
    40	 * to codec driver.
    41	 */
    42	int hda_dsp_hdmi_build_controls(struct snd_soc_card *card,
    43					struct snd_soc_component *comp)
    44	{
    45		struct hdac_hda_priv *hda_pvt;
    46		struct hda_codec *hcodec;
    47		struct snd_pcm *spcm;
    48		struct hda_pcm *hpcm;
    49		int err = 0, i = 0;
    50	
    51		if (!comp)
    52			return -EINVAL;
    53	
    54		hda_pvt = snd_soc_component_get_drvdata(comp);
    55		hcodec = &hda_pvt->codec;
    56	
    57		list_for_each_entry(hpcm, &hcodec->pcm_list_head, list) {
    58			spcm = hda_dsp_hdmi_pcm_handle(card, i);
    59			if (spcm) {
    60				hpcm->pcm = spcm;
    61				hpcm->device = spcm->device;
    62				dev_dbg(card->dev,
    63					"%s: mapping HDMI converter %d to PCM %d (%p)\n",
    64					__func__, i, hpcm->device, spcm);
    65			} else {
    66				hpcm->pcm = 0;
    67				hpcm->device = SNDRV_PCM_INVALID_DEVICE;
    68				dev_warn(card->dev,
    69					 "%s: no PCM in topology for HDMI converter %d\n\n",
    70					 __func__, i);
    71			}
    72			i++;
    73		}
    74		snd_hdac_display_power(hcodec->core.bus,
    75				       HDA_CODEC_IDX_CONTROLLER, true);
  > 76		err = snd_hda_codec_build_controls(hcodec);
    77		if (err < 0)
    78			dev_err(card->dev, "unable to create controls %d\n", err);
    79		snd_hdac_display_power(hcodec->core.bus,
    80				       HDA_CODEC_IDX_CONTROLLER, false);
    81	
    82		return err;
    83	}
    84	

---
0-DAY kernel test infrastructure                 Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 42351 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'
  2020-02-06  5:29 ` kbuild test robot
@ 2020-02-06  7:54   ` Takashi Iwai
  -1 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2020-02-06  7:54 UTC (permalink / raw)
  To: kbuild test robot
  Cc: Kai Vehmanen, kbuild-all, linux-kernel, Mark Brown, Takashi Iwai,
	Pierre-Louis Bossart

On Thu, 06 Feb 2020 06:29:52 +0100,
kbuild test robot wrote:
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   4c7d00ccf40db99bfb7bd1857bcbf007275704d8
> commit: 7de9a47c8971bdec07cc9a62e948382003c5908f ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi
> date:   3 months ago
> config: i386-randconfig-e003-20200206 (attached as .config)
> compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
> reproduce:
>         git checkout 7de9a47c8971bdec07cc9a62e948382003c5908f
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    ld: sound/soc/intel/boards/hda_dsp_common.o: in function `hda_dsp_hdmi_build_controls':
> >> sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'

Looks like the revert select enforcing the built-in of SOF while the
legacy HDA is a module.  It doesn't look so trivial to fix...


Takashi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'
@ 2020-02-06  7:54   ` Takashi Iwai
  0 siblings, 0 replies; 8+ messages in thread
From: Takashi Iwai @ 2020-02-06  7:54 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]

On Thu, 06 Feb 2020 06:29:52 +0100,
kbuild test robot wrote:
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   4c7d00ccf40db99bfb7bd1857bcbf007275704d8
> commit: 7de9a47c8971bdec07cc9a62e948382003c5908f ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi
> date:   3 months ago
> config: i386-randconfig-e003-20200206 (attached as .config)
> compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
> reproduce:
>         git checkout 7de9a47c8971bdec07cc9a62e948382003c5908f
>         # save the attached .config to linux build tree
>         make ARCH=i386 
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>    ld: sound/soc/intel/boards/hda_dsp_common.o: in function `hda_dsp_hdmi_build_controls':
> >> sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'

Looks like the revert select enforcing the built-in of SOF while the
legacy HDA is a module.  It doesn't look so trivial to fix...


Takashi

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'
  2020-02-06  7:54   ` Takashi Iwai
@ 2020-02-06 16:55     ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2020-02-06 16:55 UTC (permalink / raw)
  To: Takashi Iwai, kbuild test robot
  Cc: Kai Vehmanen, kbuild-all, linux-kernel, Mark Brown



On 2/6/20 1:54 AM, Takashi Iwai wrote:
> On Thu, 06 Feb 2020 06:29:52 +0100,
> kbuild test robot wrote:
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   4c7d00ccf40db99bfb7bd1857bcbf007275704d8
>> commit: 7de9a47c8971bdec07cc9a62e948382003c5908f ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi
>> date:   3 months ago
>> config: i386-randconfig-e003-20200206 (attached as .config)
>> compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
>> reproduce:
>>          git checkout 7de9a47c8971bdec07cc9a62e948382003c5908f
>>          # save the attached .config to linux build tree
>>          make ARCH=i386
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>     ld: sound/soc/intel/boards/hda_dsp_common.o: in function `hda_dsp_hdmi_build_controls':
>>>> sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'
> 
> Looks like the revert select enforcing the built-in of SOF while the
> legacy HDA is a module.  It doesn't look so trivial to fix...

SOF in this case is build as a module, but the machine driver isn't.

It seems like the SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH option is 
different from others machine drivers. All others can only be either M 
or not selected, but here we have a case where the selection can be M or y.

The following diff seems to make the problem go away by preventing this 
case, it seems we didn't propagate the constraints from the higher level.

More testing needed, this is just a first result.

diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index 9ca2567d0059..db08b3af07c2 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -426,6 +426,7 @@ config SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH

  endif ## SND_SOC_SOF_GEMINILAKE  && SND_SOC_SOF_HDA_LINK

+if SND_SOC_SOF_HDA
  if SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC || SND_SOC_SOF_HDA_AUDIO_CODEC

  config SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
@@ -441,6 +442,7 @@ config SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
           If unsure select "N".

  endif ## SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC || 
SND_SOC_SOF_HDA_AUDIO_CODEC
+endif

  if SND_SOC_SOF_HDA_LINK || SND_SOC_SOF_BAYTRAIL
  config SND_SOC_INTEL_SOF_RT5682_MACH

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'
@ 2020-02-06 16:55     ` Pierre-Louis Bossart
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2020-02-06 16:55 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2418 bytes --]



On 2/6/20 1:54 AM, Takashi Iwai wrote:
> On Thu, 06 Feb 2020 06:29:52 +0100,
> kbuild test robot wrote:
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   4c7d00ccf40db99bfb7bd1857bcbf007275704d8
>> commit: 7de9a47c8971bdec07cc9a62e948382003c5908f ASoC: Intel: skl-hda-dsp-generic: use snd-hda-codec-hdmi
>> date:   3 months ago
>> config: i386-randconfig-e003-20200206 (attached as .config)
>> compiler: gcc-7 (Debian 7.5.0-3) 7.5.0
>> reproduce:
>>          git checkout 7de9a47c8971bdec07cc9a62e948382003c5908f
>>          # save the attached .config to linux build tree
>>          make ARCH=i386
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>
>>     ld: sound/soc/intel/boards/hda_dsp_common.o: in function `hda_dsp_hdmi_build_controls':
>>>> sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'
> 
> Looks like the revert select enforcing the built-in of SOF while the
> legacy HDA is a module.  It doesn't look so trivial to fix...

SOF in this case is build as a module, but the machine driver isn't.

It seems like the SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH option is 
different from others machine drivers. All others can only be either M 
or not selected, but here we have a case where the selection can be M or y.

The following diff seems to make the problem go away by preventing this 
case, it seems we didn't propagate the constraints from the higher level.

More testing needed, this is just a first result.

diff --git a/sound/soc/intel/boards/Kconfig b/sound/soc/intel/boards/Kconfig
index 9ca2567d0059..db08b3af07c2 100644
--- a/sound/soc/intel/boards/Kconfig
+++ b/sound/soc/intel/boards/Kconfig
@@ -426,6 +426,7 @@ config SND_SOC_INTEL_GLK_RT5682_MAX98357A_MACH

  endif ## SND_SOC_SOF_GEMINILAKE  && SND_SOC_SOF_HDA_LINK

+if SND_SOC_SOF_HDA
  if SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC || SND_SOC_SOF_HDA_AUDIO_CODEC

  config SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
@@ -441,6 +442,7 @@ config SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH
           If unsure select "N".

  endif ## SND_SOC_INTEL_SKYLAKE_HDAUDIO_CODEC || 
SND_SOC_SOF_HDA_AUDIO_CODEC
+endif

  if SND_SOC_SOF_HDA_LINK || SND_SOC_SOF_BAYTRAIL
  config SND_SOC_INTEL_SOF_RT5682_MACH

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'
  2020-02-06 16:55     ` Pierre-Louis Bossart
@ 2020-02-06 18:01       ` Pierre-Louis Bossart
  -1 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2020-02-06 18:01 UTC (permalink / raw)
  To: Takashi Iwai, kbuild test robot
  Cc: Kai Vehmanen, kbuild-all, linux-kernel, Mark Brown


>>>     ld: sound/soc/intel/boards/hda_dsp_common.o: in function 
>>> `hda_dsp_hdmi_build_controls':
>>>>> sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to 
>>>>> `snd_hda_codec_build_controls'
>>
>> Looks like the revert select enforcing the built-in of SOF while the
>> legacy HDA is a module.  It doesn't look so trivial to fix...
> 
> SOF in this case is build as a module, but the machine driver isn't.
> 
> It seems like the SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH option is 
> different from others machine drivers. All others can only be either M 
> or not selected, but here we have a case where the selection can be M or y.

Suggested fix is here, running it through our CI tests for now:

https://github.com/thesofproject/linux/pull/1768

This should be caught by kbuild tests as well.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls'
@ 2020-02-06 18:01       ` Pierre-Louis Bossart
  0 siblings, 0 replies; 8+ messages in thread
From: Pierre-Louis Bossart @ 2020-02-06 18:01 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 837 bytes --]


>>>     ld: sound/soc/intel/boards/hda_dsp_common.o: in function 
>>> `hda_dsp_hdmi_build_controls':
>>>>> sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to 
>>>>> `snd_hda_codec_build_controls'
>>
>> Looks like the revert select enforcing the built-in of SOF while the
>> legacy HDA is a module.  It doesn't look so trivial to fix...
> 
> SOF in this case is build as a module, but the machine driver isn't.
> 
> It seems like the SND_SOC_INTEL_SKL_HDA_DSP_GENERIC_MACH option is 
> different from others machine drivers. All others can only be either M 
> or not selected, but here we have a case where the selection can be M or y.

Suggested fix is here, running it through our CI tests for now:

https://github.com/thesofproject/linux/pull/1768

This should be caught by kbuild tests as well.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2020-02-06 18:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-06  5:29 sound/soc/intel/boards/hda_dsp_common.c:76: undefined reference to `snd_hda_codec_build_controls' kbuild test robot
2020-02-06  5:29 ` kbuild test robot
2020-02-06  7:54 ` Takashi Iwai
2020-02-06  7:54   ` Takashi Iwai
2020-02-06 16:55   ` Pierre-Louis Bossart
2020-02-06 16:55     ` Pierre-Louis Bossart
2020-02-06 18:01     ` Pierre-Louis Bossart
2020-02-06 18:01       ` Pierre-Louis Bossart

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.