OSDN Git Service

uclinux-h8/linux.git
4 years agoALSA: hda: Add support for Loongson 7A1000 controller
Kaige Li [Fri, 17 Jul 2020 02:51:32 +0000 (10:51 +0800)]
ALSA: hda: Add support for Loongson 7A1000 controller

Add the new PCI ID 0x0014 0x7a07 to support Loongson 7A1000 controller.

Signed-off-by: Kaige Li <likaige@loongson.cn>
Link: https://lore.kernel.org/r/1594954292-1703-2-git-send-email-likaige@loongson.cn
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoRevert "ALSA: pcm: Use SG-buffer only when direct DMA is available"
Takashi Iwai [Fri, 17 Jul 2020 06:41:30 +0000 (08:41 +0200)]
Revert "ALSA: pcm: Use SG-buffer only when direct DMA is available"

This reverts commit 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when
direct DMA is available") also the modification commit 467fd0e82b62
("ALSA: pcm: Fix build error on m68k and others").

Poking the DMA internal helper is a layer violation, so we should
avoid that.  Meanwhile the actual bug has been addressed by the
Kconfig fix in commit dbed452a078d ("dma-pool: decouple DMA_REMAP from
DMA_COHERENT_POOL"), so we can live without this hack.

Link: https://lore.kernel.org/r/20200717064130.22957-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb-audio: Replace blacklist word
Takashi Iwai [Tue, 14 Jul 2020 17:26:31 +0000 (19:26 +0200)]
ALSA: usb-audio: Replace blacklist word

Follow the recent inclusive terminology guidelines and replace the
word "blacklist" appropriately.

Only a comment fix, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: via82xx: Replace the words whitelist
Takashi Iwai [Tue, 14 Jul 2020 17:26:30 +0000 (19:26 +0200)]
ALSA: via82xx: Replace the words whitelist

Follow the recent inclusive terminology guidelines and replace the
words "whitelist" appropriately.

Only comment or variable renames, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: nm256: Replace the words blacklist
Takashi Iwai [Tue, 14 Jul 2020 17:26:29 +0000 (19:26 +0200)]
ALSA: nm256: Replace the words blacklist

Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or enum/variable renames, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: intel8x0: Replace the words white/blacklist
Takashi Iwai [Tue, 14 Jul 2020 17:26:28 +0000 (19:26 +0200)]
ALSA: intel8x0: Replace the words white/blacklist

Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Correcting only comments, or error/module messages, no functional
changes.

Link: https://lore.kernel.org/r/20200714172631.25371-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: Replace the words white/blacklist
Takashi Iwai [Tue, 14 Jul 2020 17:26:27 +0000 (19:26 +0200)]
ALSA: hda: Replace the words white/blacklist

Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or variable renames, no functional changes.

Note that pm_blacklist module option is still kept as was, so that
users can still keep the old option.

Link: https://lore.kernel.org/r/20200714172631.25371-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: es1968: Replace the words white/blacklist
Takashi Iwai [Tue, 14 Jul 2020 17:26:26 +0000 (19:26 +0200)]
ALSA: es1968: Replace the words white/blacklist

Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or variable renames, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ctxfi: Replace the word blacklist
Takashi Iwai [Tue, 14 Jul 2020 17:26:25 +0000 (19:26 +0200)]
ALSA: ctxfi: Replace the word blacklist

Follow the recent inclusive terminology guidelines and replace the
word "blacklist" appropriately.

Only correcting the error message, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: bt87x: Replace the words white/blacklist
Takashi Iwai [Tue, 14 Jul 2020 17:26:24 +0000 (19:26 +0200)]
ALSA: bt87x: Replace the words white/blacklist

Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or variable renames, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: ac97: Replace the words white/blacklist
Takashi Iwai [Tue, 14 Jul 2020 17:26:23 +0000 (19:26 +0200)]
ALSA: ac97: Replace the words white/blacklist

Follow the recent inclusive terminology guidelines and replace the
words "whitelist" and "blacklist" appropriately.

Only comment or function/variable renames, no functional changes.

Link: https://lore.kernel.org/r/20200714172631.25371-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/tegra: Disable sync-write operation
Jon Hunter [Tue, 14 Jul 2020 16:08:41 +0000 (17:08 +0100)]
ALSA: hda/tegra: Disable sync-write operation

Commit f34a4c9dd4ca ("ALSA: hda: Enable sync-write operation as default
for all controllers") enabled sync-write for all controllers and this is
causing audio playback on the Tegra186 HDA device to fail. For now,
disable sync-write support for Tegra to fix this.

Fixes: f34a4c9dd4ca ("ALSA: hda: Enable sync-write operation as default for all controllers")
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://lore.kernel.org/r/20200714160841.2293-1-jonathanh@nvidia.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: echoaudio: re-enable IRQs on failure path
Dan Carpenter [Mon, 13 Jul 2020 10:53:24 +0000 (13:53 +0300)]
ALSA: echoaudio: re-enable IRQs on failure path

This should be spin_unlock_irq() instead of spin_lock().

Fixes: 6c3312544873 ("ALSA: echoaudio: Prevent races in calls to set_audio_format()")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Link: https://lore.kernel.org/r/20200713105324.GB251988@mwanda
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: line6: add hw monitor volume control for POD HD500
Vasily Khoruzhick [Mon, 13 Jul 2020 15:28:52 +0000 (08:28 -0700)]
ALSA: line6: add hw monitor volume control for POD HD500

Add hw monitor volume control for POD HD500. The same change may
work for HD500X but I don't have it to test.

Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
Link: https://lore.kernel.org/r/20200713152852.65832-1-anarsoul@gmail.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: Replace with fallthrough pseudo keyword in the remaining places
Takashi Iwai [Thu, 9 Jul 2020 11:17:50 +0000 (13:17 +0200)]
ALSA: Replace with fallthrough pseudo keyword in the remaining places

A few places (except for ASoC) are left unconverted for the new
fallthrough pseudo keyword.  Now replace them all.

Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200709111750.8337-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: xen: Remove superfluous fall through comments
Takashi Iwai [Thu, 9 Jul 2020 11:17:49 +0000 (13:17 +0200)]
ALSA: xen: Remove superfluous fall through comments

The "fall through" comments found in switch-cases in ALSA xen driver
are all superfluous.  The kernel coding style allows the multiple
cases in a row.  Let's remove them.

Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200709111750.8337-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: atmel: Remove invalid "fall through" comments
Takashi Iwai [Thu, 9 Jul 2020 11:17:48 +0000 (13:17 +0200)]
ALSA: atmel: Remove invalid "fall through" comments

The comments about fall through in sound/atmel/ac97.c are just
superfluous and rather confusing.  Let's remove them.

Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200709111750.8337-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: Use fallthrough pseudo-keyword
Gustavo A. R. Silva [Wed, 8 Jul 2020 20:32:36 +0000 (15:32 -0500)]
ALSA: Use fallthrough pseudo-keyword

Replace the existing /* fall through */ comments and its variants with
the new pseudo-keyword macro fallthrough[1]. Also, remove unnecessary
fall-through markings when it is the case.

[1] https://www.kernel.org/doc/html/latest/process/deprecated.html?highlight=fallthrough#implicit-switch-case-fall-through

Signed-off-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Link: https://lore.kernel.org/r/20200708203236.GA5112@embeddedor
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: echoaudio: Address bugs in the interrupt handling
Mark Hills [Wed, 8 Jul 2020 10:18:48 +0000 (11:18 +0100)]
ALSA: echoaudio: Address bugs in the interrupt handling

Distorted audio appears occasionally, affecting either playback or
capture and requiring the affected substream to be closed by all
applications and re-opened.

The best way I have found to reproduce the bug is to use dmix in
combination with Chromium, which opens the audio device multiple times
in threads. Anecdotally, the problems appear to have increased with
faster CPUs. I ruled out 32-bit counter wrapping; it often happens
much earlier.

Since applying this patch I have not had problems, where previously
they would occur several times a day.

The patch targets the following issues:

* Check for progress using the counter from the hardware, not after it
  has been truncated to the buffer.

  This is a clean way to address a possible bug where if a whole
  ringbuffer advances between interrupts, it goes unnoticed.

* Move last_period state from chip to pipe

  This more logically belongs as part of pipe, and code is reasier to
  read if it is "counter position last time a period elapsed".

  Now the code has no references to period count. A period is just
  when the regular counter crosses a threshold. This increases
  readability and reduces scope for bugs.

* Treat period notification and buffer advance independently:

  This helps to clarify what is the responsibility of the interrupt
  handler, and what is pcm_pointer().

  Removing shared state between these operations means race conditions
  are fixed without introducing locks. Synchronisation is only around
  the read of pipe->dma_counter. There may be cache line contention
  around "struct audiopipe" but I did not have cause to profile this.

Pay attention to be robust where dma_counter wrapping is not a
multiple of period_size or buffer_size.

This is a revised patch based on feedback from Takashi and Giuliano.

Signed-off-by: Mark Hills <mark@xwax.org>
Link: https://lore.kernel.org/r/20200708101848.3457-5-mark@xwax.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: echoaudio: Prevent some noise on unloading the module
Mark Hills [Wed, 8 Jul 2020 10:18:47 +0000 (11:18 +0100)]
ALSA: echoaudio: Prevent some noise on unloading the module

These are valid conditions in normal circumstances, so do not "warn" but
make them for debugging.

Signed-off-by: Mark Hills <mark@xwax.org>
Link: https://lore.kernel.org/r/20200708101848.3457-4-mark@xwax.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: echoaudio: Prevent races in calls to set_audio_format()
Mark Hills [Wed, 8 Jul 2020 10:18:46 +0000 (11:18 +0100)]
ALSA: echoaudio: Prevent races in calls to set_audio_format()

The function uses chip->comm_page which needs locking against
other use at the same time.

Signed-off-by: Mark Hills <mark@xwax.org>
Link: https://lore.kernel.org/r/20200708101848.3457-3-mark@xwax.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: echoaudio: Race conditions around "opencount"
Mark Hills [Wed, 8 Jul 2020 10:18:45 +0000 (11:18 +0100)]
ALSA: echoaudio: Race conditions around "opencount"

Use of atomics does not make these statements robust:

       atomic_inc(&chip->opencount);
       if (atomic_read(&chip->opencount) > 1 && chip->rate_set)
               chip->can_set_rate=0;

and

       if (atomic_read(&chip->opencount)) {
               if (chip->opencount) {
                       changed = -EAGAIN;
               } else {
                       changed = set_digital_mode(chip, dmode);

It would be necessary to atomically increment or decrement the value
and use the returned result. And yet we still need to prevent other
threads making use of "can_set_rate" while we set it.

However in all but one case the atomic is misleading as they are already
running with "mode_mutex" held.

Decisions are made on mode setting are often intrinsically connected
to "opencount" because some operations are not permitted unless
there is sole ownership.

So instead simplify this, and use "mode_mutex" as a lock for all reference
counting and mode setting.

Signed-off-by: Mark Hills <mark@xwax.org>
Link: https://lore.kernel.org/r/20200708101848.3457-2-mark@xwax.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: echoaudio: Remove redundant check
Mark Hills [Wed, 8 Jul 2020 10:18:44 +0000 (11:18 +0100)]
ALSA: echoaudio: Remove redundant check

This check is always false, as it's not the responsibilty of the
device-specific code to make this check. It is already checked
in snd_echo_digital_mode_put.

I do not have a Mona interface to test this change.

This patch is in preparation for follow-up patch to modify the
behavior of "opencount".

Signed-off-by: Mark Hills <mark@xwax.org>
Link: https://lore.kernel.org/r/20200708101848.3457-1-mark@xwax.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb/line6: remove 'defined but not used' warning
Pierre-Louis Bossart [Tue, 7 Jul 2020 18:49:24 +0000 (13:49 -0500)]
ALSA: usb/line6: remove 'defined but not used' warning

Fix W=1 warning. Variables are declared in a header file included from
multiple C files, replace by #defines as suggested by Takashi

sound/usb/line6/driver.h:70:18: warning: ‘SYSEX_EXTRA_SIZE’ defined
but not used [-Wunused-const-variable=]
   70 | static const int SYSEX_EXTRA_SIZE = sizeof(line6_midi_id) + 4;
      |                  ^~~~~~~~~~~~~~~~
sound/usb/line6/driver.h:69:18: warning: ‘SYSEX_DATA_OFS’ defined but
   not used [-Wunused-const-variable=]
   69 | static const int SYSEX_DATA_OFS = sizeof(line6_midi_id) + 3;
      |                  ^~~~~~~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200707184924.96291-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pcm: Fix build error on m68k and others
Takashi Iwai [Tue, 7 Jul 2020 11:12:25 +0000 (13:12 +0200)]
ALSA: pcm: Fix build error on m68k and others

The commit 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when direct
DMA is available") introduced a check of the DMA type and this caused
a build error on m68k (and possibly some others) due to the lack of
dma_is_direct() definition.  Since the check is needed only for
CONFIG_SND_DMA_SGBUF enablement (i.e. solely x86), use #ifdef instead
of IS_ENABLED() for avoiding such a build error.

Fixes: 3ad796cbc36a ("ALSA: pcm: Use SG-buffer only when direct DMA is available")
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/20200707111225.26826-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/hdmi: Add Intel silent stream support
Harsha Priya [Mon, 6 Jul 2020 20:53:17 +0000 (13:53 -0700)]
ALSA: hda/hdmi: Add Intel silent stream support

External HDMI receivers have analog circuitry that needs to be powered-on
when exiting standby, and a mechanism to detect PCM v. IEC61937 data.
These two steps take time and up to 2-3 seconds of audio may be muted
when starting playback.

Intel hardware (Haswell and beyond) can keep the link active
with a 'silent stream', so that the receiver does not go through those
two steps when valid audio is transmitted. This mechanism relies
on an setting the channel_id as 0xf, sending info packet and preventing
the codec from going to D3,  which will increase the platform
static power consumption. The info packet assumes a basic 2ch stereo,
and the silent stream is enabled when connecting a monitor.
In case of format changes the detection of PCM v. IEC61937 needs to
be re-run. In this case there is no way to avoid the 2-3s mute.

The silent stream is enabled with a Kconfig option, as well as a kernel
parameter should there be a need to override the build time default.
This approach is used based on the power_save capability as an example,
but in the future, it may be used with a kcontrol,
depending on UCM support for HDaudio legacy.

Signed-off-by: Harsha Priya <harshapriya.n@intel.com>
Signed-off-by: Emmanuel Jillela <emmanuel.jillela@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/r/1594068797-14011-1-git-send-email-harshapriya.n@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/au88x0: remove "defined but not used" warnings
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:36:04 +0000 (14:36 -0500)]
ALSA: pci/au88x0: remove "defined but not used" warnings

Fix W=1 warnings. Mark all unused tables with __maybe_unused.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-24-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: vx_core: remove warning for empty loop body
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:36:03 +0000 (14:36 -0500)]
ALSA: vx_core: remove warning for empty loop body

Fix W=1 warning.

sound/drivers/vx/vx_core.c: In function ‘snd_vx_threaded_irq_handler’:
sound/drivers/vx/vx_core.c:515:3: warning: suggest braces around empty
body in an ‘if’ statement [-Wempty-body]
  515 |   ; /* so far, nothing to do yet */
      |   ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-23-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pcmcia/pdaudiocf: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:36:02 +0000 (14:36 -0500)]
ALSA: pcmcia/pdaudiocf: fix kernel-doc

Fix W=1 warnings - add missing context parameter in description

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-22-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/via82xx: remove 'set but not used' warnings
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:36:01 +0000 (14:36 -0500)]
ALSA: pci/via82xx: remove 'set but not used' warnings

