03 Jan, 2020

22 commits


01 Jan, 2020

2 commits

  • The azx_pcm_hw structure is only copied into another structure,
    so make it const.

    The opportunity for this change was found using Coccinelle.

    Signed-off-by: Julia Lawall
    Link: https://lore.kernel.org/r/1577864614-5543-3-git-send-email-Julia.Lawall@inria.fr
    Signed-off-by: Takashi Iwai

    Julia Lawall
     
  • The snd_ad1816a_timer_table structure is only copied into
    another structure, so make it const.

    The opportunity for this change was found using Coccinelle.

    Signed-off-by: Julia Lawall
    Link: https://lore.kernel.org/r/1577864614-5543-2-git-send-email-Julia.Lawall@inria.fr
    Signed-off-by: Takashi Iwai

    Julia Lawall
     

31 Dec, 2019

1 commit

  • A few uapi/sound/*.h headers have been corrected for recovering from
    the compile errors with the existing user-space code (alsa-lib) by the
    recent commits. OTOH, these introduced another regression, as now
    linux/types.h inclusion became mandatory for the uapi header checks.

    As a compromise, this patch re-adds linux/types.h inclusions again,
    but conditionally not to break other non-standard user-space stuff
    again.

    Fixes: 2e4688676392 ("ALSA: emu10k1: Make uapi/emu10k1.h compilable again")
    Fixes: d63e63d42107 ("ALSA: hdsp: Make uapi/hdsp.h compilable again")
    Fixes: 4fa406caf950 ("ALSA: hdspm: Drop linux/types.h inclusion in uapi header")
    Reported-by: kbuild test robot
    Link: https://lore.kernel.org/r/20191230212742.28925-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

28 Dec, 2019

1 commit

  • The Corsair Virtuoso RGB Wireless is a USB headset with a mic and a
    sidetone feature. Label its mixer appropriately instead of all
    "Headset", so that applications such as Pulseaudio don't just move
    the sidetone control when they intend the main Headset control.

    Signed-off-by: Chris Boyle
    Link: https://lore.kernel.org/r/20191227094053.GA12167@nova.chris.boyle.name
    Signed-off-by: Takashi Iwai

    Chris Boyle
     

26 Dec, 2019

1 commit

  • The recent change to bump the ALSA control API protocol version from
    2.0.7 to 2.1.0 caused a regression on user-space; while the user-space
    expects both the major and the minor versions to be identical with the
    supported numbers, we changed the minor number from 0 to 1.

    For recovering from the incompatibility, this patch changes the
    protocol version again to 2.0.8, which is compatible, but yet higher
    than the original number 2.0.7, indicating that the protocol change.

    Fixes: bd3eb4e87eb3 ("ALSA: ctl: bump protocol version up to v2.1.0")
    Reported-by: Paul Menzel
    Tested-by: Paul Menzel
    Link: https://lore.kernel.org/r/s5h1rsr769i.wl-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

24 Dec, 2019

1 commit

  • A design of ALSA control core allows applications to execute three
    operations for TLV feature; read, write and command. Furthermore, it
    allows driver developers to process the operations by two ways; allocated
    array or callback function. In the former, read operation is just allowed,
    thus developers uses the latter when device driver supports variety of
    models or the target model is expected to dynamically change information
    stored in TLV container.

    The core also allows applications to lock any element so that the other
    applications can't perform write operation to the element for element
    value and TLV information. When the element is locked, write and command
    operation for TLV information are prohibited as well as element value.
    Any read operation should be allowed in the case.

    At present, when an element has callback function for TLV information,
    TLV read operation returns EPERM if the element is locked. On the
    other hand, the read operation is success when an element has allocated
    array for TLV information. In both cases, read operation is success for
    element value expectedly.

    This commit fixes the bug. This change can be backported to v4.14
    kernel or later.

    Signed-off-by: Takashi Sakamoto
    Reviewed-by: Jaroslav Kysela
    Link: https://lore.kernel.org/r/20191223093347.15279-1-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

23 Dec, 2019

4 commits

  • In a development period for v5.6 kernel, some changes are introduced to
    structures in ALSA control interface:
    - 'tstamp' member is removed from 'struct snd_ctl_elem_value
    - 'TSTAMP' flag is removed from a set of access flags for 'struct
    snd_ctl_elem_info'
    - 'dimen' member is removed from 'struct snd_ctl_elem_info

    Although these changes were introduced with enough consideration for
    backward compatibility, they include slightly lose of it. This commit
    bumps protocol version of ALSA control interface up to v2.1.0.

    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20191223023921.8151-5-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • The 'dimen' member of 'struct snd_ctl_elem_info' is designed to deliver
    information to use an array of value as multi-dimensional values. This
    feature is used just by echoaudio PCI driver, and fortunately it's not
    used by the other applications than 'echomixer' in alsa-tools.

    In a previous commit, usage of 'dimen' member is removed from echoaudio
    PCI driver. Nowadays no driver/application use the feature.

    This commit removes the member from structure.

    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20191223023921.8151-4-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • In a couple of years ago, 'echomixer' userspace application was revised
    not to use 'dimen' member of 'struct snd_ctl_elem_info'.

    This commit removes usage of 'dimen' member from echoaudio PCI driver so
    that no implementation uses the member.

    Reference: 275353bb684e ("ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members")
    Reference: 51db452df07b ("Revert "ALSA: echoaudio: purge contradictions between dimension matrix members and total number of members")
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20191223023921.8151-3-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • In a former commit, 'tstamp' member was removed from 'struct
    snd_ctl_elem_value' in a middle way toward solution of Y2038 issue. In a
    protocol of ALSA control interface, this member is designed to deliver
    timestamp information in the value structure when the target element
    supports SNDRV_CTL_ELEM_ACCESS_TIMESTAMP flag.

    Actually, the feature is neither used by kernel space nor user space,
    especiall alsa-lib has no API for the feature. Therefore it's reasonable
    to remove both of them. Practically, the timestamp information
    corresponds to no information about type of clock ID. It can bring
    confusions to applications.

    Reference: a4e7dd35b9da ("ALSA: Avoid using timespec for struct snd_ctl_elem_value")
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20191223023921.8151-2-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

21 Dec, 2019

1 commit

  • We kept some typedefs in uapi/sound/*.h so that the programs in
    alsa-tools can be built. Now that alsa-lib takes these and applies
    the workarounds in its own, we don't need these typedefs any longer in
    the kernel uapi side. Let's drop them.

    Link: https://lore.kernel.org/r/20191220161555.20232-1-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

20 Dec, 2019

5 commits

  • The asound.h isn't always available while asoc.h itself is distributed
    in alsa-lib package. So we need to avoid the unnecessary inclusion of
    asound.h from there.

    Link: https://lore.kernel.org/r/20191220153415.2740-6-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The recent changes in uapi/asoundlib.h caused some build errors in
    alsa-lib side because of a typo and the new included files.
    Basically asound.h is supposed to be usable also on non-Linux systems,
    so we've tried to avoid the Linux-specific include files.

    This patch is an attempt to recover from those changes.

    Fixes: 3ddee7f88aaf ("ALSA: Avoid using timespec for struct snd_pcm_status")
    Fixes: 80fe7430c708 ("ALSA: add new 32-bit layout for snd_pcm_mmap_status/control")
    Link: https://lore.kernel.org/r/20191220153415.2740-5-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • The hdspm.h uapi header has been used also from non-Linux or platforms
    that don't have linux/*.h. It was OK in the past because alsa-lib
    contained the modified version of this header file, but now it tries
    to the verbatim copy, so it broke the build. This fixes it again.

    Link: https://lore.kernel.org/r/20191220153415.2740-4-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Recently alsa-lib updated its content of sound/hdsp.h just by copying
    the latest Linus kernel uapi/*.h, and this broke the build of
    alsa-tools programs. We used to modify the headers so that they can
    be built without asoundlib.h and linux kernel headers, and the
    verbatim copy doesn't work as is.

    This patch removes again the linux/types.h inclusion and drop __user
    prefix that broke the build and adjusts the corresponding code.

    Link: https://lore.kernel.org/r/20191220153415.2740-3-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Recently we updated the content in alsa-lib uapi header files by just
    copying from the latest Linus kernel uapi/*.h, and noticed that it
    broke the build of some alsa-tools programs. The reason is that we
    used to have a modified version in the past, so that the program can
    be built without referring to the unexported stuff like
    snd_ctl_elem_id or __user prefix.

    This patch attempts to restore that, i.e. dropping the stuff that
    can't be referred in the user-space. For adapting the changes in
    uapi/emu10k1.h, the emu10k1 driver code is also slightly modified.
    Most of changes are pointer cast.

    Link: https://lore.kernel.org/r/20191220153415.2740-2-tiwai@suse.de
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

19 Dec, 2019

2 commits

  • Taking the 5.5 devel branch back into the main devel branch.
    A USB-audio fix needs to be adjusted to adapt the changes that have
    been formerly applied for stop_sync.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Recently we found the headset-mic on the Dell Dock WD19 doesn't work
    anymore after s3 (s2i or deep), this problem could be workarounded by
    closing (pcm_close) the app and then reopening (pcm_open) the app, so
    this bug is not easy to be detected by users.

    When problem happens, retire_capture_urb() could still be called
    periodically, but the size of captured data is always 0, it could be
    a firmware bug on the dock. Anyway I found after resuming, the
    snd_usb_pcm_prepare() will be called, and if we forcibly run
    set_format() to set the interface and its endpoint, the capture
    size will be normal again. This problem and workaound also apply to
    playback.

    To fix it in the kernel, add a quirk to let set_format() run
    forcibly once after resume.

    Signed-off-by: Hui Wang
    Cc:
    Link: https://lore.kernel.org/r/20191218132650.6303-1-hui.wang@canonical.com
    Signed-off-by: Takashi Iwai

    Hui Wang