1
0
Fork 0
Commit Graph

32887 Commits (074b326ee5e73c8e7a10d0eebbc6a1b56e1253d2)

Author SHA1 Message Date
Linus Torvalds 2ae048e166 sound fixes for 5.3-rc1
A collection of small fixes.
 
 - The optimization of PM resume with HD-audio HDMI codecs, which
   eventually work around weird issues
 - A correction of Intel Icelake HDMI audio code
 - Quirks for Dell machines with Realtek HD-audio codecs
 - The fix for too long sequencer write stall that was spotted by
   syzkaller
 - A few trivial cleanups reported by coccinelle
 -----BEGIN PGP SIGNATURE-----
 
 iQJCBAABCAAsFiEEIXTw5fNLNI7mMiVaLtJE4w1nLE8FAl0vJ90OHHRpd2FpQHN1
 c2UuZGUACgkQLtJE4w1nLE9GXxAArrSdDYQ8A+7Mm+fugZuBEWwxUFNiu3Kbi+p/
 +gtNkpb4hOh5GKeSWa5+Y6pmAseyY77Djn2RNRsZKbJR9Rfiw5GaJgjJv59qBCEb
 1xPMdulb4KU6BocfnbgM37Zi+SVJXK02KsqlVfTs4PV1Fiuxesr+xbaa0v2/qO/B
 vwYlKE7QOG5x9I0HD0i0keyxLip21Omv1902Ceu/5u+SlVV941SUJUgqr2/AFUUB
 lA3cAqQ9fS69El1zdjVD+x9f+JNIYeLnqLgPxT0wB+YgOsJJaUrv0Itog4z/AtJg
 KsADGBxDp6VSVBxYJdUqbJAtdNJdRQf3QwUfDTjkfpPNqlRITQeUwFLWPdLJGX2t
 2v18xhKqvEyXuLVkCvg3jft0TlK54gEp/0/SUUOeVPbHUD+HzVtBzwdB7fzyL0bf
 VGrtFiQdemDB2RxEEaq0s64piHN4aLyZTpZaiIzCeMZVh1hKw/AoKnhgsssL3VMD
 Bfu0g3idS9z5kq+gX2oxYyG8lyX+o/N7OERbXuEvvfYpTyWXOSwjZQnt1ZXXzL78
 2HyfVo/m37ei9+mLDCfPvj0uKQSakDF1qqWyk4IjRNNpTlA0oKOZ01X57cWoBCvF
 1Ye0xR/duNj33roWU56cXu/TXFi8iLCj8LTF8q7gCCR3O12pC6KJlYwHxgadFSOS
 YV2lHEQ=
 =p0qg
 -----END PGP SIGNATURE-----

Merge tag 'sound-fix-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A collection of small fixes.

   - The optimization of PM resume with HD-audio HDMI codecs, which
     eventually work around weird issues

   - A correction of Intel Icelake HDMI audio code

   - Quirks for Dell machines with Realtek HD-audio codecs

   - The fix for too long sequencer write stall that was spotted by
     syzkaller

   - A few trivial cleanups reported by coccinelle"

* tag 'sound-fix-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - Don't resume forcibly i915 HDMI/DP codec
  ALSA: hda/hdmi - Fix i915 reverse port/pin mapping
  ALSA: hda/hdmi - Remove duplicated define
  ALSA: seq: Break too long mutex context in the write loop
  ALSA: hda/realtek: apply ALC891 headset fixup to one Dell machine
  ALSA: rme9652: Unneeded variable: "result".
  ALSA: emu10k1: Remove unneeded variable "change"
  ALSA: au88x0: Remove unneeded variable: "changed"
  ALSA: hda/realtek - Fixed Headphone Mic can't record on Dell platform
  ALSA: ps3: Remove Unneeded variable: "ret"
  ALSA: lx6464es: Remove unneeded variable err
2019-07-18 09:36:51 -07:00
Weitao Hou 65f50f2553 kernel: fix typos and some coding style in comments
fix lenght to length

Link: http://lkml.kernel.org/r/20190521050937.4370-1-houweitaoo@gmail.com
Signed-off-by: Weitao Hou <houweitaoo@gmail.com>
Acked-by: Kees Cook <keescook@chromium.org>
Cc: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2019-07-16 19:23:21 -07:00
Takashi Iwai 4914da2fb0 ALSA: hda - Don't resume forcibly i915 HDMI/DP codec
We apply the codec resume forcibly at system resume callback for
updating and syncing the jack detection state that may have changed
during sleeping.  This is, however, superfluous for the codec like
Intel HDMI/DP, where the jack detection is managed via the audio
component notification; i.e. the jack state change shall be reported
sooner or later from the graphics side at mode change.

This patch changes the codec resume callback to avoid the forcible
resume conditionally with a new flag, codec->relaxed_resume, for
reducing the resume time.  The flag is set in the codec probe.

