16 Mar, 2019

1 commit

  • Pull sound fixes from Takashi Iwai:
    "Some cleaning after the first batch; mostly about HD-audio quirks but
    also some NULL dereference fixes in corner cases and a random build
    error fix, too"

    * tag 'sound-fix-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
    ALSA: hda/realtek - Add support headset mode for New DELL WYSE NB
    ALSA: hda/realtek - Add support headset mode for DELL WYSE AIO
    ALSA: hda/realtek: merge alc_fixup_headset_jack to alc295_fixup_chromebook
    ALSA: pcm: Fix function name in kernel-doc comment
    ALSA: hda: hdmi - add Icelake support
    ALSA: hda - add more quirks for HP Z2 G4 and HP Z240
    ALSA: hda/realtek - Fixed Headset Mic JD not stable
    ALSA: hda/realtek: Enable headset MIC of Acer TravelMate X514-51T with ALC255
    ALSA: hda/tegra: avoid build error without CONFIG_PM
    ALSA: usx2y: Fix potential NULL pointer dereference
    ALSA: hda: Avoid NULL pointer dereference at snd_hdac_stream_start()

    Linus Torvalds
     

14 Mar, 2019

4 commits


13 Mar, 2019

6 commits

  • Apply the HP_MIC_NO_PRESENCE fixups for the more HP Z2 G4 and
    HP Z240 models.

    Reported-by: Jeff Burrell
    Signed-off-by: Jaroslav Kysela
    Cc:
    Signed-off-by: Takashi Iwai

    Jaroslav Kysela
     
  • It will be lose Mic JD state when Chrome OS boot and headset was plugged.
    Implement of reset combo jack JD. It will show normally.

    Fixes: e854747d7593 ("ALSA: hda/realtek - Enable headset button support for new codec")
    Signed-off-by: Kailang Yang
    Signed-off-by: Takashi Iwai

    Kailang Yang
     
  • The Acer TravelMate X514-51T with ALC255 cannot detect the headset MIC
    until ALC255_FIXUP_ACER_HEADSET_MIC quirk applied. Although, the
    internal DMIC uses another module - snd_soc_skl as the driver. We still
    need the NID 0x1a in the quirk to enable the headset MIC.

    Signed-off-by: Jian-Hong Pan
    Signed-off-by: Kailang Yang
    Cc:
    Signed-off-by: Takashi Iwai

    Jian-Hong Pan
     
  • The #ifdef protection around the PM functions is wrong, leading to
    a failed reference in some configurations:

    sound/pci/hda/hda_tegra.c: In function 'hda_tegra_runtime_suspend':
    sound/pci/hda/hda_tegra.c:273:2: error: implicit declaration of function 'hda_tegra_disable_clocks'; did you mean 'hda_tegra_enable_clocks'? [-Werror=implicit-function-declaration]

    Better remove the #ifdefs entirely and rely on the compiler silently
    dropping unused functions marked __maybe_unused.

    Fixes: 707e0759f2f4 ("ALSA: hda/tegra: implement runtime suspend/resume")
    Acked-by: Thierry Reding
    Signed-off-by: Arnd Bergmann
    Signed-off-by: Takashi Iwai

    Arnd Bergmann
     
  • usb_alloc_urb() can fail due to kmalloc failure and push the error
    upstream. Further this can cause a NULL pointer dereference in
    init_pipe_urbs(). This patch avoids such a scenario.

    Signed-off-by: Aditya Pakki
    Signed-off-by: Takashi Iwai

    Aditya Pakki
     
  • For ca0132 codec, azx_dev->stream is NULL during firmware loading.
    Calling snd_hdac_get_stream_stripe_ctl unconditionally causes NULL
    pointer dereference in that function.

    Fixes: 9b6f7e7a296e ("ALSA: hda: program stripe bits for controller")
    Signed-off-by: Mariusz Ceier
    Signed-off-by: Takashi Iwai

    Mariusz Ceier
     

