Skip to content

ASoC: Intel: boards: drop reverse deps for SND_HDA_CODEC_HDMI - #1772

Merged
ranj063 merged 4 commits into
thesofproject:topic/sof-devfrom
kv2019i:fix/hda-board-file-deps
Feb 13, 2020
Merged

ranj063 merged 4 commits into
thesofproject:topic/sof-devfrom
kv2019i:fix/hda-board-file-deps

Conversation

@kv2019i

@kv2019i kv2019i commented Feb 7, 2020

Copy link
Copy Markdown
Collaborator

Having a reverse dependency to a config that has its own
additional dependencies, is generally not recommended.
And this applies to select statements for SND_HDA_CODEC_HDMI,
e.g. the case where SND_HDA and SND_SOC_SOF_HDA are built as
modules, but the machine driver is built-in, leading to
compile errors (reported as i386-randconfig-e003-20200206).

Give up on trying to define different dependencies based
on SOF/SST selection, and simply add a "depends on" for
SND_HDA_CODEC_HDMI. This fixes the issue with randconfigs.
Only downside is that SND_HDA_CODEC_HDMI may be built
unnecessarily in some cases, but this seems like the lesser
evil.

Reported-by: kbuild test robot lkp@intel.com
Fixes: aa2b4a5 ('ASoC: Intel: boards: fix incorrect HDMI Kconfig dependency')
Signed-off-by: Kai Vehmanen kai.vehmanen@linux.intel.com

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor change needed

Comment thread sound/soc/intel/boards/Kconfig Outdated

config SND_SOC_INTEL_DA7219_MAX98357A_GENERIC
tristate
depends on SND_HDA_CODEC_HDMI

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should only add a 'depends on' on user-visible options.
Otherwise, we have a risk that this is selected but depends on something else, so the depends is ignored.

That should be fine to remove this one since you filter in the top-levels

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plbossart Ack. I moved this to SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH which is user-visible.

@cujomalainey

Copy link
Copy Markdown

Do you still need me to lookup if we use SND_HDA_CODEC_HDMI?

@plbossart

Copy link
Copy Markdown
Member

Do you still need me to lookup if we use SND_HDA_CODEC_HDMI?

yes please !

@cujomalainey

Copy link
Copy Markdown

I'm seeing it enabled on various kernels

  • v4.4
config/armel/chromiumos-arm.flavour.config
43:CONFIG_SND_HDA_CODEC_HDMI=y

config/x86_64/chromeos-intel-pineview.flavour.config
52:CONFIG_SND_HDA_CODEC_HDMI=m

config/x86_64/chromiumos-x86_64.flavour.config
53:CONFIG_SND_HDA_CODEC_HDMI=m
  • v4.14/v4.19
config/armel/chromiumos-arm.flavour.config
43:CONFIG_SND_HDA_CODEC_HDMI=y

config/x86_64/common.config
135:CONFIG_SND_HDA_CODEC_HDMI=m
  • v5.4
config/armel/chromiumos-arm.flavour.config
30:CONFIG_SND_HDA_CODEC_HDMI=y

@plbossart

Copy link
Copy Markdown
Member

I'm seeing it enabled on various kernels

  • v4.4
config/armel/chromiumos-arm.flavour.config
43:CONFIG_SND_HDA_CODEC_HDMI=y

config/x86_64/chromeos-intel-pineview.flavour.config
52:CONFIG_SND_HDA_CODEC_HDMI=m

config/x86_64/chromiumos-x86_64.flavour.config
53:CONFIG_SND_HDA_CODEC_HDMI=m
  • v4.14/v4.19
config/armel/chromiumos-arm.flavour.config
43:CONFIG_SND_HDA_CODEC_HDMI=y

config/x86_64/common.config
135:CONFIG_SND_HDA_CODEC_HDMI=m
  • v5.4
config/armel/chromiumos-arm.flavour.config
30:CONFIG_SND_HDA_CODEC_HDMI=y

ok, thanks for checking, we should be good to go with this change this then.

@kv2019i
kv2019i force-pushed the fix/hda-board-file-deps branch from 2fd3d1b to 317c02a Compare February 10, 2020 10:15
@plbossart

Copy link
Copy Markdown
Member

@kv2019i minor ask: can you split the changes so that we have different patches for the machine drivers that are not upstream yet? It'll make the management of topic/sof-dev-rebase less painful.
In other words, one patch for all upstream machine drivers, then one per new machine driver not yet upstream.