Fix W=1 warnings. Mark variables as __always_unused.

sound/pci/via82xx.c: In function ‘snd_via82xx_codec_wait’:
sound/pci/via82xx.c:547:6: warning: variable ‘err’ set but not used
[-Wunused-but-set-variable]
  547 |  int err;
      |      ^~~
sound/pci/via82xx_modem.c: In function ‘snd_via82xx_codec_wait’:
sound/pci/via82xx_modem.c:401:6: warning: variable ‘err’ set but not
used [-Wunused-but-set-variable]
  401 |  int err;
      |      ^~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-21-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/fm801: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:36:00 +0000 (14:36 -0500)]
ALSA: pci/fm801: fix kernel-doc

Fix W=1 warnings, add missing field descriptions.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-20-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/es1938: remove 'set but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:59 +0000 (14:35 -0500)]
ALSA: pci/es1938: remove 'set but not used' warning

Fix W=1 warning. Mark the 'audiostatus' variable as __always_unused.

sound/pci/es1938.c: In function ‘snd_es1938_interrupt’:
sound/pci/es1938.c:1622:24: warning: variable ‘audiostatus’ set but
not used [-Wunused-but-set-variable]
 1622 |  unsigned char status, audiostatus;
      |                        ^~~~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-19-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: xen: remove 'set but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:58 +0000 (14:35 -0500)]
