sound fixes for 5.8-rc1
Linus,
please pull sound fixes for v5.8-rc1 from:
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git tags/sound-fix-5.8-rc1
The topmost commit is a4f55d927d33accd6eb535ce0db031e2df47714a
----------------------------------------------------------------
sound fixes for 5.8-rc1
Here are last-minute fixes gathered before merge window close; a few fixes are for the core while the rest majority are driver fixes.
* PCM locking annotation fixes and the possible self-lock fix
* ASoC DPCM regression fixes with multi-CPU DAI
* A fix for inconsistent resume from system-PM on USB-audio
* Improved runtime-PM handling with multiple USB interfaces
* Quirks for HD-audio and USB-audio
* Hardened firmware handling in max98390 codec
* A couple of fixes for meson
----------------------------------------------------------------
Bard Liao (1):
ASoC: core: only convert non DPCM link to DPCM link
Colin Ian King (1):
ASoC: meson: fix memory leak of links if allocation of ldata fails
Dan Carpenter (1):
ALSA: emu10k1: delete an unnecessary condition
Dan Murphy (1):
dt-bindings: ASoc: Fix tdm-slot documentation spelling error
Hans de Goede (2):
ASoC: Intel: bytcr_rt5640: Add quirk for Toshiba Encore WT10-A tablet
ASoC: rt5645: Add platform-data for Asus T101HA
Hui Wang (1):
ALSA: hda/realtek - add a pintbl quirk for several Lenovo machines
Kai-Heng Feng (1):
ALSA: usb-audio: Add vendor, product and profile name for HP Thunderbolt Dock
Michał Mirosław (2):
ALSA: pcm: fix snd_pcm_link() lockdep splat
ALSA: pcm: disallow linking stream to itself
Oder Chiou (1):
ASoC: rl6231: Modify the target DMIC clock rate
Pavel Machek (CIP) (1):
ASoC: meson: add missing free_irq() in error path
Pierre-Louis Bossart (3):
ASoC: soc-pcm: dpcm: fix playback/capture checks
ASoC: Intel: boards: replace capture_only by dpcm_capture
ASoC: SOF: nocodec: conditionally set dpcm_capture/dpcm_playback flags
Shengjiu Wang (1):
ASoC: fsl-asoc-card: Defer probe when fail to find codec device
Steve Lee (1):
ASoC: max98390: Fix potential crash during param fw loading
Takashi Iwai (4):
ASoC: max98390: Fix incorrect printf qualifier
ALSA: usb-audio: Fix inconsistent card PM state after resume
ALSA: usb-audio: Use the new macro for HP Dock rename quirks
ALSA: usb-audio: Manage auto-pm of all bundled interfaces
--- .../devicetree/bindings/sound/tdm-slot.txt | 4 +- sound/core/pcm_native.c | 20 +++++++- sound/pci/emu10k1/emu10k1x.c | 2 +- sound/pci/hda/patch_realtek.c | 6 +++ sound/soc/codecs/max98390.c | 26 +++++++++-- sound/soc/codecs/max98390.h | 3 +- sound/soc/codecs/rl6231.c | 4 +- sound/soc/codecs/rt5645.c | 14 ++++++ sound/soc/fsl/fsl-asoc-card.c | 2 +- sound/soc/intel/boards/bytcr_rt5640.c | 12 +++++ sound/soc/intel/boards/glk_rt5682_max98357a.c | 2 +- sound/soc/intel/boards/kbl_da7219_max98927.c | 4 +- sound/soc/intel/boards/kbl_rt5663_max98927.c | 2 +- .../soc/intel/boards/kbl_rt5663_rt5514_max98927.c | 2 +- sound/soc/meson/axg-fifo.c | 10 +++- sound/soc/meson/meson-card-utils.c | 17 +++++-- sound/soc/soc-core.c | 22 +++++++-- sound/soc/soc-pcm.c | 44 ++++++++++++++---- sound/soc/sof/nocodec.c | 6 ++- sound/usb/card.c | 54 +++++++++++++++++----- sound/usb/quirks-table.h | 12 +++++ sound/usb/usbaudio.h | 6 ++- 22 files changed, 219 insertions(+), 55 deletions(-)
The pull request you sent on Thu, 11 Jun 2020 13:33:19 +0200:
The pull request you sent on Thu, 11 Jun 2020 13:33:19 +0200:
Quoted 1 line
git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.gittags/sound-fix-5.8-rc1
has been merged into torvalds/linux.git:
https://git.kernel.org/torvalds/c/e0154bd478897b277aeb7195bf9088e9ce05bbb0
Thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.wiki.kernel.org/userdoc/prtracker
Quoted 8 lines · Takashi Iwai
sound fixes for 5.8-rc1
Here are last-minute fixes gathered before merge window close; a few fixes are for the core while the rest majority are driver fixes.
* PCM locking annotation fixes and the possible self-lock fix
* ASoC DPCM regression fixes with multi-CPU DAI
Just as a heads up, we just recently got HDMI audio working on the Dragonboard 845c (Vinod has patches he's sending out here in the next few days), but they suddenly stopped working today with the following error:
[ 13.110725] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia1 mapping ok [ 13.119343] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia2 mapping ok [ 13.127969] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia3 mapping ok [ 13.135891] msm-snd-sdm845 soc@0:sound: Compress ASoC: snd-soc-dummy-dai <-> MultiMedia4 mapping ok [ 13.145042] msm-snd-sdm845 soc@0:sound: CPU DAI QUAT_MI2S_RX for rtd HDMI Playback does not support capture [ 13.154873] msm-snd-sdm845 soc@0:sound: ASoC: can't create pcm HDMI Playback :-22 [ 13.165634] snd-malloc: invalid device type 0 [ 13.170057] snd-malloc: invalid device type 0 [ 13.174888] msm-snd-sdm845 soc@0:sound: Sound card registration failed [ 13.181574] msm-snd-sdm845: probe of soc@0:sound failed with error -22
I've bisected it down to the following commit from this pull req:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b73287f0b0745961b14e5ebcce92cc8ed24d4d52
Without this patch:
[ 13.056906] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia1 mapping ok [ 13.075465] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia2 mapping ok [ 13.092949] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia3 mapping ok [ 13.109704] msm-snd-sdm845 soc@0:sound: Compress ASoC: snd-soc-dummy-dai <-> MultiMedia4 mapping ok [ 13.125584] msm-snd-sdm845 soc@0:sound: i2s-hifi <-> QUAT_MI2S_RX mapping ok [ 13.125621] msm-snd-sdm845 soc@0:sound: multicodec <-> SLIMBUS_0_RX mapping ok [ 13.141682] msm-snd-sdm845 soc@0:sound: wcd934x_tx1 <->
SLIMBUS_0_TX mapping ok
...
I've not managed to dig in with much analysis yet (possibly something off with the current patches we have), but wanted to raise the issue in case others start to see it too.
thanks
-john
Quoted 48 lines · John Stultz
Quoted 8 lines · Takashi Iwai
sound fixes for 5.8-rc1
Here are last-minute fixes gathered before merge window close; a few fixes are for the core while the rest majority are driver fixes.
* PCM locking annotation fixes and the possible self-lock fix
* ASoC DPCM regression fixes with multi-CPU DAIJust as a heads up, we just recently got HDMI audio working on the Dragonboard 845c (Vinod has patches he's sending out here in the next few days), but they suddenly stopped working today with the following error:
[ 13.110725] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia1 mapping ok [ 13.119343] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia2 mapping ok [ 13.127969] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia3 mapping ok [ 13.135891] msm-snd-sdm845 soc@0:sound: Compress ASoC: snd-soc-dummy-dai <-> MultiMedia4 mapping ok [ 13.145042] msm-snd-sdm845 soc@0:sound: CPU DAI QUAT_MI2S_RX for rtd HDMI Playback does not support capture [ 13.154873] msm-snd-sdm845 soc@0:sound: ASoC: can't create pcm HDMI Playback :-22 [ 13.165634] snd-malloc: invalid device type 0 [ 13.170057] snd-malloc: invalid device type 0 [ 13.174888] msm-snd-sdm845 soc@0:sound: Sound card registration failed [ 13.181574] msm-snd-sdm845: probe of soc@0:sound failed with error -22I've bisected it down to the following commit from this pull req:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b73287f0b0745961b14e5ebcce92cc8ed24d4d52Without this patch:
[ 13.056906] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia1 mapping ok [ 13.075465] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia2 mapping ok [ 13.092949] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia3 mapping ok [ 13.109704] msm-snd-sdm845 soc@0:sound: Compress ASoC: snd-soc-dummy-dai <-> MultiMedia4 mapping ok [ 13.125584] msm-snd-sdm845 soc@0:sound: i2s-hifi <-> QUAT_MI2S_RX mapping ok [ 13.125621] msm-snd-sdm845 soc@0:sound: multicodec <-> SLIMBUS_0_RX mapping ok [ 13.141682] msm-snd-sdm845 soc@0:sound: wcd934x_tx1 <->
Quoted 6 lines
SLIMBUS_0_TXmapping ok
...I've not managed to dig in with much analysis yet (possibly something off with the current patches we have), but wanted to raise the issue in case others start to see it too.
I don't know the backgroun again, but would something like the following make sense?
https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/db845c-mainline-WIP&id=7e49b248db77b5ed29b2aa278268e77650c75482
It avoids failing completely if playback or capture isn't found.
thanks
-john
Thanks John for reporting this,
Quoted 56 lines · John Stultz
Quoted 48 lines · John Stultz
Quoted 8 lines · Takashi Iwai
sound fixes for 5.8-rc1
Here are last-minute fixes gathered before merge window close; a few fixes are for the core while the rest majority are driver fixes.
* PCM locking annotation fixes and the possible self-lock fix
* ASoC DPCM regression fixes with multi-CPU DAIJust as a heads up, we just recently got HDMI audio working on the Dragonboard 845c (Vinod has patches he's sending out here in the next few days), but they suddenly stopped working today with the following error:
[ 13.110725] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia1 mapping ok [ 13.119343] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia2 mapping ok [ 13.127969] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia3 mapping ok [ 13.135891] msm-snd-sdm845 soc@0:sound: Compress ASoC: snd-soc-dummy-dai <-> MultiMedia4 mapping ok [ 13.145042] msm-snd-sdm845 soc@0:sound: CPU DAI QUAT_MI2S_RX for rtd HDMI Playback does not support capture [ 13.154873] msm-snd-sdm845 soc@0:sound: ASoC: can't create pcm HDMI Playback :-22 [ 13.165634] snd-malloc: invalid device type 0 [ 13.170057] snd-malloc: invalid device type 0 [ 13.174888] msm-snd-sdm845 soc@0:sound: Sound card registration failed [ 13.181574] msm-snd-sdm845: probe of soc@0:sound failed with error -22I've bisected it down to the following commit from this pull req:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b73287f0b0745961b14e5ebcce92cc8ed24d4d52Without this patch:
[ 13.056906] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia1 mapping ok [ 13.075465] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia2 mapping ok [ 13.092949] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia3 mapping ok [ 13.109704] msm-snd-sdm845 soc@0:sound: Compress ASoC: snd-soc-dummy-dai <-> MultiMedia4 mapping ok [ 13.125584] msm-snd-sdm845 soc@0:sound: i2s-hifi <-> QUAT_MI2S_RX mapping ok [ 13.125621] msm-snd-sdm845 soc@0:sound: multicodec <-> SLIMBUS_0_RX mapping ok [ 13.141682] msm-snd-sdm845 soc@0:sound: wcd934x_tx1 <->Quoted 6 lines
SLIMBUS_0_TXmapping ok
...I've not managed to dig in with much analysis yet (possibly something off with the current patches we have), but wanted to raise the issue in case others start to see it too.
Quoted 5 lines
I don't know the backgroun again, but would something like the following make sense?
https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/db845c-mainline-WIP&id=7e49b248db77b5ed29b2aa278268e77650c75482It avoids failing completely if playback or capture isn't found.
Can you please try these two patches, I think the problem is that FE dailinks are always set to bidirectional, this two patches should fix it.
Once you confirm I can send them to list as fixes.
Thanks,
srini
Quoted 4 lines
thanks
-john
Quoted 8 lines · Srinivas Kandagatla
Can you please try these two patches, I think the problem is that FE dailinks are always set to bidirectional, this two patches should fix it.
Once you confirm I can send them to list as fixes.
These seem sensible to me, probably worth submitting them even if more investigation is needed on the original issue.
Quoted 69 lines · Srinivas Kandagatla
Thanks John for reporting this,
Quoted 56 lines · John Stultz
Quoted 48 lines · John Stultz
Quoted 8 lines · Takashi Iwai
sound fixes for 5.8-rc1
Here are last-minute fixes gathered before merge window close; a few fixes are for the core while the rest majority are driver fixes.
* PCM locking annotation fixes and the possible self-lock fix
* ASoC DPCM regression fixes with multi-CPU DAIJust as a heads up, we just recently got HDMI audio working on the Dragonboard 845c (Vinod has patches he's sending out here in the next few days), but they suddenly stopped working today with the following error:
[ 13.110725] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia1 mapping ok [ 13.119343] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia2 mapping ok [ 13.127969] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia3 mapping ok [ 13.135891] msm-snd-sdm845 soc@0:sound: Compress ASoC: snd-soc-dummy-dai <-> MultiMedia4 mapping ok [ 13.145042] msm-snd-sdm845 soc@0:sound: CPU DAI QUAT_MI2S_RX for rtd HDMI Playback does not support capture [ 13.154873] msm-snd-sdm845 soc@0:sound: ASoC: can't create pcm HDMI Playback :-22 [ 13.165634] snd-malloc: invalid device type 0 [ 13.170057] snd-malloc: invalid device type 0 [ 13.174888] msm-snd-sdm845 soc@0:sound: Sound card registration failed [ 13.181574] msm-snd-sdm845: probe of soc@0:sound failed with error -22I've bisected it down to the following commit from this pull req:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b73287f0b0745961b14e5ebcce92cc8ed24d4d52Without this patch:
[ 13.056906] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia1 mapping ok [ 13.075465] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia2 mapping ok [ 13.092949] msm-snd-sdm845 soc@0:sound: snd-soc-dummy-dai <-> MultiMedia3 mapping ok [ 13.109704] msm-snd-sdm845 soc@0:sound: Compress ASoC: snd-soc-dummy-dai <-> MultiMedia4 mapping ok [ 13.125584] msm-snd-sdm845 soc@0:sound: i2s-hifi <-> QUAT_MI2S_RX mapping ok [ 13.125621] msm-snd-sdm845 soc@0:sound: multicodec <-> SLIMBUS_0_RX mapping ok [ 13.141682] msm-snd-sdm845 soc@0:sound: wcd934x_tx1 <->Quoted 6 lines
SLIMBUS_0_TXmapping ok
...I've not managed to dig in with much analysis yet (possibly something off with the current patches we have), but wanted to raise the issue in case others start to see it too.
Quoted 5 lines
I don't know the backgroun again, but would something like the following make sense?
https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/db845c-mainline-WIP&id=7e49b248db77b5ed29b2aa278268e77650c75482It avoids failing completely if playback or capture isn't found.
Can you please try these two patches, I think the problem is that FE dailinks are always set to bidirectional, this two patches should fix it.
Quoted 6 lines
Once you confirm I can send them to list as fixes.
Yep! These two patches work for me! Thanks so much for the quick fix! -john
Quoted 4 lines · John Stultz
Quoted 2 lines · John Stultz
I've bisected it down to the following commit from this pull req:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b73287f0b0745961b14e5ebcce92cc8ed24d4d52
For the benefit of readers that's "ASoC: soc-pcm: dpcm: fix playback/capture checks".
Quoted 3 lines
I don't know the backgroun again, but would something like the following make sense?
https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/db845c-mainline-WIP&id=7e49b248db77b5ed29b2aa278268e77650c75482
That's a small out of tree test patch which has no changelog so I'm not entirely clear what the intent or motivation is but it looks like the goal is to change so that we only warn when a link says it supports playback/capture but some of the DAIs lack the capability instead of returning an error. I'm not sure I understand how that helps, it seems like the link is still misconfigured and we still have a warning which isn't great? Surely the issue is that we've flagged the link as supporting capture when it doesn't?
Please include human readable descriptions of things like commits and issues being discussed in e-mail in your mails, this makes them much easier for humans to read especially when they have no internet access. I do frequently catch up on my mail on flights or while otherwise travelling so this is even more pressing for me than just being about making things a bit easier to read.
Quoted 13 lines · Mark Brown
Quoted 4 lines · John Stultz
Quoted 2 lines · John Stultz
I've bisected it down to the following commit from this pull req:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b73287f0b0745961b14e5ebcce92cc8ed24d4d52For the benefit of readers that's "ASoC: soc-pcm: dpcm: fix playback/capture checks".
Quoted 3 lines
I don't know the backgroun again, but would something like the following make sense?
https://git.linaro.org/people/john.stultz/android-dev.git/commit/?h=dev/db845c-mainline-WIP&id=7e49b248db77b5ed29b2aa278268e77650c75482
Quoted 8 lines
That's a small out of tree test patch which has no changelog so I'm not entirely clear what the intent or motivation is but it looks like the goal is to change so that we only warn when a link says it supports playback/capture but some of the DAIs lack the capability instead of returning an error. I'm not sure I understand how that helps, it seems like the link is still misconfigured and we still have a warning which isn't great? Surely the issue is that we've flagged the link as supporting capture when it doesn't?
Indeed the addition of stricter checks will expose cases where the links are not well configured, probably for years. The patch "ASoC: soc-pcm: dpcm: fix playback/capture checks" did not add those checks, only fixed them for the multi-dai case.
I think that those configuration errors are the problem and should be fixed as a prerequisite to the removal of the duplication between dpcm_playback/dpcm_capture/playback_only/capture_only. it may be painful and generate noise for a while, but if we only throw a warning what are the odds all those configuration errors will eventually be fixed?
If we need more time for validation on all platforms, then maybe we can first relax the check for 5.8-rc1 as suggested by John, but re-add the -EINVAL on -next to give a target of 5.9 with all configurations fixed?
Quoted 5 lines · Pierre-Louis Bossart
I think that those configuration errors are the problem and should be fixed as a prerequisite to the removal of the duplication between dpcm_playback/dpcm_capture/playback_only/capture_only. it may be painful and generate noise for a while, but if we only throw a warning what are the odds all those configuration errors will eventually be fixed?
Yeah, I'm kind of pessimistic about the likelyhood of people paying attention to warnings.
Quoted 3 lines
If we need more time for validation on all platforms, then maybe we can first relax the check for 5.8-rc1 as suggested by John, but re-add the
-EINVALon -next to give a target of 5.9 with all configurations fixed?
I can't help feeling that it'd be postponing the inevitable, but perhaps I'm being overly pessimistic here. The change did obviously go in quite late though so it's not the worst idea if you want to send the patch?
Quoted 11 lines · Mark Brown
Quoted 5 lines · Pierre-Louis Bossart
I think that those configuration errors are the problem and should be fixed as a prerequisite to the removal of the duplication between dpcm_playback/dpcm_capture/playback_only/capture_only. it may be painful and generate noise for a while, but if we only throw a warning what are the odds all those configuration errors will eventually be fixed?
Yeah, I'm kind of pessimistic about the likelyhood of people paying attention to warnings.
Quoted 7 lines
Quoted 3 lines
If we need more time for validation on all platforms, then maybe we can first relax the check for 5.8-rc1 as suggested by John, but re-add the
-EINVALon -next to give a target of 5.9 with all configurations fixed?I can't help feeling that it'd be postponing the inevitable, but perhaps I'm being overly pessimistic here. The change did obviously go in quite late though so it's not the worst idea if you want to send the patch?
I see patches from Srinivas to fix the issue reported by John, so maybe apply those patches first and if we see another issue on another platform we relax the check?