@kv2019i

kv2019i commented Feb 10, 2020 •

Copy link
Copy Markdown
Collaborator Author

@kv2019i minor ask: can you split the changes so that we have different patches for the machine drivers that are not upstream yet? It'll make the management of topic/sof-dev-rebase less painful.

Sure, will do

@plbossart ... and done

Having a reverse dependency to a config that has its own additional
dependencies, is generally not recommended. And this applies to
select statements for SND_HDA_CODEC_HDMI, e.g. the case where SND_HDA
and SND_SOC_SOF_HDA are built as modules, but the machine driver is
built-in, leading to compile errors (reported as
i386-randconfig-e003-20200206).

Give up on trying to define different dependencies based on SOF/SST
selection, and simply add a "depends on" for SND_HDA_CODEC_HDMI. This
fixes the issue with randconfigs. Only downside is that SND_HDA_CODEC_HDMI
may be built unnecessarily in some cases, but this seems like the lesser
evil.

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: aa2b4a5 ('ASoC: Intel: boards: fix incorrect HDMI Kconfig dependency')
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Having a reverse dependency to a config that has its own additional
dependencies, is generally not recommended. And this applies to
select statements for SND_HDA_CODEC_HDMI, e.g. the case where SND_HDA
and SND_SOC_SOF_HDA are built as modules, but the machine driver is
built-in, leading to compile errors (reported as
i386-randconfig-e003-20200206).

Give up on trying to define different dependencies based on SOF/SST
selection, and simply add a "depends on" for SND_HDA_CODEC_HDMI. This
fixes the issue with randconfigs. Only downside is that SND_HDA_CODEC_HDMI
may be built unnecessarily in some cases, but this seems like the lesser
evil.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Having a reverse dependency to a config that has its own additional
dependencies, is generally not recommended. And this applies to
select statements for SND_HDA_CODEC_HDMI, e.g. the case where SND_HDA
and SND_SOC_SOF_HDA are built as modules, but the machine driver is
built-in, leading to compile errors (reported as
i386-randconfig-e003-20200206).

Give up on trying to define different dependencies based on SOF/SST
selection, and simply add a "depends on" for SND_HDA_CODEC_HDMI. This
fixes the issue with randconfigs. Only downside is that SND_HDA_CODEC_HDMI
may be built unnecessarily in some cases, but this seems like the lesser
evil.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
…DEC_HDMI

Having a reverse dependency to a config that has its own additional
dependencies, is generally not recommended. And this applies to
select statements for SND_HDA_CODEC_HDMI, e.g. the case where SND_HDA
and SND_SOC_SOF_HDA are built as modules, but the machine driver is
built-in, leading to compile errors (reported as
i386-randconfig-e003-20200206).

Give up on trying to define different dependencies based on SOF/SST
selection, and simply add a "depends on" for SND_HDA_CODEC_HDMI. This
fixes the issue with randconfigs. Only downside is that SND_HDA_CODEC_HDMI
may be built unnecessarily in some cases, but this seems like the lesser
evil.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
@kv2019i
kv2019i force-pushed the fix/hda-board-file-deps branch from 317c02a to 0f447b3 Compare February 11, 2020 15:16

@plbossart plbossart left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor nit-pick below, thanks @kv2019i

depends on I2C && ACPI
depends on (SND_SOC_SOF_HDA_AUDIO_CODEC && (MFD_INTEL_LPSS || COMPILE_TEST)) ||\
(SND_SOC_SOF_BAYTRAIL && (X86_INTEL_LPSS || COMPILE_TEST))
depends on SND_HDA_CODEC_HDMI

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

depends on SND_HDA_CODEC_HDMI if SND_SOC_SOF_HDA_AUDIO_CODEC?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plbossart is the if necessary even though we have depends on SND_SOC_SOF_HDA_AUDIO_CODEC just above?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plbossart @ranj063 Basicly with current patch we unnecessarily depend on SND_HDA_CODEC_HDMI if user just wants to build SND_SOC_SOF_BAYTRAIL. To fix this, we need to bake in the dependency to the line above, which to me gets too messy:

depends on (SND_SOC_SOF_HDA_AUDIO_CODEC && SND_HDA_CODEC_HDMI &&\ 
                       (MFD_INTEL_LPSS || COMPILE_TEST)) ||\
	           (SND_SOC_SOF_BAYTRAIL && (X86_INTEL_LPSS || COMPILE_TEST))