ALSA: xen: remove 'set but not used' warning

Fix W=1 warning. Mark the 'req' variable as __always_unused.

sound/xen/xen_snd_front.c: In function ‘xen_snd_front_stream_close’:
sound/xen/xen_snd_front.c:117:21: warning: variable ‘req’ set but not
used [-Wunused-but-set-variable]
  117 |  struct xensnd_req *req;
      |                     ^~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-18-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/oxygen/xonar_wm87x6: remove always true condition
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:57 +0000 (14:35 -0500)]
ALSA: pci/oxygen/xonar_wm87x6: remove always true condition

Fix W=1 warnings:

sound/pci/oxygen/xonar_wm87x6.c: In function ‘wm8776_write’:
sound/pci/oxygen/xonar_wm87x6.c:119:11: warning: comparison of
unsigned expression >= 0 is always true [-Wtype-limits]
  119 |   if (reg >= WM8776_HPLVOL && reg <= WM8776_DACMASTER)
      |           ^~
sound/pci/oxygen/xonar_wm87x6.c: In function ‘wm8766_write’:
sound/pci/oxygen/xonar_wm87x6.c:147:12: warning: comparison of
unsigned expression >= 0 is always true [-Wtype-limits]
  147 |   if ((reg >= WM8766_LDA1 && reg <= WM8766_RDA1) ||
      |            ^~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-17-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/rme9652/hdspm: remove always true condition
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:56 +0000 (14:35 -0500)]
ALSA: pci/rme9652/hdspm: remove always true condition

Fix W=1 warning:

sound/pci/rme9652/hdspm.c: In function ‘hdspm_autosync_ref’:
sound/pci/rme9652/hdspm.c:3030:16: warning: comparison of unsigned
expression >= 0 is always true [-Wtype-limits]
 3030 |   if ((syncref >= HDSPM_AES32_AUTOSYNC_FROM_WORD) &&
      |                ^~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-16-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/korg1212: remove 'set but not used' warnings
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:55 +0000 (14:35 -0500)]
ALSA: pci/korg1212: remove 'set but not used' warnings

Fix W=1 warnings. Two variables are only used for debug logs, mark
with __maybe_unused:

sound/pci/korg1212/korg1212.c: In function ‘snd_korg1212_create’:
sound/pci/korg1212/korg1212.c:2152:36: warning: variable ‘iomem2_size’
set but not used [-Wunused-but-set-variable]
 2152 |  unsigned ioport_size, iomem_size, iomem2_size;
      |                                    ^~~~~~~~~~~
sound/pci/korg1212/korg1212.c:2152:11: warning: variable ‘ioport_size’
set but not used [-Wunused-but-set-variable]
 2152 |  unsigned ioport_size, iomem_size, iomem2_size;
      |           ^~~~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-15-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/emu10k1: remove 'set but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:54 +0000 (14:35 -0500)]
ALSA: pci/emu10k1: remove 'set but not used' warning

Fix W=1 warning. The loopsize variable is only used in compiled-out
code, so mark with __maybe_unused.

sound/pci/emu10k1/emu10k1_patch.c: In function
‘snd_emu10k1_sample_new’:
sound/pci/emu10k1/emu10k1_patch.c:30:22: warning: variable ‘loopsize’
set but not used [-Wunused-but-set-variable]
   30 |  int truesize, size, loopsize, blocksize;
      |                      ^~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-14-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: firewire: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:53 +0000 (14:35 -0500)]
ALSA: firewire: fix kernel-doc

Fix W=1 warning. Remove excess function parameter from description

Fixes: 7bc93821a70a ("ALSA: firewire-lib: split allocation of isochronous resources from establishment of connection")
Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-13-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoASoC: pci/emu10k1: remove "set but not used' warnings
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:52 +0000 (14:35 -0500)]
ASoC: pci/emu10k1: remove "set but not used' warnings

Fix W=1 warnings. Mark variables used for reads as __always_unused.

sound/pci/emu10k1/emu10k1_main.c: In function
‘snd_emu10k1_cardbus_init’:
sound/pci/emu10k1/emu10k1_main.c:626:15: warning: variable ‘value’ set
but not used [-Wunused-but-set-variable]
  626 |  unsigned int value;
      |               ^~~~~
sound/pci/emu10k1/emu10k1_main.c: In function
‘snd_emu1010_load_firmware_entry’:
sound/pci/emu10k1/emu10k1_main.c:656:15: warning: variable
‘write_post’ set but not used [-Wunused-but-set-variable]
  656 |  unsigned int write_post;
      |               ^~~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-12-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/ctxfi: fix kernel-doc warnings
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:50 +0000 (14:35 -0500)]
ALSA: pci/ctxfi: fix kernel-doc warnings

Fix W=1 warnings. The files contain formatting that isn't kernel-doc.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-10-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/ctxfi/ctatc: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:49 +0000 (14:35 -0500)]
ALSA: pci/ctxfi/ctatc: fix kernel-doc

Fix W=1 warnings. Add missing arguments and description.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-9-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/aw2-saa7146: remove 'set but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:48 +0000 (14:35 -0500)]
ALSA: pci/aw2-saa7146: remove 'set but not used' warning

Fix W=1 warning by nothing variable as always unused.

sound/pci/aw2/aw2-saa7146.c: In function ‘snd_aw2_saa7146_interrupt’:
sound/pci/aw2/aw2-saa7146.c:333:15: warning: variable ‘iicsta’ set but
not used [-Wunused-but-set-variable]
  333 |  unsigned int iicsta;
      |               ^~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-8-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/echoaudio: remove 'set but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:47 +0000 (14:35 -0500)]
ALSA: pci/echoaudio: remove 'set but not used' warning

Fix W=1 warning. One variable is only used in a conditionally-compiled
block, mark as __maybe_unused

sound/pci/echoaudio/echoaudio.c: In function ‘snd_echo_probe’:
sound/pci/echoaudio/echoaudio.c:1958:6: warning: variable ‘i’ set but
not used [-Wunused-but-set-variable]
 1958 |  int i, err;
      |      ^

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-7-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/asihpi: remove 'set but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:46 +0000 (14:35 -0500)]
ALSA: pci/asihpi: remove 'set but not used' warning

Fix W=1 warnings, mark variables as __always_unused

sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_get’:
sound/pci/asihpi/asihpi.c:1907:6: warning: variable ‘num_bands’ set
but not used [-Wunused-but-set-variable]
 1907 |  u32 num_bands;
      |      ^~~~~~~~~
sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_put’:
sound/pci/asihpi/asihpi.c:1934:6: warning: variable ‘num_bands’ set
but not used [-Wunused-but-set-variable]
 1934 |  u32 num_bands;
      |      ^~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-6-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/asihpi: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:45 +0000 (14:35 -0500)]
ALSA: pci/asihpi: fix kernel-doc

Fix W=1 warnings. The code certainly predates .rst syntax, adjust as
needed.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-5-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pci/asihpi: remove 'set but not used' warnings
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:44 +0000 (14:35 -0500)]
ALSA: pci/asihpi: remove 'set but not used' warnings

Fix W=1 warnings by removing 2 unnecessary initializations and
removing a variable that's not used.

sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_get’:
sound/pci/asihpi/asihpi.c:1907:6: warning: variable ‘num_bands’ set
but not used [-Wunused-but-set-variable]
 1907 |  u32 num_bands = 0;
      |      ^~~~~~~~~
sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_tuner_band_put’:
sound/pci/asihpi/asihpi.c:1934:6: warning: variable ‘num_bands’ set
 but not used [-Wunused-but-set-variable]
 1934 |  u32 num_bands = 0;
      |      ^~~~~~~~~