07 Mar, 2019

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver patch pull request for 5.1-rc1.

    The largest thing by far is the new habanalabs driver for their AI
    accelerator chip. For now it is in the drivers/misc directory but will
    probably move to a new directory soon along with other drivers of this
    type.

    Other than that, just the usual set of individual driver updates and
    fixes. There's an "odd" merge in here from the DRM tree that they
    asked me to do as the MEI driver is starting to interact with the i915
    driver, and it needed some coordination. All of those patches have
    been properly acked by the relevant subsystem maintainers.

    All of these have been in linux-next with no reported issues, most for
    quite some time"

    * tag 'char-misc-5.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (219 commits)
    habanalabs: adjust Kconfig to fix build errors
    habanalabs: use %px instead of %p in error print
    habanalabs: use do_div for 64-bit divisions
    intel_th: gth: Fix an off-by-one in output unassigning
    habanalabs: fix little-endiancpu conversion warnings
    habanalabs: use NULL to initialize array of pointers
    habanalabs: fix little-endiancpu conversion warnings
    habanalabs: soft-reset device if context-switch fails
    habanalabs: print pointer using %p
    habanalabs: fix memory leak with CBs with unaligned size
    habanalabs: return correct error code on MMU mapping failure
    habanalabs: add comments in uapi/misc/habanalabs.h
    habanalabs: extend QMAN0 job timeout
    habanalabs: set DMA0 completion to SOB 1007
    habanalabs: fix validation of WREG32 to DMA completion
    habanalabs: fix mmu cache registers init
    habanalabs: disable CPU access on timeouts
    habanalabs: add MMU DRAM default page mapping
    habanalabs: Dissociate RAZWI info from event types
    misc/habanalabs: adjust Kconfig to fix build errors
    ...

    Linus Torvalds
     

01 Mar, 2019