Although this doesn't fix the entire bug mentioned in the bugzilla
entry below, it's still a good optimization and some improvements are
seen.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=201901
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-16 22:46:13 +02:00
Takashi Iwai 3140aafb22 ALSA: hda/hdmi - Fix i915 reverse port/pin mapping
The recent fix for Icelake HDMI codec introduced the mapping from pin
NID to the i915 gfx port number.  However, it forgot the reverse
mapping from the port number to the pin NID that is used in the ELD
notifier callback.  As a result, it's processed to a wrong widget and
gives a warning like
  snd_hda_codec_hdmi hdaudioC0D2: HDMI: pin nid 5 not registered

This patch corrects it with a proper reverse mapping function.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=204133
Fixes: b0d8bc50b9 ("ALSA: hda: hdmi - add Icelake support")
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-16 16:39:35 +02:00
Takashi Iwai eb4177116b ALSA: hda/hdmi - Remove duplicated define
INTEL_GET_VENDOR_VERB is defined twice identically.
Let's remove a superfluous line.

Fixes: b0d8bc50b9 ("ALSA: hda: hdmi - add Icelake support")
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-16 09:41:41 +02:00
Takashi Iwai ede34f397d ALSA: seq: Break too long mutex context in the write loop
The fix for the racy writes and ioctls to sequencer widened the
application of client->ioctl_mutex to the whole write loop.  Although
it does unlock/relock for the lengthy operation like the event dup,
the loop keeps the ioctl_mutex for the whole time in other
situations.  This may take quite long time if the user-space would
give a huge buffer, and this is a likely cause of some weird behavior
spotted by syzcaller fuzzer.

This patch puts a simple workaround, just adding a mutex break in the
loop when a large number of events have been processed.  This
shouldn't hit any performance drop because the threshold is set high
enough for usual operations.

Fixes: 7bd8009156 ("ALSA: seq: More protection for concurrent write and ioctl races")
Reported-by: syzbot+97aae04ce27e39cbfca9@syzkaller.appspotmail.com
Reported-by: syzbot+4c595632b98bb8ffcc66@syzkaller.appspotmail.com
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-16 09:41:41 +02:00
Hui Wang 4b4e0e32e4 ALSA: hda/realtek: apply ALC891 headset fixup to one Dell machine
Without this patch, the headset-mic and headphone-mic don't work.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-16 09:34:57 +02:00
Hariprasad Kelam 2f235d92ac ALSA: rme9652: Unneeded variable: "result".
This patch fixes below issue reported by coccicheck

sound/pci/rme9652/rme9652.c:2161:5-11: Unneeded variable: "result".
Return "0" on line 2167

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-15 08:54:35 +02:00
Hariprasad Kelam b7cad26d15 ALSA: emu10k1: Remove unneeded variable "change"
fix below issue reported by coccicheck
sound/pci/emu10k1/emu10k1x.c:1077:5-11: Unneeded variable: "change".
Return "0" on line 1092

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-15 08:54:09 +02:00
Hariprasad Kelam 5e19cad550 ALSA: au88x0: Remove unneeded variable: "changed"
Fix below issues reported by coccicheck

sound/pci/au88x0/au88x0_a3d.c:821:8-15: Unneeded variable: "changed".
Return "1" on line 834
sound/pci/au88x0/au88x0_a3d.c:768:5-12: Unneeded variable: "changed".
Return "1" on line 777
sound/pci/au88x0/au88x0_a3d.c:804:5-12: Unneeded variable: "changed".
Return "1" on line 813
sound/pci/au88x0/au88x0_a3d.c:786:8-15: Unneeded variable: "changed".
Return "1" on line 796

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-15 08:53:50 +02:00
Kailang Yang fbc571290d ALSA: hda/realtek - Fixed Headphone Mic can't record on Dell platform
It assigned to wrong model. So, The headphone Mic can't work.

Fixes: 3f640970a4 ("ALSA: hda - Fix headset mic detection problem for several Dell laptops")
Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-15 08:53:07 +02:00
Linus Torvalds f632a8170a Driver Core and debugfs changes for 5.3-rc1
Here is the "big" driver core and debugfs changes for 5.3-rc1
 
 It's a lot of different patches, all across the tree due to some api
 changes and lots of debugfs cleanups.  Because of this, there is going
 to be some merge issues with your tree at the moment, I'll follow up
 with the expected resolutions to make it easier for you.
 
 Other than the debugfs cleanups, in this set of changes we have:
 	- bus iteration function cleanups (will cause build warnings
 	  with s390 and coresight drivers in your tree)
 	- scripts/get_abi.pl tool to display and parse Documentation/ABI
 	  entries in a simple way
 	- cleanups to Documenatation/ABI/ entries to make them parse
 	  easier due to typos and other minor things
 	- default_attrs use for some ktype users
 	- driver model documentation file conversions to .rst
 	- compressed firmware file loading
 	- deferred probe fixes
 
 All of these have been in linux-next for a while, with a bunch of merge
 issues that Stephen has been patient with me for.  Other than the merge
 issues, functionality is working properly in linux-next :)
 
 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 -----BEGIN PGP SIGNATURE-----
 
 iG0EABECAC0WIQT0tgzFv3jCIUoxPcsxR9QN2y37KQUCXSgpnQ8cZ3JlZ0Brcm9h
 aC5jb20ACgkQMUfUDdst+ykcwgCfS30OR4JmwZydWGJ7zK/cHqk+KjsAnjOxjC1K
 LpRyb3zX29oChFaZkc5a
 =XrEZ
 -----END PGP SIGNATURE-----