sound/pci/asihpi/asihpi.c: In function ‘snd_asihpi_mux_info’:
sound/pci/asihpi/asihpi.c:2164:6: warning: variable ‘err’ set but not
 used [-Wunused-but-set-variable]
 2164 |  int err;
      |      ^~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-4-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: isa/gus: remove 'set but not used' warning
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:43 +0000 (14:35 -0500)]
ALSA: isa/gus: remove 'set but not used' warning

Fix W=1 warning by noting variable as __always_unused.

sound/isa/gus/gus_uart.c: In function ‘snd_gf1_interrupt_midi_in’:
sound/isa/gus/gus_uart.c:16:22: warning: variable ‘data’ set but not
used [-Wunused-but-set-variable]
   16 |  unsigned char stat, data, byte;

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-3-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: isa/gus: remove -Wmissing-prototypes warnings
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:35:42 +0000 (14:35 -0500)]
ALSA: isa/gus: remove -Wmissing-prototypes warnings

Fix W=1 warnings by adding prototypes to header file

sound/isa/gus/gus_timer.c:141:6: warning: no previous prototype for
‘snd_gf1_timers_init’ [-Wmissing-prototypes]
  141 | void snd_gf1_timers_init(struct snd_gus_card * gus)
      |      ^~~~~~~~~~~~~~~~~~~
sound/isa/gus/gus_timer.c:177:6: warning: no previous prototype for
‘snd_gf1_timers_done’ [-Wmissing-prototypes]
  177 | void snd_gf1_timers_done(struct snd_gus_card * gus)
      |      ^~~~~~~~~~~~~~~~~~~

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193604.169059-2-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: compress: document the compress gapless audio state machine
Vinod Koul [Mon, 29 Jun 2020 13:47:36 +0000 (19:17 +0530)]
ALSA: compress: document the compress gapless audio state machine

Also documented the galpess transitions. Please note that these are not
really stream states, but show how the stream steps in gapless mode

Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200629134737.105993-3-vkoul@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: compress: document the compress audio state machine
Vinod Koul [Mon, 29 Jun 2020 13:47:35 +0000 (19:17 +0530)]
ALSA: compress: document the compress audio state machine

So we had some discussions of the stream states, so I thought it is a
good idea to document the state transitions, so add it documentation

Reviewed-by: Charles Keepax <ckeepax@opensource.cirrus.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20200629134737.105993-2-vkoul@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: fix SND_HDA_GENERIC kconfig & build
Randy Dunlap [Wed, 1 Jul 2020 21:08:23 +0000 (14:08 -0700)]
ALSA: hda: fix SND_HDA_GENERIC kconfig & build

Fix kconfig warnings and lots of subsequent build errors by
adding yet another ugly select statement:

WARNING: unmet direct dependencies detected for LEDS_CLASS
  Depends on [n]: NEW_LEDS [=n]
  Selected by [y]:
  - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y]

WARNING: unmet direct dependencies detected for LEDS_TRIGGERS
  Depends on [n]: NEW_LEDS [=n] && LEDS_CLASS [=y]
  Selected by [y]:
  - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y]
  Selected by [m]:
  - MAC80211_LEDS [=y] && NET [=y] && WIRELESS [=y] && MAC80211 [=m] && LEDS_CLASS [=y]
  - IWLWIFI_LEDS [=y] && NETDEVICES [=y] && WLAN [=y] && WLAN_VENDOR_INTEL [=y] && IWLWIFI [=m] && (LEDS_CLASS [=y]=y || LEDS_CLASS [=y]=IWLWIFI [=m]) && (IWLMVM [=m] || IWLDVM [=m])

WARNING: unmet direct dependencies detected for LEDS_TRIGGER_AUDIO
  Depends on [n]: NEW_LEDS [=n] && LEDS_TRIGGERS [=y]
  Selected by [y]:
  - SND_HDA_GENERIC [=y] && SOUND [=y] && !UML && SND [=y] && SND_HDA [=y] && SND_HDA_GENERIC_LEDS [=y]

Fixes: 7cdf8c49b1df ("ALSA: hda: generic: Add a helper for mic-mute LED with LED classdev")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Link: https://lore.kernel.org/r/01233744-9625-38b3-0342-1b37250dbc72@infradead.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: core: pcm_iec958: fix kernel-doc
Pierre-Louis Bossart [Thu, 2 Jul 2020 19:38:42 +0000 (14:38 -0500)]
ALSA: core: pcm_iec958: fix kernel-doc

Fix W=1 warning. The kernel doc uses the hwparams type instead of the
argument name.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Link: https://lore.kernel.org/r/20200702193842.169215-1-pierre-louis.bossart@linux.intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb-audio: Fix some typos
Alexander Tsoy [Mon, 29 Jun 2020 03:26:07 +0000 (06:26 +0300)]
ALSA: usb-audio: Fix some typos

Fix the following typos in comments and in the code:
 - KHz -> kHz
 - procssed -> processed

Signed-off-by: Alexander Tsoy <alexander@tsoy.me>
Link: https://lore.kernel.org/r/20200629032607.255419-1-alexander@tsoy.me
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: core: Warn on empty module
Takashi Iwai [Wed, 24 Jun 2020 16:03:00 +0000 (18:03 +0200)]
ALSA: core: Warn on empty module

The module argument passed to snd_card_new() must be a valid non-NULL
pointer when the module support is enabled.  Since ASoC driver passes
the argument from each snd_soc_card definition, one may forget to set
the owner field and lead to a NULL module easily.

For catching such an overlook, add a WARN_ON() in snd_card_new().
Also, put the card->module assignment in the ifdef block for a very
minor optimization.

Link: https://lore.kernel.org/r/20200624160300.21703-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoMerge branch 'topic/hda-micmute-led' into for-next
Takashi Iwai [Fri, 19 Jun 2020 10:14:58 +0000 (12:14 +0200)]
Merge branch 'topic/hda-micmute-led' into for-next

This is a patch set inspired by the recent patch Kai-Heng posted about
the HD-audio mic-mute LED control.  Currently HD-audio driver deals
with the mute and mic-mute LED in several different ways: primarily
with the direct callback of vmaster hook and capture sync hook, while
another with the LED class device binding.  The latter has been used
for binding with the platform device LEDs like Thinkpad, Dell,
Huawei.  And, yet, recently we added our own LED classdev for the
mic-mute LED on some HP systems although they are controlled directly
with the callback; it's exposed, however, for the DMIC that is
governed by a different ASoC driver.

This patch set is an attempt to sort out and make them consistent:
namely,
* All LEDs are now controlled via LED class device
* The generic driver provides helper functions to easily build up the
  LED class dev and the relevant mixer controls
* Conversion of the existing framework and clean ups

The patches are lightly tested in my side with a couple of machines
and also through hda-emu tests.  Some devices receive new kcontrols
for the mute LED behavior (that have been missing so far), but
anything else look good though my tests.

Link: https://lore.kernel.org/r/20200618110842.27238-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: Enable sync-write operation as default for all controllers
Takashi Iwai [Thu, 18 Jun 2020 14:40:51 +0000 (16:40 +0200)]
ALSA: hda: Enable sync-write operation as default for all controllers

In the end we already enabled the sync-write mode for most of HD-audio
controllers including Intel, and it's no big merit to keep the async
write mode for the rest.  Let's make it as default and drop the
superfluous AZX_DCAPS_SYNC_WRITE bit flag.

Also, avoid to set the allow_bus_reset flag, which is a quite unstable
and hackish behavior that was needed only for some early platforms
(decades ago).  The straight fallback to the single cmd mode is more
robust.

Link: https://lore.kernel.org/r/20200618144051.7415-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: Let LED cdev handling suspend/resume
Takashi Iwai [Thu, 18 Jun 2020 11:08:42 +0000 (13:08 +0200)]
ALSA: hda: Let LED cdev handling suspend/resume

Set LED_CORE_SUSPENDRESUME to LED cdev flags, so that the LED core
would store and restore the LED status at suspend/resume.

In theory, the codec driver should be responsible for all LED bits,
but this might be safer and cover the overlooked cases.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-14-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/realtek: Unify LED helper code
Takashi Iwai [Thu, 18 Jun 2020 11:08:41 +0000 (13:08 +0200)]
ALSA: hda/realtek: Unify LED helper code

