04 Oct, 2018

3 commits

  • [ Upstream commit e01b4f624278d5efe5fb5da585ca371947b16680 ]

    Sometime a component or topology may configure a DAI widget with no
    private data leading to a dev_dbg() dereferencne of this data.

    Fix this to check for non NULL private data and let users know if widget
    is missing DAI.

    Signed-off-by: Liam Girdwood
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Liam Girdwood
     
  • [ Upstream commit 1adca4b0cd65c14cb8b8c9c257720385869c3d5f ]

    This patch can make audio controller in AMD Raven Ridge gets runtime
    suspended to D3, to save ~1W power when it's not in use.

    Cc: Vijendar Mukunda
    Signed-off-by: Kai-Heng Feng
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Kai-Heng Feng
     
  • [ Upstream commit 222bce5eb88d1af656419db04bcd84b2419fb900 ]

    Both calls to of_find_node_by_name() and of_get_next_child() return a
    node pointer with refcount incremented thus it must be explicidly
    decremented here after the last usage. As we are assured to have a
    refcounted np either from the initial
    of_find_node_by_name(NULL, name); or from the of_get_next_child(gpio, np)
    in the while loop if we reached the error code path below, an
    x of_node_put(np) is needed.

    Signed-off-by: Nicholas Mc Guire
    Fixes: commit f3d9478b2ce4 ("[ALSA] snd-aoa: add snd-aoa")
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Nicholas Mc Guire
     

29 Sep, 2018