Merge tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core

Pull driver core and debugfs updates from Greg KH:
 "Here is the "big" driver core and debugfs changes for 5.3-rc1

  It's a lot of different patches, all across the tree due to some api
  changes and lots of debugfs cleanups.

  Other than the debugfs cleanups, in this set of changes we have:

   - bus iteration function cleanups

   - scripts/get_abi.pl tool to display and parse Documentation/ABI
     entries in a simple way

   - cleanups to Documenatation/ABI/ entries to make them parse easier
     due to typos and other minor things

   - default_attrs use for some ktype users

   - driver model documentation file conversions to .rst

   - compressed firmware file loading

   - deferred probe fixes

  All of these have been in linux-next for a while, with a bunch of
  merge issues that Stephen has been patient with me for"

* tag 'driver-core-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (102 commits)
  debugfs: make error message a bit more verbose
  orangefs: fix build warning from debugfs cleanup patch
  ubifs: fix build warning after debugfs cleanup patch
  driver: core: Allow subsystems to continue deferring probe
  drivers: base: cacheinfo: Ensure cpu hotplug work is done before Intel RDT
  arch_topology: Remove error messages on out-of-memory conditions
  lib: notifier-error-inject: no need to check return value of debugfs_create functions
  swiotlb: no need to check return value of debugfs_create functions
  ceph: no need to check return value of debugfs_create functions
  sunrpc: no need to check return value of debugfs_create functions
  ubifs: no need to check return value of debugfs_create functions
  orangefs: no need to check return value of debugfs_create functions
  nfsd: no need to check return value of debugfs_create functions
  lib: 842: no need to check return value of debugfs_create functions
  debugfs: provide pr_fmt() macro
  debugfs: log errors when something goes wrong
  drivers: s390/cio: Fix compilation warning about const qualifiers
  drivers: Add generic helper to match by of_node
  driver_find_device: Unify the match function with class_find_device()
  bus_find_device: Unify the match callback with class_find_device
  ...
2019-07-12 12:24:03 -07:00
Linus Torvalds d7d170a8e3 chrome platform changes for v5.3
* CrOS EC:
 
 - Add new CrOS ISHTP transport protocol
 - Add proper documentation for debugfs entries and expose resume and uptime files
 - Select LPC transport protocol variant at runtime.
 - Add lid angle sensor driver
 - Fix oops on suspend/resume for lightbar driver
 - Set CrOS SPI transport protol in realtime
 
 * Wilco EC:
 
 - Add telemetry char device interface
 - Add support for event handling
 - Add new sysfs attributes
 
 * Misc:
 - Contains ib-mfd-cros-v5.3 immutable branch from mfd, with cros_ec_commands.h
   header freshly synced with Chrome OS's EC project.
 -----BEGIN PGP SIGNATURE-----
 
 iHUEABYKAB0WIQQCtZK6p/AktxXfkOlzbaomhzOwwgUCXSbP3AAKCRBzbaomhzOw
 wjoNAP4lrY3UboMaQklHLOCxPTFXwIHjImXxJUCrezJj4eBRcwEAz+adSNKieVEY
 xNf/yetCkjVnQNMVjGaBJRUp3F+2LwQ=
 =/Xj3
 -----END PGP SIGNATURE-----

Merge tag 'tag-chrome-platform-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux

Pull chrome platform updates from Benson Leung
 "CrOS EC:
   - Add new CrOS ISHTP transport protocol
   - Add proper documentation for debugfs entries and expose resume and
     uptime files
   - Select LPC transport protocol variant at runtime.
   - Add lid angle sensor driver
   - Fix oops on suspend/resume for lightbar driver
   - Set CrOS SPI transport protol in realtime

  Wilco EC:
   - Add telemetry char device interface
   - Add support for event handling
   - Add new sysfs attributes

  Misc:
   - Contains ib-mfd-cros-v5.3 immutable branch from mfd, with
     cros_ec_commands.h header freshly synced with Chrome OS's EC
     project"