Both mute and mic-mute LED callbacks do almost similar tasks with just
different bits.  Factor out the common code and use them from the
callbacks for simplification.

This ended up with covering the forgotten stuff, too; e.g. VREF LED
handling required the temporary power up/down that was missing for the
mute LED, or some forgotten polarity checks are added.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-13-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/sigmatel: Use the new vmaster mute LED helper
Takashi Iwai [Thu, 18 Jun 2020 11:08:40 +0000 (13:08 +0200)]
ALSA: hda/sigmatel: Use the new vmaster mute LED helper

Convert the mute LED handling in Sigmatel/IDT codec to the new vmaster
mute helper.  A point to be cautiously handled is that the value
passed to the callback is inverted; the vmaster passes "enabled"
(0 = mute), while LED classdev passes "brightness" (1 = mute).

A positive side-effect by this change is that the driver gets also the
enum controls for the mute behavior like other drivers already had.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-12-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/conexant: Use the new vmaster mute LED helper
Takashi Iwai [Thu, 18 Jun 2020 11:08:39 +0000 (13:08 +0200)]
ALSA: hda/conexant: Use the new vmaster mute LED helper

Convert the mute LED handling in Conexant codec to the new vmaster
mute helper.  A point to be cautiously handled is that the value
passed to the callback is inverted; the vmaster passes "enabled"
(0 = mute), while LED classdev passes "brightness" (1 = mute).

Also the assignment of the default vmaster hook is moved at a later
point after the mute hook is set up.  This assures no nested hook.

Finally, since we enable the mute-LED kcontrols always in the helper
side, the extra vmaster_mute_enum flag set up is dropped.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-11-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/realtek: Use the new vmaster mute LED helper
Takashi Iwai [Thu, 18 Jun 2020 11:08:38 +0000 (13:08 +0200)]
ALSA: hda/realtek: Use the new vmaster mute LED helper

Convert the mute LED handling in Realtek codec to the new vmaster mute
helper.  A point to be cautiously handled is that the value passed to
the callback is inverted; the vmaster passes "enabled" (0 = mute),
while LED classdev passes "brightness" (1 = mute).

The code in Thinkpad helper is also converted.   In that case, just
call the new function and remove the open-code.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: generic: Add vmaster mute LED helper
Takashi Iwai [Thu, 18 Jun 2020 11:08:37 +0000 (13:08 +0200)]
ALSA: hda: generic: Add vmaster mute LED helper

Like mic-mute LED handling, add a new helper to deal with the master
mute LED with LED classdev.  Unlike the mic-mute case, the playback
master mute is hooked on vmaster, and we suppose no nested hooks
allowed there.

The classdev creation code is factored out to a common function that
is called from both mute and mic-mute LED helpers.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-9-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: generic: Drop the old mic-mute LED hook
Takashi Iwai [Thu, 18 Jun 2020 11:08:36 +0000 (13:08 +0200)]
ALSA: hda: generic: Drop the old mic-mute LED hook

Now all users of the old snd_hda_gen_add_micmute_led() have been
converted to the new LED-classdev variant, and we can make it local,
and remove the unused hda_gen_spec.micmute_led.update callback field.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-8-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: generic: Drop unused snd_hda_gen_fixup_micmute_led()
Takashi Iwai [Thu, 18 Jun 2020 11:08:35 +0000 (13:08 +0200)]
ALSA: hda: generic: Drop unused snd_hda_gen_fixup_micmute_led()

The fixup function is no longer used.  Let's drop.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-7-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/sigmatel: Convert to cdev-variant of mic-mute LED controls
Takashi Iwai [Thu, 18 Jun 2020 11:08:34 +0000 (13:08 +0200)]
ALSA: hda/sigmatel: Convert to cdev-variant of mic-mute LED controls

This patch converts the remaining user of
snd_hda_gen_add_micmute_led() in IDT/Sigmatel codec driver into the
new snd_hda_gen_add_micmute_led_cdev().

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-6-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/conexant: Convert to cdev-variant of mic-mute LED controls
Takashi Iwai [Thu, 18 Jun 2020 11:08:33 +0000 (13:08 +0200)]
ALSA: hda/conexant: Convert to cdev-variant of mic-mute LED controls

This patch converts the remaining user of
snd_hda_gen_add_micmute_led() in Conexant codec driver into the new
snd_hda_gen_add_micmute_led_cdev().

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda/realtek: Convert to cdev-variant of mic-mute LED controls
Takashi Iwai [Thu, 18 Jun 2020 11:08:32 +0000 (13:08 +0200)]
ALSA: hda/realtek: Convert to cdev-variant of mic-mute LED controls

This patch converts the remaining user of
snd_hda_gen_add_micmute_led() in Realtek codec driver into the new
snd_hda_gen_add_micmute_led_cdev().

The Thinkpad helper code is updated accordingly, too.

Also, the usage of snd_hda_gen_fixup_micmute_led() is replaced with
either the local alc_fixup_micmute_led() or the explicit call of
snd_hda_gen_add_micmute_led_cdev() with NULL callback.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: generic: Add a helper for mic-mute LED with LED classdev
Takashi Iwai [Thu, 18 Jun 2020 11:08:31 +0000 (13:08 +0200)]
ALSA: hda: generic: Add a helper for mic-mute LED with LED classdev

A new helper, snd_hda_gen_add_micmute_led_cdev(), is introduced here
for creating a LED classdev and setting up the hook to the capture
control for controlling the mic-mute LED to follow the capture switch
change.  This will replace the existing users of
snd_hda_gen_add_micmute_led() in later patches.

Also, introduce a new kconfig CONFIG_SND_HDA_GENERIC_LEDS, to indicate
the usage of mute / mic-mute LED helpers.  It's selected by the codec
drivers (Realtek, Conexant and Sigmatel), while it selects the
necessary LED class dependencies.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: hda: generic: Always call led-trigger for mic mute LED
Takashi Iwai [Thu, 18 Jun 2020 11:08:30 +0000 (13:08 +0200)]
ALSA: hda: generic: Always call led-trigger for mic mute LED

Instead of adding a special hook to trigger the mic-mute LED device,
call it always from the common callback function.  It won't hurt even
if no corresponding led cdev is present.

This is basically a preliminary change for the later patches to
convert the all mic-mute LED handling to LED class cdev.

Tested-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
Link: https://lore.kernel.org/r/20200618110842.27238-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoMerge branch 'topic/dma-fix2' into for-next
Takashi Iwai [Wed, 17 Jun 2020 08:08:51 +0000 (10:08 +0200)]
Merge branch 'topic/dma-fix2' into for-next

Pull the fix for potential PCM SG-buffer problems.

Link: https://lore.kernel.org/r/20200615160045.2703-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pcm: Use SG-buffer only when direct DMA is available
Takashi Iwai [Mon, 15 Jun 2020 16:00:45 +0000 (18:00 +0200)]
ALSA: pcm: Use SG-buffer only when direct DMA is available

The DMA-coherent SG-buffer is tricky to use, as it does need the
mapping.  It used to work stably on x86 over years (and that's why we
had enabled SG-buffer on solely x86) with the default mmap handler and
vmap(), but our luck seems no forever success.  The chance of breakage
is high when the special DMA handling is introduced in the arch side.

In this patch, we change the buffer allocation to use the SG-buffer
only when the device in question is with the direct DMA.  It's a bit
hackish, but it's currently the only condition that may work (more or
less) reliably with the default mmap and vmap() for mapping the pages
that are deduced via virt_to_page().

In theory, we can apply the similar hack in the sound/core memory
allocation helper, too; but it's used by SOF for allocating SG pages
without re-mapping via vmap() or mmap, and it's fine to use it in that
way, so let's keep it and adds the workaround in PCM side.

Link: https://lore.kernel.org/r/20200615160045.2703-5-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: memalloc: Make SG-buffer helper usable for continuous buffer, too
Takashi Iwai [Mon, 15 Jun 2020 16:00:44 +0000 (18:00 +0200)]
ALSA: memalloc: Make SG-buffer helper usable for continuous buffer, too

We have a few helper functions for making the access to the buffer
address easier on SG-buffer.  Those are specific to the buffer that is
allocated with SG-buffer type, and it makes hard to use both SG and
non-SG buffers in the same code.

This patch adds a few simple checks and lets the helpers to deal with
both SG- and continuous buffers gracefully.  It's a preliminary step
for the upcoming patch that mimics the buffer type on the fly.