12 commits

  • commit 498fe23aad8e3b5a9554f55719c537603b4476ea upstream.

    Although private data of sound card instance is usually allocated in the
    tail of the instance, drivers in ALSA firewire stack allocate the private
    data before allocating the instance. In this case, the private data
    should be released explicitly at .private_free callback of the instance.

    This commit fixes memory leak following to the above design.

    Fixes: 6c29230e2a5f ('ALSA: oxfw: delayed registration of sound card')
    Cc: # v4.7+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit 1064bc685d359f549f91c2d5f111965a9284f328 upstream.

    After finishing discover of stream formats, ALSA OXFW driver has memory
    leak of allocated memory object at error path.

    This commit releases the memory object at the error path.

    Fixes: 6c29230e2a5f ('ALSA: oxfw: delayed registration of sound card')
    Cc: # v4.7+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit ce925f088b979537f22f9e05eb923ef9822ca139 upstream.

    After allocating model-dependent data, ALSA OXFW driver has memory leak
    of the data at error path.

    This commit releases the data at the error path.

    Fixes: 6c29230e2a5f ('ALSA: oxfw: delayed registration of sound card')
    Cc: # v4.7+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit c3b55e2ec9c76e7a0de2a0b1dc851fdc9440385b upstream.

    After allocating memory object for response buffer, ALSA fireworks
    driver has leak of the memory object at error path.

    This commit releases the object at the error path.

    Fixes: 7d3c1d5901aa('ALSA: fireworks: delayed registration of sound card')
    Cc: # v4.7+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit 8d28277c065a974873c6781d44b7bcdcd8fb4e8a upstream.

    Although private data of sound card instance is usually allocated in the
    tail of the instance, drivers in ALSA firewire stack allocate the private
    data before allocating the instance. In this case, the private data
    should be released explicitly at .private_free callback of the instance.

    This commit fixes memory leak following to the above design.

    Fixes: b610386c8afb ('ALSA: firewire-tascam: deleyed registration of sound card')
    Cc: # v4.7+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit a49a83ab05e34edd6c71a4fbd062c9a7ba6d18aa upstream.

    Although private data of sound card instance is usually allocated in the
    tail of the instance, drivers in ALSA firewire stack allocate the private
    data before allocating the instance. In this case, the private data
    should be released explicitly at .private_free callback of the instance.

    This commit fixes memory leak following to the above design.

    Fixes: 86c8dd7f4da3 ('ALSA: firewire-digi00x: delayed registration of sound card')
    Cc: # v4.7+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit 36f3a6e02c143a7e9e4e143e416371f67bc1fae6 upstream.

    An allocated memory forgets to be released.

    Fixes: 76fdb3a9e13 ('ALSA: fireface: add support for Fireface 400')
    Cc: # 4.12+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit 49434c6c575d2008c0abbc93e615019f39e01252 upstream.

    snd_emu10k1_fx8010_ioctl(SNDRV_EMU10K1_IOCTL_INFO) allocates
    memory using kmalloc() and partially fills it by calling
    snd_emu10k1_fx8010_info() before returning the resulting
    structure to userspace, leaving uninitialized holes. Let's
    just use kzalloc() here.

    BugLink: http://blog.infosectcbr.com.au/2018/09/linux-kernel-infoleaks.html
    Signed-off-by: Willy Tarreau
    Cc: Jann Horn
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Willy Tarreau
     
  • commit 493626f2d87a74e6dbea1686499ed6e7e600484e upstream.

    When executing 'fw_run_transaction()' with 'TCODE_WRITE_BLOCK_REQUEST',
    an address of 'payload' argument is used for streaming DMA mapping by
    'firewire_ohci' module if 'size' argument is larger than 8 byte.
    Although in this case the address should not be on kernel stack, current
    implementation of ALSA bebob driver uses data in kernel stack for a cue
    to boot M-Audio devices. This often brings unexpected result, especially
    for a case of CONFIG_VMAP_STACK=y.

    This commit fixes the bug.

    Reference: https://bugzilla.kernel.org/show_bug.cgi?id=201021
    Reference: https://forum.manjaro.org/t/firewire-m-audio-410-driver-wont-load-firmware/51165
    Fixes: a2b2a7798fb6('ALSA: bebob: Send a cue to load firmware for M-Audio Firewire series')
    Cc: # v3.16+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit b1fbebd4164b3d170ad916dcd692cf843c9c065d upstream.

    After allocating model-dependent data for M-Audio FW1814 and ProjectMix
    I/O, ALSA bebob driver has memory leak at error path.

    This commit releases the allocated data at the error path.

    Fixes: 04a2c73c97eb('ALSA: bebob: delayed registration of sound card')
    Cc: # v4.7+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Sakamoto
     
  • commit 4d230d12710646788af581ba0155d83ab48b955c upstream.

    Clocking operations clk_get/set_rate, are non-atomic,
    they shouldn't be called in soc_pcm_trigger() which is atomic.

    Following issue was found due to execution of clk_get_rate() causes
    sleep in soc_pcm_trigger(), which shouldn't be blocked.

    We can reproduce this issue by following
    > enable CONFIG_DEBUG_ATOMIC_SLEEP=y
    > compile, and boot
    > mount -t debugfs none /sys/kernel/debug
    > while true; do cat /sys/kernel/debug/clk/clk_summary > /dev/null; done &
    > while true; do aplay xxx; done

    This patch adds support to .prepare callback, and moves non-atomic
    clocking operations to it. As .prepare is non-atomic, it is always
    called before trigger_start/trigger_stop.

    BUG: sleeping function called from invalid context at kernel/locking/mutex.c:620
    in_atomic(): 1, irqs_disabled(): 128, pid: 2242, name: aplay
    INFO: lockdep is turned off.
    irq event stamp: 5964
    hardirqs last enabled at (5963): [] mutex_lock_nested+0x6e8/0x6f0
    hardirqs last disabled at (5964): [] _raw_spin_lock_irqsave+0x24/0x68
    softirqs last enabled at (5502): [] __do_softirq+0x560/0x10c0
    softirqs last disabled at (5495): [] irq_exit+0x160/0x25c
    Preemption disabled at:[ 62.904063] [] snd_pcm_stream_lock+0xb4/0xc0
    CPU: 2 PID: 2242 Comm: aplay Tainted: G B C 4.9.54+ #186
    Hardware name: Renesas Salvator-X board based on r8a7795 (DT)
    Call trace:
    [] dump_backtrace+0x0/0x37c
    [] show_stack+0x14/0x1c
    [] dump_stack+0xfc/0x154
    [] ___might_sleep+0x57c/0x58c
    [] __might_sleep+0x208/0x21c
    [] mutex_lock_nested+0xb4/0x6f0
    [] clk_prepare_lock+0xb0/0x184
    [] clk_core_get_rate+0x14/0x54
    [] clk_get_rate+0x20/0x34
    [] rsnd_adg_ssi_clk_try_start+0x158/0x4f8 [snd_soc_rcar]
    [] rsnd_ssi_init+0x668/0x7a0 [snd_soc_rcar]
    [] rsnd_soc_dai_trigger+0x4bc/0xcf8 [snd_soc_rcar]
    [] soc_pcm_trigger+0x2a4/0x2d4

    Fixes: e7d850dd10f4 ("ASoC: rsnd: use mod base common method on SSI-parent")
    Signed-off-by: Jiada Wang
    Signed-off-by: Timo Wischer
    [Kuninori: tidyup for upstream]
    Signed-off-by: Kuninori Morimoto
    Tested-by: Hiroyuki Yokoyama
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Jiada Wang
     
  • commit 90a3b7f8aba3011badacd6d8121e03aa24ac79d1 upstream.

    The MMTLR bit is in the CS4265_SPDIF_CTL2 register at address 0x12 bit 0
    and not at address 0x0 bit 1. Fix this.

    Signed-off-by: Sébastien Szymanski
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Sébastien Szymanski
     

