08 Jul, 2019

8 commits

  • It's better to use int type for loop index. For consistency, the name
    of local variable for the number of data block should be plural.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • As a result of former commits, post operation to data block count for
    cases without CIP_DBC_IS_END_EVENT can be done just with
    data_block_counter member of amdtp_stream structure.

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

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • When a parser for CIP header returns -EAGAIN, no extra care is needed
    to probe tracepoints event.

    This commit adds code refactoring for the error path.

    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • …ansferred isochronous packet

    For IT context, tracepoints event is probed after calculating next data
    block counter. This brings difference of data block counter between
    the probed event and actual isochronous packet.

    This commit fixes it.

    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

    Takashi Sakamoto
     
  • … CIP_DBC_IS_END_EVENT

    For IR context, ALSA IEC 61883-1/6 engine uses initial value of data
    block counter as UINT_MAX, to detect first isochronous packet in the
    middle of packet streaming.

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

    This commit fixes the bug.

    Fixes: 76864868dbab ("ALSA: firewire-lib: cache next data_block_counter after probing tracepoints event for IR context")
    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

    Takashi Sakamoto
     
  • …ext with CIP_NO_HEADER

    For IR context, ALSA IEC 61883-1/6 engine uses initial value of data
    block counter as UINT_MAX, to detect first isochronous packet in the
    middle of packet streaming.

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

    This commit fixes the bug.

    Fixes: 76864868dbab ("ALSA: firewire-lib: cache next data_block_counter after probing tracepoints event for IR context")
    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

    Takashi Sakamoto
     
  • Although CIP header is handled as context header, the length of isochronous
    packet includes two quadlets for its payload. In tracepoints event the
    value of payload_quadlets should includes the two quadlets. But at present
    it doesn't.

    This commit fixes the bug.

    Fixes: b18f0cfaf16b ("ALSA: firewire-lib: use 8 byte packet header for IT context to separate CIP header from CIP payload")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • …/sound into for-linus

    ASoC: Updates for v5.3

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

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

    Signed-off-by: Takashi Iwai <tiwai@suse.de>

    Takashi Iwai
     

07 Jul, 2019