Link: https://lore.kernel.org/r/20200615160045.2703-4-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: memalloc: Initialize all fields of snd_dma_buffer properly
Takashi Iwai [Mon, 15 Jun 2020 16:00:43 +0000 (18:00 +0200)]
ALSA: memalloc: Initialize all fields of snd_dma_buffer properly

Some fields in snd_dma_buffer aren't touched in snd_dma_alloc_pages()
and might be left uninitialized.  Let's clear all fields properly, so
that we can use a NULL check (e.g. dmab->private_data) as conditional
in a later patch.

Link: https://lore.kernel.org/r/20200615160045.2703-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: pcm: Use dma_mmap_coherent() on x86, too
Takashi Iwai [Mon, 15 Jun 2020 16:00:42 +0000 (18:00 +0200)]
ALSA: pcm: Use dma_mmap_coherent() on x86, too

We avoided the explicit use of dma_mmap_coherent() on x86 because of a
spurious warning in x86 APT code in the past.  However, this blindly
assumes that the pages allocated via dma_alloc_coherent() on x86 are
the ones convertible via virt_to_page() (that is used in the default
mmap handler), and it's no longer true; with the indirect DMA ops,
this can be handled differently.  The only certain way for doing mmap
such pages is the dma_mmap_coherent(), and the warning seems already
gone in the recent code, so let's use it consistently.

Link: https://lore.kernel.org/r/20200615160045.2703-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: firewire-motu: wait for notification when changing clock configuration for...
Takashi Sakamoto [Sun, 14 Jun 2020 14:12:21 +0000 (23:12 +0900)]
ALSA: firewire-motu: wait for notification when changing clock configuration for protocol v3

It costs expensive to change clock configuration for models of protocol
version 3. In current implementation, speculative strategy is used to
finish the operation; just waiting for 4 seconds. As long as I investigate,
when accepting and changing clock status actually, the device sends
notification with mask.

This commit uses wise way to wait for the notification after changing
sampling clock rate during 4 seconds.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20200614141221.53527-1-o-takashi@sakamocchi.jp
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Mon, 15 Jun 2020 13:58:23 +0000 (15:58 +0200)]
Merge branch 'for-linus' into for-next

Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb-audio: Set 48 kHz rate for Rodecaster
Christopher Swenson [Mon, 15 Jun 2020 00:11:47 +0000 (17:11 -0700)]
ALSA: usb-audio: Set 48 kHz rate for Rodecaster

Like the Line6 devices, the Rode Rodecaster Pro does not support
UAC2_CS_RANGE and only supports a sample rate of 48 kHz.

Tested against a Rode Rodecaster Pro.

Tested-by: Christopher Swenson <swenson@swenson.io>
Signed-off-by: Christopher Swenson <swenson@swenson.io>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/ebdb9e72-9649-0b5e-b9b9-d757dbf26927@swenson.io
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoALSA: usb-audio: add quirk for Denon DCD-1500RE
Yick W. Tse [Sat, 13 Jun 2020 11:40:06 +0000 (11:40 +0000)]
ALSA: usb-audio: add quirk for Denon DCD-1500RE

fix error "clock source 41 is not valid, cannot use"

[] New USB device found, idVendor=154e, idProduct=1002, bcdDevice= 1.00
[] New USB device strings: Mfr=1, Product=2, SerialNumber=0
[] Product: DCD-1500RE
[] Manufacturer: D & M Holdings Inc.
[]
[] clock source 41 is not valid, cannot use
[] usbcore: registered new interface driver snd-usb-audio

Signed-off-by: Yick W. Tse <y_w_tse@yahoo.com.hk>
Cc: <stable@vger.kernel.org>
Link: https://lore.kernel.org/r/1373857985.210365.1592048406997@mail.yahoo.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
4 years agoLinux 5.8-rc1
Linus Torvalds [Sun, 14 Jun 2020 19:45:04 +0000 (12:45 -0700)]
Linux 5.8-rc1

4 years agoMerge tag 'LSM-add-setgid-hook-5.8-author-fix' of git://github.com/micah-morton/linux
Linus Torvalds [Sun, 14 Jun 2020 18:39:31 +0000 (11:39 -0700)]
Merge tag 'LSM-add-setgid-hook-5.8-author-fix' of git://github.com/micah-morton/linux

Pull SafeSetID update from Micah Morton:
 "Add additional LSM hooks for SafeSetID

  SafeSetID is capable of making allow/deny decisions for set*uid calls
  on a system, and we want to add similar functionality for set*gid
  calls.

  The work to do that is not yet complete, so probably won't make it in
  for v5.8, but we are looking to get this simple patch in for v5.8
  since we have it ready.

  We are planning on the rest of the work for extending the SafeSetID
  LSM being merged during the v5.9 merge window"

* tag 'LSM-add-setgid-hook-5.8-author-fix' of git://github.com/micah-morton/linux:
  security: Add LSM hooks to set*gid syscalls

4 years agosecurity: Add LSM hooks to set*gid syscalls
Thomas Cedeno [Tue, 9 Jun 2020 17:22:13 +0000 (10:22 -0700)]
security: Add LSM hooks to set*gid syscalls

The SafeSetID LSM uses the security_task_fix_setuid hook to filter
set*uid() syscalls according to its configured security policy. In
preparation for adding analagous support in the LSM for set*gid()
syscalls, we add the requisite hook here. Tested by putting print
statements in the security_task_fix_setgid hook and seeing them get hit
during kernel boot.

Signed-off-by: Thomas Cedeno <thomascedeno@google.com>
Signed-off-by: Micah Morton <mortonm@chromium.org>
4 years agoMerge tag 'for-5.8-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave...
Linus Torvalds [Sun, 14 Jun 2020 16:47:25 +0000 (09:47 -0700)]
Merge tag 'for-5.8-part2-tag' of git://git./linux/kernel/git/kdave/linux

Pull btrfs updates from David Sterba:
 "This reverts the direct io port to iomap infrastructure of btrfs
  merged in the first pull request. We found problems in invalidate page
  that don't seem to be fixable as regressions or without changing iomap
  code that would not affect other filesystems.

  There are four reverts in total, but three of them are followup
  cleanups needed to revert a43a67a2d715 cleanly. The result is the
  buffer head based implementation of direct io.

  Reverts are not great, but under current circumstances I don't see
  better options"

* tag 'for-5.8-part2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux:
  Revert "btrfs: switch to iomap_dio_rw() for dio"
  Revert "fs: remove dio_end_io()"
  Revert "btrfs: remove BTRFS_INODE_READDIO_NEED_LOCK"
  Revert "btrfs: split btrfs_direct_IO to read and write part"

4 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Linus Torvalds [Sat, 13 Jun 2020 23:27:13 +0000 (16:27 -0700)]
Merge git://git./linux/kernel/git/netdev/net

Pull networking fixes from David Miller:

 1) Fix cfg80211 deadlock, from Johannes Berg.

 2) RXRPC fails to send norigications, from David Howells.

 3) MPTCP RM_ADDR parsing has an off by one pointer error, fix from
    Geliang Tang.

 4) Fix crash when using MSG_PEEK with sockmap, from Anny Hu.

 5) The ucc_geth driver needs __netdev_watchdog_up exported, from
    Valentin Longchamp.

 6) Fix hashtable memory leak in dccp, from Wang Hai.

 7) Fix how nexthops are marked as FDB nexthops, from David Ahern.

 8) Fix mptcp races between shutdown and recvmsg, from Paolo Abeni.

 9) Fix crashes in tipc_disc_rcv(), from Tuong Lien.

10) Fix link speed reporting in iavf driver, from Brett Creeley.

11) When a channel is used for XSK and then reused again later for XSK,
    we forget to clear out the relevant data structures in mlx5 which
    causes all kinds of problems. Fix from Maxim Mikityanskiy.

12) Fix memory leak in genetlink, from Cong Wang.

13) Disallow sockmap attachments to UDP sockets, it simply won't work.
    From Lorenz Bauer.