26 Sep, 2018

6 commits

  • commit 975b6a93088e83a41ba2f0dec2f086678fdb2a7a upstream.

    devm_gpiod_get is called with GPIOF_OUT_INIT_LOW but the function doesn't
    allow the parameters. Unluckily, GPIOF_OUT_INIT_LOW is same value as
    GPIOD_ASIS and gpio direction isn't set properly.

    Muted stream comes up when I try recording some sounds on TM2. mic-bias
    gpiod state can't be changed because the gpiod is created with the invalid
    parameter. The gpio should be set GPIOD_OUT_HIGH.

    Fixes: 1bfbc260a5b4 ("ASoC: samsung: Add machine driver for Exynos5433 based TM2 board")
    Signed-off-by: Jaechul Lee
    Reviewed-by: Krzysztof Kozlowski
    Signed-off-by: Mark Brown
    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Jaechul Lee
     
  • commit 6431a7e36652517df82855ee79c8240001812a55 upstream.

    If 'clk_prepare_enable()' fails, we must 'put' the corresponding clock.
    Othewise, there is a resource leak.

    Fixes: f5c97c7b0438 ("ASoC: samsung: i2s: Handle return value of clk_prepare_enable.")
    Signed-off-by: Christophe JAILLET
    Signed-off-by: Mark Brown
    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Christophe Jaillet
     
  • [ Upstream commit ff2d6acdf6f13d9f8fdcd890844c6d7535ac1f10 ]

    Without this commit the following intervals [x y), (x y) were be
    replaced to (y-1 y) by snd_interval_refine_last(). This was also done
    if y-1 is part of the previous interval.
    With this changes it will be replaced with [y-1 y) in case of y-1 is
    part of the previous interval. A similar behavior will be used for
    snd_interval_refine_first().

    This commit adapts the changes for alsa-lib of commit
    9bb985c ("pcm: snd_interval_refine_first/last: exclude value only if
    also excluded before")

    Signed-off-by: Timo Wischer
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Timo Wischer
     
  • [ Upstream commit d96f8bd28cd0bae3e6702ae90df593628ef6906f ]

    The patch fixes the issue of the delay volume applied.

    Signed-off-by: Oder Chiou
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Oder Chiou
     
  • [ Upstream commit bd1cd0eb2ce9141100628d476ead4de485501b29 ]

    AU0828_DEVICE() macro in quirks-table.h uses USB_DEVICE_VENDOR_SPEC()
    for expanding idVendor and idProduct fields. However, the latter
    macro adds also match_flags and bInterfaceClass, which are different
    from the values AU0828_DEVICE() macro sets after that.

    For fixing them, just expand idVendor and idProduct fields manually in
    AU0828_DEVICE().

    This fixes sparse warnings like:
    sound/usb/quirks-table.h:2892:1: warning: Initializer entry defined twice

    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • [ Upstream commit 7c500f9ea139d0c9b80fdea5a9c911db3166ea54 ]

    The default sample sizes set by msnd driver are bogus; it sets ALSA
    PCM format, not the actual bit width.

    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

20 Sep, 2018

1 commit

  • commit 16037643969e095509cd8446a3f8e406a6dc3a2c upstream.

    On AMD/ATI controllers, the HD-audio controller driver allows a bus
    reset upon the error recovery, and its procedure includes the
    cancellation of pending jack polling work as found in
    snd_hda_bus_codec_reset(). This works usually fine, but it becomes a
    problem when the reset happens from the jack poll work itself; then
    calling cancel_work_sync() from the work being processed tries to wait
    the finish endlessly.

    As a workaround, this patch adds the check of current_work() and
    applies the cancel_work_sync() only when it's not from the
    jackpoll_work.

    This doesn't fix the root cause of the reported error below, but at
    least, it eases the unexpected stall of the whole system.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200937
    Cc:
    Cc: Lukas Wunner
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

15 Sep, 2018

2 commits

  • commit ad0eaee6195db1db1749dd46b9e6f4466793d178 upstream.

    Add missing break statement in order to prevent the code from falling
    through to the default case.

    Addresses-Coverity-ID: 115050 ("Missing break in switch")
    Reported-by: Valdis Kletnieks
    Signed-off-by: Gustavo A. R. Silva
    Acked-by: Charles Keepax
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org
    [Gustavo: Backported to 3.16..4.18 - Remove code comment removal]
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Greg Kroah-Hartman

    Gustavo A. R. Silva
     
  • [ Upstream commit f861e3e28a3016a2064d9f600eaa92a530b732b4 ]

    The driver expects to find the device id in rt5677_of_match.data, however
    it is currently assigned to rt5677_of_match.type. Fix this.

    The problem was found with the help of clang:
    sound/soc/codecs/rt5677.c:5010:36: warning: expression which evaluates to
    zero treated as a null pointer constant of type 'const void *'
    [-Wnon-literal-null-conversion]
    { .compatible = "realtek,rt5677", RT5677 },
    ^~~~~~

    Fixes: ddc9e69b9dc2 ("ASoC: rt5677: Hide platform data in the module sources")
    Signed-off-by: Matthias Kaehlcke
    Reviewed-by: Guenter Roeck
    Acked-by: Andy Shevchenko
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Matthias Kaehlcke
     

05 Sep, 2018

3 commits

  • commit ae1c696a480c67c45fb23b35162183f72c6be0e1 upstream.

    There is a potential execution path in which function
    platform_get_resource() returns NULL. If this happens,
    we will end up having a NULL pointer dereference.

    Fix this by replacing devm_ioremap with devm_ioremap_resource,
    which has the NULL check and the memory region request.

    This code was detected with the help of Coccinelle.

    Cc: stable@vger.kernel.org
    Fixes: 2bd8d1d5cf89 ("ASoC: sirf: Add audio usp interface driver")
    Signed-off-by: Gustavo A. R. Silva
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Gustavo A. R. Silva
     
  • commit c889a45d229938a94b50aadb819def8bb11a6a54 upstream.

    zx-tdm driver sets the DAI driver definitions with the format bits
    wrongly set with SNDRV_PCM_FORMAT_*, instead of SNDRV_PCM_FMTBIT_*.

    This patch corrects the definitions.

    Spotted by a sparse warning:
    sound/soc/zte/zx-tdm.c:363:35: warning: restricted snd_pcm_format_t degrades to integer

    Fixes: 870e0ddc4345 ("ASoC: zx-tdm: add zte's tdm controller driver")
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Mark Brown
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 4febced15ac8ddb9cf3e603edb111842e4863d9a upstream.

    When merging codec formats, dpcm_runtime_base_format() should skip
    the codecs which are not supporting the current stream direction.

    At the moment, if a BE link has more than one codec, and only one
    of these codecs has no capture DAI, it becomes impossible to start
    a capture stream because the merged format would be 0.

    Skipping invalid codec DAI solves the problem.

    Fixes: b073ed4e2126 ("ASoC: soc-pcm: DPCM cares BE format")
    Signed-off-by: Jerome Brunet
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org
    Signed-off-by: Greg Kroah-Hartman

    Jerome Brunet
     

24 Aug, 2018

1 commit

  • [ Upstream commit c9a4c63888dbb79ce4d068ca1dd8b05bc3f156b1 ]

    The kernel may spew a WARNING with UBSAN undefined behavior at
    handling ALSA sequencer ioctl SNDRV_SEQ_IOCTL_QUERY_NEXT_CLIENT:

    UBSAN: Undefined behaviour in sound/core/seq/seq_clientmgr.c:2007:14
    signed integer overflow:
    2147483647 + 1 cannot be represented in type 'int'
    Call Trace:
    __dump_stack lib/dump_stack.c:77 [inline]
    dump_stack+0x122/0x1c8 lib/dump_stack.c:113
    ubsan_epilogue+0x12/0x86 lib/ubsan.c:159
    handle_overflow+0x1c2/0x21f lib/ubsan.c:190
    __ubsan_handle_add_overflow+0x2a/0x31 lib/ubsan.c:198
    snd_seq_ioctl_query_next_client+0x1ac/0x1d0 sound/core/seq/seq_clientmgr.c:2007
    snd_seq_ioctl+0x264/0x3d0 sound/core/seq/seq_clientmgr.c:2144
    ....

    It happens only when INT_MAX is passed there, as we're incrementing it
    unconditionally. So the fix is trivial, check the value with
    INT_MAX. Although the bug itself is fairly harmless, it's better to
    fix it so that fuzzers won't hit this again later.

    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=200211
    Signed-off-by: Takashi Iwai
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     

22 Aug, 2018

8 commits

  • commit 3acd3e3bab95ec3622ff98da313290ee823a0f68 upstream.

    The endian conversions used in vxp_dma_read() and vxp_dma_write() are
    superfluous and even wrong on big-endian machines, as inw() and outw()
    already do conversions. Kill them.

    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit dfef01e150824b0e6da750cacda8958188d29aea upstream.

    snd_dma_alloc_pages_fallback() tries to allocate pages again when the
    allocation fails with reduced size. But the first try actually
    *increases* the size to power-of-two, which may give back a larger
    chunk than the requested size. This confuses the callers, e.g. sgbuf
    assumes that the size is equal or less, and it may result in a bad
    loop due to the underflow and eventually lead to Oops.

    The code of this function seems incorrectly assuming the usage of
    get_order(). We need to decrease at first, then align to
    power-of-two.

    Reported-and-tested-by: he, bo
    Reported-by: zhang jun
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 8e82a728792bf66b9f0a29c9d4c4b0630f7b9c79 upstream.

    I added the subsys product-id for the HDMI HDA device rather then for
    the PCH one, this commit fixes this.

    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1525104
    Cc: stable@vger.kernel.org
    Signed-off-by: Hans de Goede
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit 69756930f2de0457d51db7d505a1e4f40e9fd116 upstream.

    One place in cs5535audio_build_dma_packets() does an extra conversion
    via cpu_to_le32(); namely jmpprd_addr is passed to setup_prd() ops,
    which writes the value via cs_writel(). That is, the callback does
    the conversion by itself, and we don't need to convert beforehand.

    This patch fixes that bogus conversion.

    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit 50e9ffb1996a5d11ff5040a266585bad4ceeca0a upstream.

    The virmidi output trigger tries to parse the all available bytes and
    process sequencer events as much as possible. In a normal situation,
    this is supposed to be relatively short, but a program may give a huge
    buffer and it'll take a long time in a single spin lock, which may
    eventually lead to a soft lockup.

    This patch simply adds a workaround, a cond_resched() call in the loop
    if applicable. A better solution would be to move the event processor
    into a work, but let's put a duct-tape quickly at first.

    Reported-and-tested-by: Dae R. Jeong
    Reported-by: syzbot+619d9f40141d826b097e@syzkaller.appspotmail.com
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit fff71a4c050ba46e305d910c837b99ba1728135e upstream.

    The endian conversions used in vx2_dma_read() and vx2_dma_write() are
    superfluous and even wrong on big-endian machines, as inl() and outl()
    already do conversions. Kill them.

    Spotted by sparse, a warning like:
    sound/pci/vx222/vx222_ops.c:278:30: warning: incorrect type in argument 1 (different base types)

    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Takashi Iwai
     
  • commit d77a4b4a5b0b2ebcbc9840995d91311ef28302ab upstream.

    As an equivalent codec with CX20724,
    CX8200 is also subject to the reboot bug.

    Late 2017 and 2018 LG Gram and some HP Spectre laptops are known victims
    to this issue, causing extremely loud noises upon reboot.

    Now that we know that this bug is subject to multiple codecs,
    fix the comment as well.

    Signed-off-by: Park Ju Hyung
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Park Ju Hyung
     
  • commit f59cf9a0551dd954ad8b752461cf19d9789f4b1d upstream.

    On rare occasions, we are still noticing that the internal speaker
    spitting out spurious noises even after adding the problematic codec
    to the list.

    Adding a 10ms artificial delay before rebooting fixes the issue entirely.

    Patch for Realtek codecs also adds the same amount of delay after
    entering D3.

    Signed-off-by: Park Ju Hyung
    Cc:
    Signed-off-by: Takashi Iwai
    Signed-off-by: Greg Kroah-Hartman

    Park Ju Hyung
     

18 Aug, 2018

3 commits

  • commit 3bbda5a38601f7675a214be2044e41d7749e6c7b upstream.

    If the ts3a227e audio accessory detection hardware is present and its
    driver probed, the jack needs to be created before enabling jack
    detection in the ts3a227e driver. With this patch, the jack is
    instantiated in the max98090 headset init function if the ts3a227e is
    present. This fixes a null pointer dereference as the jack detection
    enabling function in the ts3a driver was called before the jack is
    created.

    [minor correction to keep error handling on jack creation the same
    as before by Pierre Bossart]

    Signed-off-by: Thierry Escande
    Signed-off-by: Pierre-Louis Bossart
    Acked-By: Vinod Koul
    Signed-off-by: Mark Brown
    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Thierry Escande
     
  • commit f53ee247ad546183fc13739adafc5579b9f0ebc0 upstream.

    The kcontrol for the third input (rxN_mix1_inp3) of both RX2
    and RX3 mixers are not using the correct control register. This simple
    patch fixes this.

    Signed-off-by: Jean-François Têtu
    Signed-off-by: Mark Brown
    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Jean-François Têtu
     
  • commit b7165d26bf730567ab081bb9383aff82cd43d9ea upstream.

    Current ADG driver is over-writing flags. This patch fixes it.

    Reported-by: Hiroyuki Yokoyama
    Signed-off-by: Kuninori Morimoto
    Signed-off-by: Mark Brown
    Signed-off-by: Sudip Mukherjee
    Signed-off-by: Greg Kroah-Hartman

    Kuninori Morimoto
     

03 Aug, 2018

1 commit

  • [ Upstream commit 933e1c4a667103c4d10ebdc9505a0a6abd8c3fbd ]

    Clock gating parameter is a part of `dai_fmt`. It is supported by
    `alsa-lib` when creating a topology binary file, but ignored by kernel
    when loading this topology file.

    After applying this commit, the clock gating parameter is not ignored any
    more. This solution is backwards compatible. The existing behaviour is
    not broken, because by default the parameter value is 0 and is ignored.

    snd_soc_tplg_hw_config.clock_gated = 0 => no effect
    snd_soc_tplg_hw_config.clock_gated = 1 => SND_SOC_DAIFMT_GATED
    snd_soc_tplg_hw_config.clock_gated = 2 => SND_SOC_DAIFMT_CONT

    For example, the following config, based on
    alsa-lib/src/conf/topology/broadwell/broadwell.conf, is now supported:

    ~~~~
    SectionHWConfig."CodecHWConfig" {
    id "1"
    format "I2S" # physical audio format.
    pm_gate_clocks "true" # clock can be gated
    }

    SectionLink."Codec" {

    # used for binding to the physical link
    id "0"

    hw_configs [
    "CodecHWConfig"
    ]

    default_hw_conf_id "1"
    }
    ~~~~

    Signed-off-by: Kirill Marinushkin
    Reviewed-by: Pierre-Louis Bossart
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: Mark Brown
    Cc: Pan Xiuli
    Cc: Liam Girdwood
    Cc: linux-kernel@vger.kernel.org
    Cc: alsa-devel@alsa-project.org
    Signed-off-by: Mark Brown
    Signed-off-by: Sasha Levin
    Signed-off-by: Greg Kroah-Hartman

    Kirill Marinushkin