* tag 'tag-chrome-platform-for-v5.3' of git://git.kernel.org/pub/scm/linux/kernel/git/chrome-platform/linux: (54 commits)
  mfd / platform: cros_ec_debugfs: Expose resume result via debugfs
  platform/chrome: lightbar: Get drvdata from parent in suspend/resume
  iio: cros_ec: Add lid angle driver
  platform/chrome: wilco_ec: Add circular buffer as event queue
  platform/chrome: cros_ec_lpc_mec: Fix kernel-doc comment first line
  platform/chrome: cros_ec_lpc: Choose Microchip EC at runtime
  platform/chrome: cros_ec_lpc: Merge cros_ec_lpc and cros_ec_lpc_reg
  Input: cros_ec_keyb: mask out extra flags in event_type
  platform/chrome: wilco_ec: Fix unreleased lock in event_read()
  platform/chrome: cros_ec_debugfs: cros_ec_uptime_fops can be static
  platform/chrome: cros_ec_debugfs: Add debugfs ABI documentation
  platform/chrome: cros_ec_debugfs: Fix kernel-doc comment first line
  platform/chrome: cros_ec_debugfs: Add debugfs entry to retrieve EC uptime
  mfd: cros_ec: Update I2S API
  mfd: cros_ec: Add Management API entry points
  mfd: cros_ec: Add SKU ID and Secure storage API
  mfd: cros_ec: Add API for rwsig
  mfd: cros_ec: Add API for Fingerprint support
  mfd: cros_ec: Add API for Touchpad support
  mfd: cros_ec: Add API for EC-EC communication
  ...
2019-07-11 18:45:29 -07:00
Hariprasad Kelam 73948ca057 ALSA: ps3: Remove Unneeded variable: "ret"
This patch fixes below issue reported by coccicheck
sound/ppc/snd_ps3.c:631:5-8: Unneeded variable: "ret". Return "0" on
line 668

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-10 11:53:31 +02:00
Hariprasad Kelam 7a3c2b6938 ALSA: lx6464es: Remove unneeded variable err
This patch fixes below issue reported by coccicheck
sound/pci/lx6464es/lx6464es.c:256:5-8: Unneeded variable: "err". Return
"0" on line 258

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-10 11:53:03 +02:00
Linus Torvalds e9a83bd232 It's been a relatively busy cycle for docs:
- A fair pile of RST conversions, many from Mauro.  These create more
    than the usual number of simple but annoying merge conflicts with other
    trees, unfortunately.  He has a lot more of these waiting on the wings
    that, I think, will go to you directly later on.
 
  - A new document on how to use merges and rebases in kernel repos, and one
    on Spectre vulnerabilities.
 
  - Various improvements to the build system, including automatic markup of
    function() references because some people, for reasons I will never
    understand, were of the opinion that :c:func:``function()`` is
    unattractive and not fun to type.
 
  - We now recommend using sphinx 1.7, but still support back to 1.4.
 
  - Lots of smaller improvements, warning fixes, typo fixes, etc.
 -----BEGIN PGP SIGNATURE-----
 
 iQFDBAABCAAtFiEEIw+MvkEiF49krdp9F0NaE2wMflgFAl0krAEPHGNvcmJldEBs
 d24ubmV0AAoJEBdDWhNsDH5Yg98H/AuLqO9LpOgUjF4LhyjxGPdzJkY9RExSJ7km
 gznyreLCZgFaJR+AY6YDsd4Jw6OJlPbu1YM/Qo3C3WrZVFVhgL/s2ebvBgCo50A8
 raAFd8jTf4/mGCHnAqRotAPQ3mETJUk315B66lBJ6Oc+YdpRhwXWq8ZW2bJxInFF
 3HDvoFgMf0KhLuMHUkkL0u3fxH1iA+KvDu8diPbJYFjOdOWENz/CV8wqdVkXRSEW
 DJxIq89h/7d+hIG3d1I7Nw+gibGsAdjSjKv4eRKauZs4Aoxd1Gpl62z0JNk6aT3m
 dtq4joLdwScydonXROD/Twn2jsu4xYTrPwVzChomElMowW/ZBBY=
 =D0eO
 -----END PGP SIGNATURE-----

Merge tag 'docs-5.3' of git://git.lwn.net/linux

Pull Documentation updates from Jonathan Corbet:
 "It's been a relatively busy cycle for docs:

   - A fair pile of RST conversions, many from Mauro. These create more
     than the usual number of simple but annoying merge conflicts with
     other trees, unfortunately. He has a lot more of these waiting on
     the wings that, I think, will go to you directly later on.

   - A new document on how to use merges and rebases in kernel repos,
     and one on Spectre vulnerabilities.

   - Various improvements to the build system, including automatic
     markup of function() references because some people, for reasons I
     will never understand, were of the opinion that
     :c:func:``function()`` is unattractive and not fun to type.

   - We now recommend using sphinx 1.7, but still support back to 1.4.

   - Lots of smaller improvements, warning fixes, typo fixes, etc"

* tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
  docs: automarkup.py: ignore exceptions when seeking for xrefs
  docs: Move binderfs to admin-guide
  Disable Sphinx SmartyPants in HTML output
  doc: RCU callback locks need only _bh, not necessarily _irq
  docs: format kernel-parameters -- as code
  Doc : doc-guide : Fix a typo
  platform: x86: get rid of a non-existent document
  Add the RCU docs to the core-api manual
  Documentation: RCU: Add TOC tree hooks
  Documentation: RCU: Rename txt files to rst
  Documentation: RCU: Convert RCU UP systems to reST
  Documentation: RCU: Convert RCU linked list to reST
  Documentation: RCU: Convert RCU basic concepts to reST
  docs: filesystems: Remove uneeded .rst extension on toctables
  scripts/sphinx-pre-install: fix out-of-tree build
  docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
  Documentation: PGP: update for newer HW devices
  Documentation: Add section about CPU vulnerabilities for Spectre
  Documentation: platform: Delete x86-laptop-drivers.txt
  docs: Note that :c:func: should no longer be used
  ...
2019-07-09 12:34:26 -07:00
Takashi Sakamoto 0dcb4efb10 ALSA: firewire-lib: code refactoring for local variables
It's better to use int type for loop index. For consistency, the name
of local variable for the number of data block should be plural.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-08 14:50:42 +02:00
Takashi Sakamoto 02394af3e0 ALSA: firewire-lib: code refactoring for post operation to data block counter
As a result of former commits, post operation to data block count for
cases without CIP_DBC_IS_END_EVENT can be done just with
data_block_counter member of amdtp_stream structure.

This commit adds code refactoring to obsolete local variable for
data block counter.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-08 14:50:41 +02:00
Takashi Sakamoto b8b0e24c22 ALSA: firewire-lib: code refactoring for error path of parser for CIP header
When a parser for CIP header returns -EAGAIN, no extra care is needed
to probe tracepoints event.

This commit adds code refactoring for the error path.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-08 14:50:40 +02:00
Takashi Sakamoto 213fa98981 ALSA: firewire-lib: fix different data block counter between probed event and transferred isochronous packet
For IT context, tracepoints event is probed after calculating next data
block counter. This brings difference of data block counter between
the probed event and actual isochronous packet.

This commit fixes it.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-08 14:50:40 +02:00
Takashi Sakamoto 4ece7f6fd8 ALSA: firewire-lib: fix initial value of data block count for IR context without CIP_DBC_IS_END_EVENT
For IR context, ALSA IEC 61883-1/6 engine uses initial value of data
block counter as UINT_MAX, to detect first isochronous packet in the
middle of packet streaming.

At present, when CIP_DBC_IS_END_EVENT is not used (i.e. for drivers except
for ALSA fireworks driver), the initial value is used as is for
tracepoints event. However, the engine can detect the value of dbc field
in the payload of first isochronous packet and the value should be assigned
to the event.

This commit fixes the bug.

Fixes: 76864868db ("ALSA: firewire-lib: cache next data_block_counter after probing tracepoints event for IR context")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-08 14:50:38 +02:00
Takashi Sakamoto 7fbf909668 ALSA: firewire-lib/fireface: fix initial value of data block counter for IR context with CIP_NO_HEADER
For IR context, ALSA IEC 61883-1/6 engine uses initial value of data
block counter as UINT_MAX, to detect first isochronous packet in the
middle of packet streaming.

At present, when CIP_NO_HEADER is used (i.e. for ALSA fireface driver),
the initial value is used for tracepoints event. 0x00 should be
for the event when the initial value is UINT_MAX because isochronous
packets with CIP_NO_HEADER option has no field for data block count.

This commit fixes the bug.

Fixes: 76864868db ("ALSA: firewire-lib: cache next data_block_counter after probing tracepoints event for IR context")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-08 14:50:37 +02:00
Takashi Sakamoto 0ebf3ceb83 ALSA: firewire-lib: fix invalid length of rx packet payload for tracepoint events
Although CIP header is handled as context header, the length of isochronous
packet includes two quadlets for its payload. In tracepoints event the
value of payload_quadlets should includes the two quadlets. But at present
it doesn't.

This commit fixes the bug.