1 commit

  • Add an entry to the quirks-table to for usb-audio to recognize the
    Microbook II (although it only exposes vendor interfaces). A simple boot
    quirk is also implemented to set up the sample rate and make sure that
    no audio urbs are sent before the device is ready.

    This patch only provides audio playback and capture at 96kHz sample
    rate. Notice the following shortcomings:

    - The sample rate is currently hardcoded to 96k although the device also
    supports 48k and 44.1k.

    - The various mixer controls of the MicroBook are not made available.

    - The keep-iface control should be on by default because the device
    shuts down whenever the altsetting is reset which is usually unwanted.
    (I don't know the best way to do this)

    - The communication format used by the MicroBook for sample rate setting
    and also other setup has been reverse engineered by looking at the
    usbmon output while running the windows driver through virtualbox. In
    this patch the first byte of every message is set to \0 while in the
    observed communications the first byte acts as a "message-counter"
    increasing its value with every message sent. Leaving it at \0 does
    not seem to affect the device.

    Signed-off-by: Manuel Reinhardt
    Signed-off-by: Takashi Iwai

    Manuel Reinhardt
     

28 Feb, 2019

1 commit

  • …ie/sound into for-next

    ASoC: More changes for v5.1

    Another batch of changes for ASoC, no big core changes - it's mainly
    small fixes and improvements for individual drivers.

    - A big refresh and cleanup of the Samsung drivers, fixing a number of
    issues which allow the driver to be used with a wider range of
    userspaces.
    - Fixes for the Intel drivers to make them more standard so less likely
    to get bitten by core issues.
    - New driver for Cirrus Logic CS35L26.

    Takashi Iwai
     

27 Feb, 2019

2 commits


26 Feb, 2019

13 commits

  • Dummy write in capture master mode is used to gate
    bus clocks. This write is useless in slave mode
    as the clocks are not managed by slave.

    Signed-off-by: Olivier Moysan
    Signed-off-by: Mark Brown

    Olivier Moysan
     
  • When snd_pcm_stop_xrun() is called in interrupt routine,
    substream context may have already been released.
    Add protection on substream context.

    Signed-off-by: Olivier Moysan
    Signed-off-by: Mark Brown

    Olivier Moysan
     
  • Clocks do not need to be released on driver removal,
    as this is already managed before.
    Remove useless remove callback.

    Signed-off-by: Olivier Moysan
    Signed-off-by: Mark Brown

    Olivier Moysan
     
  • DMA configuration is not balanced on start/stop.
    Move DMA configuration to trigger callback.

    Signed-off-by: Olivier Moysan
    Signed-off-by: Mark Brown

    Olivier Moysan
     
  • Move counter handling to trigger start section
    to manage multiple start/stop events.

    Signed-off-by: Olivier Moysan
    Signed-off-by: Mark Brown

    Olivier Moysan
     
  • I2S supports 16 bits data in 32 channel length.
    However the expected driver behavior, is to
    set channel length to 16 bits when data format is 16 bits.

    Signed-off-by: Olivier Moysan
    Signed-off-by: Mark Brown

    Olivier Moysan
     
  • Because of regmap cache, interrupts may not be cleared
    as expected.
    Declare IFCR register as write only and make writings
    to IFCR register unconditional.

    Signed-off-by: Olivier Moysan
    Signed-off-by: Mark Brown

    Olivier Moysan
     
  • …e/sound into asoc-5.1

    Mark Brown
     
  • SND_SOC_CROS_EC_CODEC depends on MFD_CROS_EC.
    Add that dependency to SND_SOC_SDM845 to fix unmet direct dependencies
    warning.

    Fixes: 74c6ecf4194e (ASoC: qcom: Kconfig: select dmic for sdm845)
    Signed-off-by: Cheng-Yi Chiang
    Reported-by: Randy Dunlap
    Tested-by: Enric Balletbo i Serra
    Tested-by: Randy Dunlap
    Signed-off-by: Mark Brown

    Cheng-Yi Chiang
     
  • This patch enables the reuse of kbl_da7219_max98927 machine driver to
    support max98373. The same machine driver is modified for cases where one
    amplifier is swapped out with another. Most of the changes are about
    renaming the codec and codec_dai names, with minor differences due to
    support for 24 bits in one case and 16 in the other.

    Signed-off-by: Jenny TC
    Acked-by: Pierre-Louis Bossart
    Signed-off-by: Mark Brown

    Jenny TC
     
  • Currently each SSI unit 's busif mode/adinr/dalign address is
    registered by: (in busif4 case)
    RSND_GEN_M_REG(SSI_BUSIF4_MODE, 0x500, 0x80)
    RSND_GEN_M_REG(SSI_BUSIF4_ADINR,0x504, 0x80)
    RSND_GEN_M_REG(SSI_BUSIF4_DALIGN, 0x508, 0x80)

    But according to user manual 41.1.4 Register Configuration
    ssi9 4/5/6/7 busif mode/adinr/dalign register address
    ( SSI9-[4/5/6/7]_BUSIF_[MODE/ADINR/DALIGN] )
    are out of this rule.

    This patch registers ssi9 4/5/6/7 mode/adinr/dalign register
    as single register, and access these registers in case of
    SSI9 BUSIF 4/5/6/7.

    Fixes: commit 8c9d75033340 ("ASoC: rsnd: ssiu: Support BUSIF other than BUSIF0")
    Signed-off-by: Jiada Wang
    Signed-off-by: Timo Wischer
    Acked-by: Kuninori Morimoto
    Signed-off-by: Mark Brown

    Jiada Wang
     
  • In data blocks of common isochronous packet for MOTU devices, PCM
    frames are multiplexed in a shape of '24 bit * 4 Audio Pack', described
    in IEC 61883-6. The frames are not aligned to quadlet.

    For capture PCM substream, ALSA firewire-motu driver constructs PCM
    frames by reading data blocks byte-by-byte. However this operation
    includes bug for lower byte of the PCM sample. This brings invalid
    content of the PCM samples.

    This commit fixes the bug.

    Reported-by: Peter Sjöberg
    Cc: # v4.12+
    Fixes: 4641c9394010 ("ALSA: firewire-motu: add MOTU specific protocol layer")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • ALSA bebob driver has an entry for Focusrite Saffire Pro 10 I/O. The
    entry matches vendor_id in root directory and model_id in unit
    directory of configuration ROM for IEEE 1394 bus.

    On the other hand, configuration ROM of Focusrite Liquid Saffire 56
    has the same vendor_id and model_id. This device is an application of
    TCAT Dice (TCD2220 a.k.a Dice Jr.) however ALSA bebob driver can be
    bound to it randomly instead of ALSA dice driver. At present, drivers
    in ALSA firewire stack can not handle this situation appropriately.

    This commit uses more identical mod_alias for Focusrite Saffire Pro 10
    I/O in ALSA bebob driver.

    $ python2 crpp < /sys/bus/firewire/devices/fw1/config_rom
    ROM header and bus information block
    -----------------------------------------------------------------
    400 042a829d bus_info_length 4, crc_length 42, crc 33437
    404 31333934 bus_name "1394"
    408 f0649222 irmc 1, cmc 1, isc 1, bmc 1, pmc 0, cyc_clk_acc 100,
    max_rec 9 (1024), max_rom 2, gen 2, spd 2 (S400)
    40c 00130e01 company_id 00130e |
    410 000606e0 device_id 01000606e0 | EUI-64 00130e01000606e0

    root directory
    -----------------------------------------------------------------
    414 0009d31c directory_length 9, crc 54044
    418 04000014 hardware version
    41c 0c0083c0 node capabilities per IEEE 1394
    420 0300130e vendor
    424 81000012 --> descriptor leaf at 46c
    428 17000006 model
    42c 81000016 --> descriptor leaf at 484
    430 130120c2 version
    434 d1000002 --> unit directory at 43c
    438 d4000006 --> dependent info directory at 450

    unit directory at 43c
    -----------------------------------------------------------------
    43c 0004707c directory_length 4, crc 28796
    440 1200a02d specifier id: 1394 TA
    444 13010001 version: AV/C
    448 17000006 model
    44c 81000013 --> descriptor leaf at 498

    dependent info directory at 450
    -----------------------------------------------------------------
    450 000637c7 directory_length 6, crc 14279
    454 120007f5 specifier id
    458 13000001 version
    45c 3affffc7 (immediate value)
    460 3b100000 (immediate value)
    464 3cffffc7 (immediate value)
    468 3d600000 (immediate value)

    descriptor leaf at 46c
    -----------------------------------------------------------------
    46c 00056f3b leaf_length 5, crc 28475
    470 00000000 textual descriptor
    474 00000000 minimal ASCII
    478 466f6375 "Focu"
    47c 73726974 "srit"
    480 65000000 "e"

    descriptor leaf at 484
    -----------------------------------------------------------------
    484 0004a165 leaf_length 4, crc 41317
    488 00000000 textual descriptor
    48c 00000000 minimal ASCII
    490 50726f31 "Pro1"
    494 30494f00 "0IO"

    descriptor leaf at 498
    -----------------------------------------------------------------
    498 0004a165 leaf_length 4, crc 41317
    49c 00000000 textual descriptor
    4a0 00000000 minimal ASCII
    4a4 50726f31 "Pro1"
    4a8 30494f00 "0IO"

    $ python2 crpp < /sys/bus/firewire/devices/fw1/config_rom
    ROM header and bus information block
    -----------------------------------------------------------------
    400 040442e4 bus_info_length 4, crc_length 4, crc 17124
    404 31333934 bus_name "1394"
    408 e0ff8112 irmc 1, cmc 1, isc 1, bmc 0, pmc 0, cyc_clk_acc 255,
    max_rec 8 (512), max_rom 1, gen 1, spd 2 (S400)
    40c 00130e04 company_id 00130e |
    410 018001e9 device_id 04018001e9 | EUI-64 00130e04018001e9

    root directory
    -----------------------------------------------------------------
    414 00065612 directory_length 6, crc 22034
    418 0300130e vendor
    41c 8100000a --> descriptor leaf at 444
    420 17000006 model
    424 8100000e --> descriptor leaf at 45c
    428 0c0087c0 node capabilities per IEEE 1394
    42c d1000001 --> unit directory at 430

    unit directory at 430
    -----------------------------------------------------------------
    430 000418a0 directory_length 4, crc 6304
    434 1200130e specifier id
    438 13000001 version
    43c 17000006 model
    440 8100000f --> descriptor leaf at 47c

    descriptor leaf at 444
    -----------------------------------------------------------------
    444 00056f3b leaf_length 5, crc 28475
    448 00000000 textual descriptor
    44c 00000000 minimal ASCII
    450 466f6375 "Focu"
    454 73726974 "srit"
    458 65000000 "e"

    descriptor leaf at 45c
    -----------------------------------------------------------------
    45c 000762c6 leaf_length 7, crc 25286
    460 00000000 textual descriptor
    464 00000000 minimal ASCII
    468 4c495155 "LIQU"
    46c 49445f53 "ID_S"
    470 41464649 "AFFI"
    474 52455f35 "RE_5"
    478 36000000 "6"

    descriptor leaf at 47c
    -----------------------------------------------------------------
    47c 000762c6 leaf_length 7, crc 25286
    480 00000000 textual descriptor
    484 00000000 minimal ASCII
    488 4c495155 "LIQU"
    48c 49445f53 "ID_S"
    490 41464649 "AFFI"
    494 52455f35 "RE_5"
    498 36000000 "6"

    Cc: # v3.16+
    Fixes: 25784ec2d034 ("ALSA: bebob: Add support for Focusrite Saffire/SaffirePro series")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

25 Feb, 2019

1 commit

  • I set 10 seconds for the timeout of the i915 audio component binding
    with a hope that recent machines are fast enough to handle all probe
    tasks in that period, but I was too optimistic. The binding may take
    longer than that, and this caused a problem on the machine with both
    audio and graphics driver modules loaded in parallel, as Paul Menzel
    experienced. This problem haven't hit so often just because the KMS
    driver is loaded in initrd on most machines.

    As a simple workaround, extend the timeout to 60 seconds.

    Fixes: f9b54e1961c7 ("ALSA: hda/i915: Allow delayed i915 audio component binding")
    Reported-by: Paul Menzel
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

22 Feb, 2019

7 commits


21 Feb, 2019

3 commits

  • The ASUS UX362FA with ALC294 cannot detect the headset MIC and outputs
    through the internal speaker and the headphone. This issue can be fixed
    by the quirk in the commit 4e0511067 ALSA: hda/realtek: Enable audio
    jacks of ASUS UX533FD with ALC294.

    Besides, ASUS UX362FA and UX533FD have the same audio initial pin config
    values. So, this patch replaces SND_PCI_QUIRK of UX533FD with a new
    SND_HDA_PIN_QUIRK which benefits both UX362FA and UX533FD.

    Fixes: 4e051106730d ("ALSA: hda/realtek: Enable audio jacks of ASUS UX533FD with ALC294")
    Signed-off-by: Jian-Hong Pan
    Signed-off-by: Ming Shuo Chiu
    Cc:
    Signed-off-by: Takashi Iwai

    Jian-Hong Pan
     
  • This addresses an issue pointed out by compiler warning:

    sound/soc/samsung/odroid.c: In function ‘odroid_audio_probe’:
    sound/soc/samsung/odroid.c:298:22: warning: ‘cpu_dai’ may be used
    uninitialized in this function [-Wmaybe-uninitialized]
    priv->clk_i2s_bus = of_clk_get_by_name(cpu_dai, "iis");
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Signed-off-by: Sylwester Nawrocki
    Signed-off-by: Mark Brown

    Sylwester Nawrocki
     
  • We need 32ea33a04484 ("mei: bus: export to_mei_cl_device for mei
    client devices drivers") for the mei-hdcp patches.

    References: https://lkml.org/lkml/2019/2/19/356
    Signed-off-by: Daniel Vetter

    Daniel Vetter