* git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net: (83 commits)
  net: ethernet: ti: ale: fix allmulti for nu type ale
  net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init
  net: atm: Remove the error message according to the atomic context
  bpf: Undo internal BPF_PROBE_MEM in BPF insns dump
  libbpf: Support pre-initializing .bss global variables
  tools/bpftool: Fix skeleton codegen
  bpf: Fix memlock accounting for sock_hash
  bpf: sockmap: Don't attach programs to UDP sockets
  bpf: tcp: Recv() should return 0 when the peer socket is closed
  ibmvnic: Flush existing work items before device removal
  genetlink: clean up family attributes allocations
  net: ipa: header pad field only valid for AP->modem endpoint
  net: ipa: program upper nibbles of sequencer type
  net: ipa: fix modem LAN RX endpoint id
  net: ipa: program metadata mask differently
  ionic: add pcie_print_link_status
  rxrpc: Fix race between incoming ACK parser and retransmitter
  net/mlx5: E-Switch, Fix some error pointer dereferences
  net/mlx5: Don't fail driver on failure to create debugfs
  net/mlx5e: CT: Fix ipv6 nat header rewrite actions
  ...

4 years agoRevert "btrfs: switch to iomap_dio_rw() for dio"
David Sterba [Tue, 9 Jun 2020 17:56:06 +0000 (19:56 +0200)]
Revert "btrfs: switch to iomap_dio_rw() for dio"

This reverts commit a43a67a2d715540c1368b9501a22b0373b5874c0.

This patch reverts the main part of switching direct io implementation
to iomap infrastructure. There's a problem in invalidate page that
couldn't be solved as regression in this development cycle.

The problem occurs when buffered and direct io are mixed, and the ranges
overlap. Although this is not recommended, filesystems implement
measures or fallbacks to make it somehow work. In this case, fallback to
buffered IO would be an option for btrfs (this already happens when
direct io is done on compressed data), but the change would be needed in
the iomap code, bringing new semantics to other filesystems.

Another problem arises when again the buffered and direct ios are mixed,
invalidation fails, then -EIO is set on the mapping and fsync will fail,
though there's no real error.

There have been discussions how to fix that, but revert seems to be the
least intrusive option.

Link: https://lore.kernel.org/linux-btrfs/20200528192103.xm45qoxqmkw7i5yl@fiona/
Signed-off-by: David Sterba <dsterba@suse.com>
4 years agonet: ethernet: ti: ale: fix allmulti for nu type ale
Grygorii Strashko [Sat, 13 Jun 2020 14:54:14 +0000 (17:54 +0300)]
net: ethernet: ti: ale: fix allmulti for nu type ale

On AM65xx MCU CPSW2G NUSS and 66AK2E/L NUSS allmulti setting does not allow
unregistered mcast packets to pass.

This happens, because ALE VLAN entries on these SoCs do not contain port
masks for reg/unreg mcast packets, but instead store indexes of
ALE_VLAN_MASK_MUXx_REG registers which intended for store port masks for
reg/unreg mcast packets.
This path was missed by commit 9d1f6447274f ("net: ethernet: ti: ale: fix
seeing unreg mcast packets with promisc and allmulti disabled").

Hence, fix it by taking into account ALE type in cpsw_ale_set_allmulti().

Fixes: 9d1f6447274f ("net: ethernet: ti: ale: fix seeing unreg mcast packets with promisc and allmulti disabled")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonet: ethernet: ti: am65-cpsw-nuss: fix ale parameters init
Grygorii Strashko [Sat, 13 Jun 2020 14:52:59 +0000 (17:52 +0300)]
net: ethernet: ti: am65-cpsw-nuss: fix ale parameters init

The ALE parameters structure is created on stack, so it has to be reset
before passing to cpsw_ale_create() to avoid garbage values.

Fixes: 93a76530316a ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf
David S. Miller [Sat, 13 Jun 2020 22:28:08 +0000 (15:28 -0700)]
Merge git://git./pub/scm/linux/kernel/git/bpf/bpf

Alexei Starovoitov says:

====================
pull-request: bpf 2020-06-12

The following pull-request contains BPF updates for your *net* tree.

We've added 26 non-merge commits during the last 10 day(s) which contain
a total of 27 files changed, 348 insertions(+), 93 deletions(-).

The main changes are:

1) sock_hash accounting fix, from Andrey.

2) libbpf fix and probe_mem sanitizing, from Andrii.

3) sock_hash fixes, from Jakub.

4) devmap_val fix, from Jesper.

5) load_bytes_relative fix, from YiFei.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agonet: atm: Remove the error message according to the atomic context
Liao Pingfang [Sat, 13 Jun 2020 06:03:26 +0000 (14:03 +0800)]
net: atm: Remove the error message according to the atomic context

Looking into the context (atomic!) and the error message should be dropped.

Signed-off-by: Liao Pingfang <liao.pingfang@zte.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
4 years agoMerge tag '5.8-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Sat, 13 Jun 2020 20:43:56 +0000 (13:43 -0700)]
Merge tag '5.8-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6

Pull more cifs updates from Steve French:
 "12 cifs/smb3 fixes, 2 for stable.

   - add support for idsfromsid on create and chgrp/chown allowing
     ability to save owner information more naturally for some workloads

   - improve query info (getattr) when SMB3.1.1 posix extensions are
     negotiated by using new query info level"

* tag '5.8-rc-smb3-fixes-part2' of git://git.samba.org/sfrench/cifs-2.6:
  smb3: Add debug message for new file creation with idsfromsid mount option
  cifs: fix chown and chgrp when idsfromsid mount option enabled
  smb3: allow uid and gid owners to be set on create with idsfromsid mount option
  smb311: Add tracepoints for new compound posix query info
  smb311: add support for using info level for posix extensions query
  smb311: Add support for lookup with posix extensions query info
  smb311: Add support for SMB311 query info (non-compounded)
  SMB311: Add support for query info using posix extensions (level 100)
  smb3: add indatalen that can be a non-zero value to calculation of credit charge in smb2 ioctl
  smb3: fix typo in mount options displayed in /proc/mounts
  cifs: Add get_security_type_str function to return sec type.
  smb3: extend fscache mount volume coherency check

4 years agobinderfs: add gitignore for generated sample program
Linus Torvalds [Sat, 13 Jun 2020 20:41:24 +0000 (13:41 -0700)]
binderfs: add gitignore for generated sample program

Let's keep "git status" happy and quiet.