Fixes: b18f0cfaf1 ("ALSA: firewire-lib: use 8 byte packet header for IT context to separate CIP header from CIP payload")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-08 14:50:36 +02:00
Takashi Iwai 3c53c6255d ASoC: Updates for v5.3
This is a very big update, mainly thanks to Morimoto-san's refactoring
 work and some fairly large new drivers.
 
  - Lots more work on moving towards a component based framework from
    Morimoto-san.
  - Support for force disconnecting muxes from Jerome Brunet.
  - New drivers for Cirrus Logic CS47L35, CS47L85 and CS47L90, Conexant
    CX2072X, Realtek RT1011 and RT1308.
 -----BEGIN PGP SIGNATURE-----
 
 iQFHBAABCgAxFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAl0jGwUTHGJyb29uaWVA
 a2VybmVsLm9yZwAKCRAk1otyXVSH0LD4B/9AkutfS+vznOrk0V0wFb2SUfjwE4Pr
 +z/kAehohAOl/7pg9Dun/lmZYBWMyOM2aYmK81ahEo2DfO+uzwkwjCaXFjGVGwEK
 j7XpWkrIjKnou/z1FeALgVvt+crzdy5iNWC04AbKaP2WHCcI7zvPQIsBta/V0OJt
 lg+j0J7pagnTMcgV1+qJdaASmofy/hpoZ79Gv0PIfGC8hpJ/3mBgcNPCLQrJtD4R
 v+tzvCZNrZVqCanwLf3vouEm1bpWYOpI+Wdmu4u6rY7MhmCj72EJ2zyfdm/qtaxF
 e7whgCyOQFkWe7NgDn0G08aAT6LsaxOtPNr7H8tL8S8sw8425fqeOouV
 =n/HQ
 -----END PGP SIGNATURE-----

Merge tag 'asoc-v5.3' of https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-linus

ASoC: Updates for v5.3

This is a very big update, mainly thanks to Morimoto-san's refactoring
work and some fairly large new drivers.

 - Lots more work on moving towards a component based framework from
   Morimoto-san.
 - Support for force disconnecting muxes from Jerome Brunet.
 - New drivers for Cirrus Logic CS47L35, CS47L85 and CS47L90, Conexant
   CX2072X, Realtek RT1011 and RT1308.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-08 14:45:34 +02:00
Takashi Iwai b89b889a32 Merge branch 'topic/hda-refresh-cleanup' into for-next
Merge a cleanup for HD-audio widget refresh code

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-07 11:29:30 +02:00
Nicola Lunghi d4bd305326 ALSA: usb-audio: fix Line6 Helix audio format rates
Line6 Helix and HX stomp devices don't support retrieving
the number of clock sample rate.

Add a quirk to set it to 48Khz by default.

[ fixed wrong variable initialization changes by tiwai ]

Signed-off-by: Nicola Lunghi <nick83ola@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-07 11:27:32 +02:00
Takashi Sakamoto ba18ca2b8e firewire-motu: fix wrong reference count for stream functionality at error path of rawmidi interface
In IEC 61883-6, several types of sampling data can be multiplexed into
payload of common isochronous packet (CIP). For typical audio and music
units, PCM samples and MIDI messages are multiplexed into one packet
streaming.

ALSA firewire-motu driver allows applications of rawmidi interface to
start packet streaming for transmission of MIDI messages. However at
error path, the reference count of stream functionality is not operated
correctly. This can brings a bug that packet streaming is not stopped
when all referrers release the count.

This commit fixes the bug.