... this is becoming rather unreadable, so I'd prefer to keep just the simple "depends on SND_HDA_CODEC_HDMI". Most users will compile support for multiple platforms anyways.

@kv2019i

kv2019i commented Feb 13, 2020

Copy link
Copy Markdown
Collaborator Author

Travis-ci error is from checkpatch and this:

WARNING: Unknown commit id 'aa2b4a5', maybe rebased or not pulled?
Fixes: aa2b4a5 ('ASoC: Intel: boards: fix incorrect HDMI Kconfig dependency')

The commit-id is the correct hash in upstream for this change, so this is a false alarm.

@ranj063
ranj063 merged commit 1f1b1a4 into thesofproject:topic/sof-dev Feb 13, 2020
oder-chiou pushed a commit to oder-chiou/linux-soundwire that referenced this pull request May 5, 2026
When I try to manually set bitrates:

iw wlan0 set bitrates legacy-2.4 1

I get sleeping from invalid context error, see below. Fix that by switching to
use recently introduced ieee80211_iterate_stations_mtx().

Do note that WCN6855 firmware is still crashing, I'm not sure if that firmware
even supports bitrate WMI commands and should we consider disabling
ath12k_mac_op_set_bitrate_mask() for WCN6855? But that's for another patch.

BUG: sleeping function called from invalid context at drivers/net/wireless/ath/ath12k/wmi.c:420
in_atomic(): 0, irqs_disabled(): 0, non_block: 0, pid: 2236, name: iw
preempt_count: 0, expected: 0
RCU nest depth: 1, expected: 0
3 locks held by iw/2236:
 #0: ffffffffabc6f1d8 (cb_lock){++++}-{3:3}, at: genl_rcv+0x14/0x40
 thesofproject#1: ffff888138410810 (&rdev->wiphy.mtx){+.+.}-{3:3}, at: nl80211_pre_doit+0x54d/0x800 [cfg80211]
 thesofproject#2: ffffffffab2cfaa0 (rcu_read_lock){....}-{1:2}, at: ieee80211_iterate_stations_atomic+0x2f/0x200 [mac80211]