8 commits

  • Merge a cleanup for HD-audio widget refresh code

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • Line6 Helix and HX stomp devices don't support retrieving
    the number of clock sample rate.

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

    [ fixed wrong variable initialization changes by tiwai ]

    Signed-off-by: Nicola Lunghi
    Signed-off-by: Takashi Iwai

    Nicola Lunghi
     
  • In IEC 61883-6, several types of sampling data can be multiplexed into
    payload of common isochronous packet (CIP). For typical audio and music
    units, PCM samples and MIDI messages are multiplexed into one packet
    streaming.

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

    This commit fixes the bug.

    Fixes: 8edc56ec8f14 ("ALSA: firewire-motu: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • …ror path of rawmidi interface

    In IEC 61883-6, several types of sampling data can be multiplexed into
    payload of common isochronous packet (CIP). For typical audio and music
    units, PCM samples and MIDI messages are multiplexed into one packet
    streaming.

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

    This commit fixes the bug.

    Fixes: ae8ffbb26512 ("ALSA: firewire-digi00x: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

    Takashi Sakamoto
     
  • In IEC 61883-6, several types of sampling data can be multiplexed into
    payload of common isochronous packet (CIP). For typical audio and music
    units, PCM samples and MIDI messages are multiplexed into one packet
    streaming.

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

    This commit fixes the bug.

    Fixes: 3cd2c2d780a2 ("ALSA: dice: reserve/release isochronous resources in pcm.hw_params/hw_free callbacks")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • In IEC 61883-6, several types of sampling data can be multiplexed into
    payload of common isochronous packet (CIP). For typical audio and music
    units, PCM samples and MIDI messages are multiplexed into one packet
    streaming.

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

    This commit fixes the bug.

    Fixes: 4f380d007052 ("ALSA: oxfw: configure packet format in pcm.hw_params callback")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • …h of rawmidi interface

    In IEC 61883-6, several types of sampling data can be multiplexed into
    payload of common isochronous packet (CIP). For typical audio and music
    units, PCM samples and MIDI messages are multiplexed into one packet
    streaming.

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

    This commit fixes the bug.

    Fixes: 3d7250667ea9 ("ALSA: fireworks: configure sampling transfer frequency in pcm.hw_params callback")
    Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
    Signed-off-by: Takashi Iwai <tiwai@suse.de>

    Takashi Sakamoto
     
  • In IEC 61883-6, several types of sampling data can be multiplexed into
    payload of common isochronous packet (CIP). For typical audio and music
    units, PCM samples and MIDI messages are multiplexed into one packet
    streaming.

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

    This commit fixes the bug.

    Fixes: ac2888b958f2 ("ALSA: bebob: configure sampling transfer frequency in pcm.hw_params callback")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

06 Jul, 2019

9 commits


05 Jul, 2019

4 commits

  • The variable val is being assigned with a value that is never
    read and it is being updated later with a new value. The
    assignment is redundant and can be removed. Also remove a
    goto statement and a label and replace with a break statement.

    Addresses-Coverity: ("Unused value")
    Signed-off-by: Colin Ian King
    Signed-off-by: Takashi Iwai

    Colin Ian King
     
  • Along with the recent fix for the races of snd_hdac_refresh_widgets()
    it turned out that the instantiation of widgets sysfs at
    snd_hdac_sysfs_reinit() could cause a race. The race itself was
    already covered later by extending the mutex protection range, the
    commit 98482377dc72 ("ALSA: hda: Fix widget_mutex incomplete
    protection"), but this also indicated that the call of *_reinit() is
    basically superfluous, as the widgets shall be created sooner or later
    from snd_hdac_device_register().

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

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • this patch fixes below issue reported by coccicheck
    sound/pci/asihpi/asihpi.c:1558:5-11: Unneeded variable: "change". Return
    "1" on line 1564

    Signed-off-by: Hariprasad Kelam
    Signed-off-by: Takashi Iwai

    Hariprasad Kelam
     
  • Extension Unit (XU) is used to have a compatible layout with
    Processing Unit (PU) on UAC1, and the usb-audio driver code assumed it
    for parsing the descriptors. Meanwhile, on UAC2, XU became slightly
    incompatible with PU; namely, XU has a one-byte bmControls bitmap
    while PU has two bytes bmControls bitmap. This incompatibility
    results in the read of a wrong address for the last iExtension field,
    which ended up with an incorrect string for the mixer element name, as
    recently reported for Focusrite Scarlett 18i20 device.

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

    Fixes: 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0")
    Reported-by: Stefan Sauer
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

04 Jul, 2019

5 commits

  • The variable 'changed' is being initialized with a value that is never
    read and it is being updated later with a new value. The initialization
    is redundant and can be removed.

    Addresses-Coverity: ("Unused value")
    Signed-off-by: Colin Ian King
    Signed-off-by: Takashi Iwai

    Colin Ian King
     
  • Dell headset mode platform with ALC236.
    It doesn't recording after system resume from S3.
    S3 mode was deep. s2idle was not has this issue.
    S3 deep will cut of codec power. So, the register will back to default
    after resume back.
    This patch will solve this issue.

    Signed-off-by: Kailang Yang
    Cc:
    Signed-off-by: Takashi Iwai

    Kailang Yang
     
  • After calling of_node_put() on the codec_ep and codec_port variables,
    they are still being used, which may result in use-after-free.
    We fix this issue by calling of_node_put() after the last usage.

    Fixes: fce9b90c1ab7 ("ASoC: audio-graph-card: cleanup DAI link loop method - step2")
    Signed-off-by: Wen Yang
    Cc: Liam Girdwood
    Cc: Mark Brown
    Cc: Jaroslav Kysela
    Cc: Takashi Iwai
    Cc: Kuninori Morimoto
    Cc: alsa-devel@alsa-project.org
    Cc: linux-kernel@vger.kernel.org
    Link: https://lore.kernel.org/r/1562229530-8121-1-git-send-email-wen.yang99@zte.com.cn
    Signed-off-by: Mark Brown

    Wen Yang
     
  • For some reason SLIMBus RX0 playback is not added to audio routes.
    This patch adds the missing route.

    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20190703123102.12626-1-srinivas.kandagatla@linaro.org
    Signed-off-by: Mark Brown

    Srinivas Kandagatla
     
  • It makes it easier for common code to work with snd_soc_dai_set_channel_map()
    by distinguishing between operation not being supported and an error.
    This is done inline with others snd_soc_dai.* apis.

    Signed-off-by: Srinivas Kandagatla
    Link: https://lore.kernel.org/r/20190703123002.12427-1-srinivas.kandagatla@linaro.org
    Signed-off-by: Mark Brown

    Srinivas Kandagatla
     

03 Jul, 2019

2 commits

  • Add the optional reset line handling which is present on the new SoC
    families, such as the g12a. Triggering this reset is not critical but
    it helps solve a channel shift issue on the g12a.

    Signed-off-by: Jerome Brunet
    Link: https://lore.kernel.org/r/20190703120749.32341-3-jbrunet@baylibre.com
    Signed-off-by: Mark Brown

    Jerome Brunet
     
  • LINE6 drivers allocate the buffers based on the value returned from
    usb_maxpacket() calls. The manipulated device may return zero for
    this, and this results in the kmalloc() with zero size (and it may
    succeed) while the other part of the driver code writes the packet
    data with the fixed size -- which eventually overwrites.

    This patch adds a simple sanity check for the invalid buffer size for
    avoiding that problem.

    Reported-by: syzbot+219f00fb49874dcaea17@syzkaller.appspotmail.com
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

02 Jul, 2019

4 commits