Fixes: 8edc56ec8f ("ALSA: firewire-motu: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-07 11:19:58 +02:00
Takashi Sakamoto 64582c56a9 ALSA: firewire-digi00x: fix wrong reference count for stream functionality at error path of rawmidi interface
In IEC 61883-6, several types of sampling data can be multiplexed into
payload of common isochronous packet (CIP). For typical audio and music
units, PCM samples and MIDI messages are multiplexed into one packet
streaming.

ALSA firewire-digi00x driver allows applications of rawmidi interface to
start packet streaming for transmission of MIDI messages. However at
error path, the reference count of stream functionality is not operated
correctly. This can brings a bug that packet streaming is not stopped
when all referrers release the count.

This commit fixes the bug.

Fixes: ae8ffbb265 ("ALSA: firewire-digi00x: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-07 11:19:57 +02:00
Takashi Sakamoto e79c3f0c00 ALSA: dice: fix wrong reference count for stream functionality at error path of rawmidi interface
In IEC 61883-6, several types of sampling data can be multiplexed into
payload of common isochronous packet (CIP). For typical audio and music
units, PCM samples and MIDI messages are multiplexed into one packet
streaming.

ALSA dice driver allows applications of rawmidi interface to start
packet streaming for transmission of MIDI messages. However at error
path, the reference count of stream functionality is not operated
correctly. This can brings a bug that packet streaming is not stopped
when all referrers release the count.

This commit fixes the bug.

Fixes: 3cd2c2d780 ("ALSA: dice: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-07 11:19:57 +02:00
Takashi Sakamoto 03a954aef7 ALSA: oxfw: fix wrong reference count for stream functionality at error path of rawmidi interface
In IEC 61883-6, several types of sampling data can be multiplexed into
payload of common isochronous packet (CIP). For typical audio and music
units, PCM samples and MIDI messages are multiplexed into one packet
streaming.

ALSA oxfw driver allows applications of rawmidi interface to start
packet streaming for transmission of MIDI messages. However at error
path, the reference count of stream functionality is not operated
correctly. This can brings a bug that packet streaming is not stopped
when all referrers release the count.

This commit fixes the bug.

Fixes: 4f380d0070 ("ALSA: oxfw: configure packet format in pcm.hw_params callback")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-07 11:19:56 +02:00
Takashi Sakamoto 2e9f17e34e ALSA: fireworks: fix wrong reference count for stream functionality at error path of rawmidi interface
In IEC 61883-6, several types of sampling data can be multiplexed into
payload of common isochronous packet (CIP). For typical audio and music
units, PCM samples and MIDI messages are multiplexed into one packet
streaming.

ALSA fireworks driver allows applications of rawmidi interface to start
packet streaming for transmission of MIDI messages. However at error
path, the reference count of stream functionality is not operated
correctly. This can brings a bug that packet streaming is not stopped
when all referrers release the count.

This commit fixes the bug.

Fixes: 3d7250667e ("ALSA: fireworks: configure sampling transfer frequency in pcm.hw_params callback")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-07 11:19:56 +02:00
Takashi Sakamoto 097f8ba387 ALSA: bebob: fix wrong reference count for stream functionality at error path of rawmidi interface
In IEC 61883-6, several types of sampling data can be multiplexed into
payload of common isochronous packet (CIP). For typical audio and music
units, PCM samples and MIDI messages are multiplexed into one packet
streaming.

ALSA bebob driver allows applications of rawmidi interface to start
packet streaming for transmission of MIDI messages. However at error
path, the reference count of stream functionality is not operated
correctly. This can brings a bug that packet streaming is not stopped
when all referrers release the count.

This commit fixes the bug.

Fixes: ac2888b958 ("ALSA: bebob: configure sampling transfer frequency in pcm.hw_params callback")
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-07 11:19:55 +02:00
Mark Brown 043b35f281
Merge branch 'asoc-5.3' into asoc-next 2019-07-06 12:25:26 +01:00
Mark Brown 0dceaf7c79
Merge branch 'asoc-5.2' into asoc-linus 2019-07-06 12:25:24 +01:00
Kai Vehmanen 87a6fe80d5
ASoC: SOF: Intel: implement runtime idle for CNL/APL
Implement runtime idle for CNL/APL devices using similar runtime
PM idle logic as the Intel AZX HDA driver. If any HDA codecs are
powered when runtime suspend request comes, return -EBUSY. By doing
this, strict ordering is enforced between HDA codec and the HDA
controller.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20190702132428.13129-4-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-06 12:23:47 +01:00
Kai Vehmanen 62fde9772d
ASoC: SOF: add runtime idle callback
Add ability to implement a SOF device level runtime idle callback.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20190702132428.13129-3-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-06 12:23:24 +01:00
Kai Vehmanen e62bccf8a5
ASoC: hdac_hdmi: report codec link up/down status to bus
Report codec power status to the HDA codec bus from runtime pm
suspend and resume callbacks. This is required to implement
runtime idle logic that relies on 'codec_powered' field of hdac_bus
to be maintained for all codecs.

Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20190702132428.13129-2-kai.vehmanen@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-06 12:23:00 +01:00
Wei Yongjun b90bab3b1b
ASoC: SOF: debug: fix possible memory leak in sof_dfsentry_write()
'string' is malloced in sof_dfsentry_write() and should be freed
before leaving from the error handling cases, otherwise it will cause
memory leak.

Fixes: 091c12e1f5 ("ASoC: SOF: debug: add new debugfs entries for IPC flood test")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Link: https://lore.kernel.org/r/20190705081637.157169-1-weiyongjun1@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-05 17:58:51 +01:00
Luca Weiss 1fe08602d1
ASoC: sunxi: sun50i-codec-analog: Add earpiece
This adds the necessary registers and audio routes to play audio using
the Earpiece, that's supported on the A64.

Signed-off-by: Luca Weiss <luca@z3ntu.xyz>
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20190703184814.27191-1-luca@z3ntu.xyz
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-05 17:58:31 +01:00
Colin Ian King 590eb2f4ef
ASoC: rt5665: remove redundant assignment to variable idx
The variable idx is being initialized with a value that is never
read and it is being updated later with a new value. The
initialization is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Link: https://lore.kernel.org/r/20190705075303.14692-1-colin.king@canonical.com
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-05 17:58:11 +01:00
Srinivas Kandagatla c150266f59
ASoC: wcd9335: remove multiple defines.
Found during review that there are multiple defines of same constants.
This patch removes them!

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20190704165410.7173-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-05 17:57:48 +01:00
Colin Ian King 388b00f045 ALSA: cs4281: remove redundant assignment to variable val and remove a goto
The variable val is being assigned with a value that is never
read and it is being updated later with a new value. The
assignment is redundant and can be removed.  Also remove a
goto statement and a label and replace with a break statement.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-05 12:10:36 +02:00
Takashi Iwai 774a075ab5 ALSA: hda: Simplify snd_hdac_refresh_widgets()
Along with the recent fix for the races of snd_hdac_refresh_widgets()
it turned out that the instantiation of widgets sysfs at
snd_hdac_sysfs_reinit() could cause a race.  The race itself was
already covered later by extending the mutex protection range, the
commit 98482377dc ("ALSA: hda: Fix widget_mutex incomplete
protection"), but this also indicated that the call of *_reinit() is
basically superfluous, as the widgets shall be created sooner or later
from snd_hdac_device_register().

This patch removes the redundant call of snd_hdac_sysfs_reinit() at
first.  By this removal, the sysfs argument itself in
snd_hdac_refresh_widgets() becomes superfluous, too, because the only
case sysfs=false is always with codec->widgets=NULL.  So, we drop this
redundant argument as well.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-05 12:01:06 +02:00
Hariprasad Kelam bb26e0c636 ALSA: asihpi: Remove unneeded variable change
this patch fixes below issue reported by coccicheck
sound/pci/asihpi/asihpi.c:1558:5-11: Unneeded variable: "change". Return
"1" on line 1564

Signed-off-by: Hariprasad Kelam <hariprasad.kelam@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-05 08:19:18 +02:00
Takashi Iwai ca95c7bf3d ALSA: usb-audio: Fix parse of UAC2 Extension Units
Extension Unit (XU) is used to have a compatible layout with
Processing Unit (PU) on UAC1, and the usb-audio driver code assumed it
for parsing the descriptors.  Meanwhile, on UAC2, XU became slightly
incompatible with PU; namely, XU has a one-byte bmControls bitmap
while PU has two bytes bmControls bitmap.  This incompatibility
results in the read of a wrong address for the last iExtension field,
which ended up with an incorrect string for the mixer element name, as
recently reported for Focusrite Scarlett 18i20 device.

This patch corrects this misalignment by introducing a couple of new
macros and calling them depending on the descriptor type.

Fixes: 23caaf19b1 ("ALSA: usb-mixer: Add support for Audio Class v2.0")
Reported-by: Stefan Sauer <ensonic@hora-obscura.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-05 08:06:47 +02:00
Colin Ian King 335399362a ALSA: hda/ca0132 - remove redundant assignment to variable 'changed'
The variable 'changed' is being initialized with a value that is never
read and it is being updated later with a new value. The initialization
is redundant and can be removed.

Addresses-Coverity: ("Unused value")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-04 15:13:38 +02:00
Kailang Yang d07a9a4f66 ALSA: hda/realtek - Headphone Mic can't record after S3
Dell headset mode platform with ALC236.
It doesn't recording after system resume from S3.
S3 mode was deep. s2idle was not has this issue.
S3 deep will cut of codec power. So, the register will back to default
after resume back.
This patch will solve this issue.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2019-07-04 15:09:06 +02:00
Wen Yang 1bcc1fd64e
ASoC: audio-graph-card: fix use-after-free in graph_for_each_link
After calling of_node_put() on the codec_ep and codec_port variables,
they are still being used, which may result in use-after-free.
We fix this issue by calling of_node_put() after the last usage.

Fixes: fce9b90c1a ("ASoC: audio-graph-card: cleanup DAI link loop method - step2")
Signed-off-by: Wen Yang <wen.yang99@zte.com.cn>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Takashi Iwai <tiwai@suse.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: alsa-devel@alsa-project.org
Cc: linux-kernel@vger.kernel.org
Link: https://lore.kernel.org/r/1562229530-8121-1-git-send-email-wen.yang99@zte.com.cn
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-04 13:15:37 +01:00
Srinivas Kandagatla 9aa0cf7956
ASoC: qdsp6: q6afe-dai: Add missing Slimbus0 audio route
For some reason SLIMBus RX0 playback is not added to audio routes.
This patch adds the missing route.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20190703123102.12626-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-04 00:03:10 +01:00
Srinivas Kandagatla 74b35a74f8
ASoC: core: Return -ENOTSUPP from set_channel_map() if no operation provided
It makes it easier for common code to work with snd_soc_dai_set_channel_map()
by distinguishing between operation not being supported and an error.
This is done inline with others snd_soc_dai.* apis.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20190703123002.12427-1-srinivas.kandagatla@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
2019-07-04 00:02:52 +01:00