Fixes: 9762dc1432e1 ("samples: add binderfs sample program
Fixes: fca5e94921d5 ("samples: binderfs: really compile this sample and fix build issues")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
4 years agodoc: don't use deprecated "---help---" markers in target docs
Linus Torvalds [Sat, 13 Jun 2020 20:32:40 +0000 (13:32 -0700)]
doc: don't use deprecated "---help---" markers in target docs

I'm not convinced the script makes useful automaed help lines anyway,
but since we're trying to deprecate the use of "---help---" in Kconfig
files, let's fix the doc example code too.

See commit a7f7f6248d97 ("treewide: replace '---help---' in Kconfig
files with 'help'")

Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
4 years agoMerge tag 'kbuild-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy...
Linus Torvalds [Sat, 13 Jun 2020 20:29:16 +0000 (13:29 -0700)]
Merge tag 'kbuild-v5.8-2' of git://git./linux/kernel/git/masahiroy/linux-kbuild

Pull more Kbuild updates from Masahiro Yamada:

 - fix build rules in binderfs sample

 - fix build errors when Kbuild recurses to the top Makefile

 - covert '---help---' in Kconfig to 'help'

* tag 'kbuild-v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild:
  treewide: replace '---help---' in Kconfig files with 'help'
  kbuild: fix broken builds because of GZIP,BZIP2,LZOP variables
  samples: binderfs: really compile this sample and fix build issues

4 years agoMerge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 13 Jun 2020 20:17:49 +0000 (13:17 -0700)]
Merge tag 'scsi-misc' of git://git./linux/kernel/git/jejb/scsi

Pull more SCSI updates from James Bottomley:
 "This is the set of changes collected since just before the merge
  window opened. It's mostly minor fixes in drivers.

  The one non-driver set is the three optical disk (sr) changes where
  two are error path fixes and one is a helper conversion.

  The big driver change is the hpsa compat_alloc_userspace rework by Al
  so he can kill the remaining user. This has been tested and acked by
  the maintainer"

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (21 commits)
  scsi: acornscsi: Fix an error handling path in acornscsi_probe()
  scsi: storvsc: Remove memset before memory freeing in storvsc_suspend()
  scsi: cxlflash: Remove an unnecessary NULL check
  scsi: ibmvscsi: Don't send host info in adapter info MAD after LPM
  scsi: sr: Fix sr_probe() missing deallocate of device minor
  scsi: sr: Fix sr_probe() missing mutex_destroy
  scsi: st: Convert convert get_user_pages() --> pin_user_pages()
  scsi: target: Rename target_setup_cmd_from_cdb() to target_cmd_parse_cdb()
  scsi: target: Fix NULL pointer dereference
  scsi: target: Initialize LUN in transport_init_se_cmd()
  scsi: target: Factor out a new helper, target_cmd_init_cdb()
  scsi: hpsa: hpsa_ioctl(): Tidy up a bit
  scsi: hpsa: Get rid of compat_alloc_user_space()
  scsi: hpsa: Don't bother with vmalloc for BIG_IOCTL_Command_struct
  scsi: hpsa: Lift {BIG_,}IOCTL_Command_struct copy{in,out} into hpsa_ioctl()
  scsi: ufs: Remove redundant urgent_bkop_lvl initialization
  scsi: ufs: Don't update urgent bkops level when toggling auto bkops
  scsi: qedf: Remove redundant initialization of variable rc
  scsi: mpt3sas: Fix memset() in non-RDPQ mode
  scsi: iscsi: Fix reference count leak in iscsi_boot_create_kobj
  ...

4 years agoMerge branch 'i2c/for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Linus Torvalds [Sat, 13 Jun 2020 20:12:38 +0000 (13:12 -0700)]
Merge branch 'i2c/for-5.8' of git://git./linux/kernel/git/wsa/linux

Pull i2c updates from Wolfram Sang:
 "I2C has quite some patches for you this time. I hope it is the move to
  per-driver-maintainers which is now showing results. We will see.

  The big news is two new drivers (Nuvoton NPCM and Qualcomm CCI),
  larger refactoring of the Designware, Tegra, and PXA drivers, the
  Cadence driver supports being a slave now, and there is support to
  instanciate SPD eeproms for well-known cases (which will be
  user-visible because the i801 driver supports it), and some
  devm_platform_ioremap_resource() conversions which blow up the
  diffstat.

  Note that I applied the Nuvoton driver quite late, so some minor fixup
  patches arrived during the merge window. I chose to apply them right
  away because they were trivial"

* 'i2c/for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (109 commits)
  i2c: Drop stray comma in MODULE_AUTHOR statements
  i2c: npcm7xx: npcm_i2caddr[] can be static
  MAINTAINERS: npcm7xx: Add maintainer for Nuvoton NPCM BMC
  i2c: npcm7xx: Fix a couple of error codes in probe
  i2c: icy: Fix build with CONFIG_AMIGA_PCMCIA=n
  i2c: npcm7xx: Remove unnecessary parentheses
  i2c: npcm7xx: Add support for slave mode for Nuvoton
  i2c: npcm7xx: Add Nuvoton NPCM I2C controller driver
  dt-bindings: i2c: npcm7xx: add NPCM I2C controller
  i2c: pxa: don't error out if there's no pinctrl
  i2c: add 'single-master' property to generic bindings
  i2c: designware: Add Baikal-T1 System I2C support
  i2c: designware: Move reg-space remapping into a dedicated function
  i2c: designware: Retrieve quirk flags as early as possible
  i2c: designware: Convert driver to using regmap API
  i2c: designware: Discard Cherry Trail model flag
  i2c: designware: Add Baytrail sem config DW I2C platform dependency
  i2c: designware: slave: Set DW I2C core module dependency
  i2c: designware: Use `-y` to build multi-object modules
  dt-bindings: i2c: dw: Add Baikal-T1 SoC I2C controller
  ...

4 years agoMerge tag 'media/v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
Linus Torvalds [Sat, 13 Jun 2020 20:09:38 +0000 (13:09 -0700)]
Merge tag 'media/v5.8-2' of git://git./linux/kernel/git/mchehab/linux-media

Pull more media updates from Mauro Carvalho Chehab:

 - a set of atomisp patches. They remove several abstraction layers, and
   fixes clang and gcc warnings (that were hidden via some macros that
   were disabling 4 or 5 types of warnings there). There are also some
   important fixes and sensor auto-detection on newer BIOSes via ACPI
   _DCM tables.

 - some fixes

* tag 'media/v5.8-2' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-media: (95 commits)
  media: rkvdec: Fix H264 scaling list order
  media: v4l2-ctrls: Unset correct HEVC loop filter flag
  media: videobuf2-dma-contig: fix bad kfree in vb2_dma_contig_clear_max_seg_size
  media: v4l2-subdev.rst: correct information about v4l2 events
  media: s5p-mfc: Properly handle dma_parms for the allocated devices
  media: medium: cec: Make MEDIA_CEC_SUPPORT default to n if !MEDIA_SUPPORT
  media: cedrus: Implement runtime PM
  media: cedrus: Program output format during each run
  media: atomisp: improve ACPI/DMI detection logs
  media: Revert "media: atomisp: add Asus Transform T101HA ACPI vars"
  media: Revert "media: atomisp: Add some ACPI detection info"
  media: atomisp: improve sensor detection code to use _DSM table
  media: atomisp: get rid of an iomem abstraction layer
  media: atomisp: get rid of a string_support.h abstraction layer
  media: atomisp: use strscpy() instead of less secure variants
  media: atomisp: set DFS to MAX if sensor doesn't report fps
  media: atomisp: use different dfs failed messages
  media: atomisp: change the detection of ISP2401 at runtime
  media: atomisp: use macros from intel-family.h
  media: atomisp: don't set hpll_freq twice with different values
  ...

4 years agoMerge tag 'libnvdimm-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm...
Linus Torvalds [Sat, 13 Jun 2020 20:04:36 +0000 (13:04 -0700)]
Merge tag 'libnvdimm-for-5.8' of git://git./linux/kernel/git/nvdimm/nvdimm

Pull libnvdimm updates from Dan Williams:
 "Small collection of cleanups to rework usage of ->queuedata and the
  GUID api"

* tag 'libnvdimm-for-5.8' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
  nvdimm/pmem: stop using ->queuedata
  nvdimm/btt: stop using ->queuedata
  nvdimm/blk: stop using ->queuedata
  libnvdimm: Replace guid_copy() with import_guid() where it makes sense

4 years agowatch_queue: add gitignore for generated sample program
Linus Torvalds [Sat, 13 Jun 2020 20:00:54 +0000 (13:00 -0700)]
watch_queue: add gitignore for generated sample program

Let's keep "git status" happy and quiet.

Fixes: f5b5a164f9a1 ("Add sample notification program")
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
4 years agoMerge tag 'iomap-5.8-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Sat, 13 Jun 2020 19:44:30 +0000 (12:44 -0700)]
Merge tag 'iomap-5.8-merge-1' of git://git./fs/xfs/xfs-linux

Pull iomap fix from Darrick Wong:
 "A single iomap bug fix for a variable type mistake on 32-bit
  architectures, fixing an integer overflow problem in the unshare
  actor"

* tag 'iomap-5.8-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  iomap: Fix unsharing of an extent >2GB on a 32-bit machine

4 years agoMerge tag 'xfs-5.8-merge-9' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
Linus Torvalds [Sat, 13 Jun 2020 19:40:24 +0000 (12:40 -0700)]
Merge tag 'xfs-5.8-merge-9' of git://git./fs/xfs/xfs-linux

Pull xfs fix from Darrick Wong:
 "We've settled down into the bugfix phase; this one fixes a resource
  leak on an error bailout path"

* tag 'xfs-5.8-merge-9' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
  xfs: Add the missed xfs_perag_put() for xfs_ifree_cluster()

4 years agoMerge tag '9p-for-5.8' of git://github.com/martinetd/linux
Linus Torvalds [Sat, 13 Jun 2020 19:38:57 +0000 (12:38 -0700)]
Merge tag '9p-for-5.8' of git://github.com/martinetd/linux

Pull 9p update from Dominique Martinet:
 "Another very quiet cycle... Only one commit: increase the size of the
  ring used for xen transport"

* tag '9p-for-5.8' of git://github.com/martinetd/linux:
  9p/xen: increase XEN_9PFS_RING_ORDER