CPU: 3 UID: 0 PID: 2236 Comm: iw Not tainted 6.11.0-rc7-wt-ath+ thesofproject#1772
Hardware name: Intel(R) Client Systems NUC8i7HVK/NUC8i7HVB, BIOS HNKBLi70.86A.0067.2021.0528.1339 05/28/2021
Call Trace:
 <TASK>
 dump_stack_lvl+0xa4/0xe0
 dump_stack+0x10/0x20
 __might_resched+0x363/0x5a0
 ? __alloc_skb+0x165/0x340
 __might_sleep+0xad/0x160
 ath12k_wmi_cmd_send+0xb1/0x3d0 [ath12k]
 ? ath12k_wmi_init_wcn7850+0xa40/0xa40 [ath12k]
 ? __netdev_alloc_skb+0x45/0x7b0
 ? __asan_memset+0x39/0x40
 ? ath12k_wmi_alloc_skb+0xf0/0x150 [ath12k]
 ? reacquire_held_locks+0x4d0/0x4d0
 ath12k_wmi_set_peer_param+0x340/0x5b0 [ath12k]
 ath12k_mac_disable_peer_fixed_rate+0xa3/0x110 [ath12k]
 ? ath12k_mac_vdev_stop+0x4f0/0x4f0 [ath12k]
 ieee80211_iterate_stations_atomic+0xd4/0x200 [mac80211]
 ath12k_mac_op_set_bitrate_mask+0x5d2/0x1080 [ath12k]
 ? ath12k_mac_vif_chan+0x320/0x320 [ath12k]
 drv_set_bitrate_mask+0x267/0x470 [mac80211]
 ieee80211_set_bitrate_mask+0x4cc/0x8a0 [mac80211]
 ? __this_cpu_preempt_check+0x13/0x20
 nl80211_set_tx_bitrate_mask+0x2bc/0x530 [cfg80211]
 ? nl80211_parse_tx_bitrate_mask+0x2320/0x2320 [cfg80211]
 ? trace_contention_end+0xef/0x140
 ? rtnl_unlock+0x9/0x10
 ? nl80211_pre_doit+0x557/0x800 [cfg80211]
 genl_family_rcv_msg_doit+0x1f0/0x2e0
 ? genl_family_rcv_msg_attrs_parse.isra.0+0x250/0x250
 ? ns_capable+0x57/0xd0
 genl_family_rcv_msg+0x34c/0x600
 ? genl_family_rcv_msg_dumpit+0x310/0x310
 ? __lock_acquire+0xc62/0x1de0
 ? he_set_mcs_mask.isra.0+0x8d0/0x8d0 [cfg80211]
 ? nl80211_parse_tx_bitrate_mask+0x2320/0x2320 [cfg80211]
 ? cfg80211_external_auth_request+0x690/0x690 [cfg80211]
 genl_rcv_msg+0xa0/0x130
 netlink_rcv_skb+0x14c/0x400
 ? genl_family_rcv_msg+0x600/0x600
 ? netlink_ack+0xd70/0xd70
 ? rwsem_optimistic_spin+0x4f0/0x4f0
 ? genl_rcv+0x14/0x40
 ? down_read_killable+0x580/0x580
 ? netlink_deliver_tap+0x13e/0x350
 ? __this_cpu_preempt_check+0x13/0x20
 genl_rcv+0x23/0x40
 netlink_unicast+0x45e/0x790
 ? netlink_attachskb+0x7f0/0x7f0
 netlink_sendmsg+0x7eb/0xdb0
 ? netlink_unicast+0x790/0x790
 ? __this_cpu_preempt_check+0x13/0x20
 ? selinux_socket_sendmsg+0x31/0x40
 ? netlink_unicast+0x790/0x790
 __sock_sendmsg+0xc9/0x160
 ____sys_sendmsg+0x620/0x990
 ? kernel_sendmsg+0x30/0x30
 ? __copy_msghdr+0x410/0x410
 ? __kasan_check_read+0x11/0x20
 ? mark_lock+0xe6/0x1470
 ___sys_sendmsg+0xe9/0x170
 ? copy_msghdr_from_user+0x120/0x120
 ? __lock_acquire+0xc62/0x1de0
 ? do_fault_around+0x2c6/0x4e0
 ? do_user_addr_fault+0x8c1/0xde0
 ? reacquire_held_locks+0x220/0x4d0
 ? do_user_addr_fault+0x8c1/0xde0
 ? __kasan_check_read+0x11/0x20
 ? __fdget+0x4e/0x1d0
 ? sockfd_lookup_light+0x1a/0x170
 __sys_sendmsg+0xd2/0x180
 ? __sys_sendmsg_sock+0x20/0x20
 ? reacquire_held_locks+0x4d0/0x4d0
 ? debug_smp_processor_id+0x17/0x20
 __x64_sys_sendmsg+0x72/0xb0
 ? lockdep_hardirqs_on+0x7d/0x100
 x64_sys_call+0x894/0x9f0
 do_syscall_64+0x64/0x130
 entry_SYSCALL_64_after_hwframe+0x4b/0x53
RIP: 0033:0x7f230fe04807
Code: 64 89 02 48 c7 c0 ff ff ff ff eb bb 0f 1f 80 00 00 00 00 f3 0f 1e fa 64 8b 04 25 18 00 00 00 85 c0 75 10 b8 2e 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 51 c3 48 83 ec 28 89 54 24 1c 48 89 74 24 10
RSP: 002b:00007ffe996a7ea8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000556f9f9c3390 RCX: 00007f230fe04807
RDX: 0000000000000000 RSI: 00007ffe996a7ee0 RDI: 0000000000000003
RBP: 0000556f9f9c88c0 R08: 0000000000000002 R09: 0000000000000000
R10: 0000556f965ca190 R11: 0000000000000246 R12: 0000556f9f9c8780
R13: 00007ffe996a7ee0 R14: 0000556f9f9c87d0 R15: 0000556f9f9c88c0
 </TASK>

Tested-on: WCN7850 hw2.0 PCI WLAN.HMT.1.0.c5-00481-QCAHMTSWPL_V1.0_V2.0_SILICONZ-3

Signed-off-by: Kalle Valo <quic_kvalo@quicinc.com>
Link: https://patch.msgid.link/20241007165932.78081-2-kvalo@kernel.org
Signed-off-by: Jeff Johnson <quic_jjohnson@quicinc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants