08 May, 2020

1 commit

  • Although the value of FDF is used just for outgoing stream, the assignment
    to union member is done for both directions of stream. At present this
    causes no issue because the value of same position is reassigned later for
    opposite stream. However, it's better to add if statement.

    Fixes: d3d10a4a1b19 ("ALSA: firewire-lib: use union for directional parameters")
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20200508043635.349339-2-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

22 Jul, 2019

6 commits


08 Jul, 2019

1 commit

  • …/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
     

01 Jul, 2019

2 commits

  • This back-merge is necessary for adjusting the latest FireWire fix
    with the recent refactoring in 5.3 development branch.

    Signed-off-by: Takashi Iwai

    Takashi Iwai
     
  • In IEC 61883-6, 8 MIDI data streams are multiplexed into single
    MIDI conformant data channel. The index of stream is calculated by
    modulo 8 of the value of data block counter.

    In fireworks, the value of data block counter in CIP header has a quirk
    with firmware version v5.0.0, v5.7.3 and v5.8.0. This brings ALSA
    IEC 61883-1/6 packet streaming engine to miss detection of MIDI
    messages.

    This commit fixes the miss detection to modify the value of data block
    counter for the modulo calculation.

    For maintainers, this bug exists since a commit 18f5ed365d3f ("ALSA:
    fireworks/firewire-lib: add support for recent firmware quirk") in Linux
    kernel v4.2. There're many changes since the commit. This fix can be
    backported to Linux kernel v4.4 or later. I tagged a base commit to the
    backport for your convenience.

    Besides, my work for Linux kernel v5.3 brings heavy code refactoring and
    some structure members are renamed in 'sound/firewire/amdtp-stream.h'.
    The content of this patch brings conflict when merging -rc tree with
    this patch and the latest tree. I request maintainers to solve the
    conflict to replace 'tx_first_dbc' with 'ctx_data.tx.first_dbc'.

    Fixes: df075feefbd3 ("ALSA: firewire-lib: complete AM824 data block processing layer")
    Cc: # v4.4+
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

05 Jun, 2019

1 commit

  • Based on 1 normalized pattern(s):

    licensed under the terms of the gnu general public license version 2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 88 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Alexios Zavras
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190530000437.521539229@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

22 May, 2019

1 commit


25 Oct, 2017

1 commit

  • …READ_ONCE()/WRITE_ONCE()

    Please do not apply this to mainline directly, instead please re-run the
    coccinelle script shown below and apply its output.

    For several reasons, it is desirable to use {READ,WRITE}_ONCE() in
    preference to ACCESS_ONCE(), and new code is expected to use one of the
    former. So far, there's been no reason to change most existing uses of
    ACCESS_ONCE(), as these aren't harmful, and changing them results in
    churn.

    However, for some features, the read/write distinction is critical to
    correct operation. To distinguish these cases, separate read/write
    accessors must be used. This patch migrates (most) remaining
    ACCESS_ONCE() instances to {READ,WRITE}_ONCE(), using the following
    coccinelle script:

    ----
    // Convert trivial ACCESS_ONCE() uses to equivalent READ_ONCE() and
    // WRITE_ONCE()

    // $ make coccicheck COCCI=/home/mark/once.cocci SPFLAGS="--include-headers" MODE=patch

    virtual patch

    @ depends on patch @
    expression E1, E2;
    @@

    - ACCESS_ONCE(E1) = E2
    + WRITE_ONCE(E1, E2)

    @ depends on patch @
    expression E;
    @@

    - ACCESS_ONCE(E)
    + READ_ONCE(E)
    ----

    Signed-off-by: Mark Rutland <mark.rutland@arm.com>
    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    Cc: Linus Torvalds <torvalds@linux-foundation.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Thomas Gleixner <tglx@linutronix.de>
    Cc: davem@davemloft.net
    Cc: linux-arch@vger.kernel.org
    Cc: mpe@ellerman.id.au
    Cc: shuah@kernel.org
    Cc: snitzer@redhat.com
    Cc: thor.thayer@linux.intel.com
    Cc: tj@kernel.org
    Cc: viro@zeniv.linux.org.uk
    Cc: will.deacon@arm.com
    Link: http://lkml.kernel.org/r/1508792849-3115-19-git-send-email-paulmck@linux.vnet.ibm.com
    Signed-off-by: Ingo Molnar <mingo@kernel.org>

    Mark Rutland
     

22 May, 2017

1 commit

  • In IEC 61883-6, AM824 is described as format of data block. In this
    format, one data block consists of several data channels, which is aligned
    to 32 bit. One data channel has 8 bit label field and 24 bit data field.
    PCM frames are transferred in Multi Bit Linear Audio (MBLA) data channel.
    This channel can include 16/20/24 bit PCM sample.

    As long as I know, models which support IEC 61883-1/6 doesn't allow to
    switch bit length of PCM sample in MBLA data channel. They always
    transmit/receive PCM frames of 24 bit length. This can be seen for the
    other models which support protocols similar to IEC 61883-1/6.

    On the other hand, current drivers for these protocols supports 16 bit
    length PCM sample in playback substream. In this case, PCM sample is put
    into the MBLA data channel with 8 bit padding in LSB side. Although 16
    bit PCM sample is major because it's in CD format, this doesn't represent
    device capability as is.

    This commit removes support for 16 bit PCM samples in playback substream.

    Signed-off-by: Takashi Sakamoto
    Acked-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

29 Sep, 2015

7 commits

  • Signed-off-by: Fengguang Wu
    Signed-off-by: Takashi Iwai

    kbuild test robot
     
  • This commit moves the codes related to data block processing from packet
    streaming layer to AM824 layer.

    Each driver initializes amdtp stream structure for AM824 data block by
    calling amdtp_am824_init(). Then, a memory block is allocated for AM824
    specific structure. This memory block is released by calling
    amdtp_stream_destroy().

    When setting streaming parameters, it calls amdtp_am824_set_parameters().
    When starting packet streaming, it calls amdtp_stream_start(). When
    stopping packet streaming, it calls amdtp_stream_stop().

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

    Takashi Sakamoto
     
  • In IEC 61883-6, MIDI messages are transferred in MIDI conformant data
    channel. Essentially, packet streaming layer is not responsible for MIDI
    functionality.

    This commit moves MIDI trigger helper function from the layer to AM824
    layer. The rest of codes related to MIDI functionality will be moved in
    later commits.

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

    Takashi Sakamoto
     
  • In IEC 61883-6, several types of data are available in AM824 format. The
    data is transferred in each data channel. The position of data channel in
    data block differs depending on model.

    Current implementation has an array to map the index of data channel in an
    data block to the position of actual data channel. The implementation
    allows each driver to access the mapping directly.

    In later commit, the mapping is in specific structure pushed into an
    opaque pointer. Helper functions are required.

    This commit adds the helper functions for this purpose. In IEC 61883-6,
    AM824 format supports many data types, while this specification easily
    causes over-engineering. Current AM824 implementation is allowed to handle
    two types of data, Multi Bit Linear Audio data (=PCM samples) and MIDI
    conformant data (=MIDI messages).

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

    Takashi Sakamoto
     
  • In IEC 61883-6, PCM frames are transferred in Multi Bit Linear Audio data
    channel. The data channel transfers 16/20/24 bit PCM samples. Thus, PCM
    substream has a constrain about it.

    This commit moves codes related to the constraint from packet streaming
    layer to AM824 data block processing layer.

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

    Takashi Sakamoto
     
  • The value of FDF field in CIP header is protocol-dependent. Thus, it's
    better to allow data block processing layer to decide the value in any
    timing.

    In AM824 data format, the value of FDF field in CIP header indicates
    N-flag and Nominal Sampling Frequency Code (sfc). The N-flag is for
    switching 'Clock-based rate control mode' and 'Command-based rate control
    mode'. In our implementation, 'Clock-based rate control mode' is just
    supported. Therefore, When sampling transfer frequency is decided, then
    the FDF can be set.

    This commit replaces 'amdtp_stream_set_parameters' with
    'amdtp_am824_set_parameters' to set the FDF. This is the same timing
    to decide the ration between the number of data blocks and the number of
    PCM frames.

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

    Takashi Sakamoto
     
  • This commit adds data block processing layer for AM824 format. The new
    layer initializes streaming layer with its value for fmt field.

    Currently, most implementation of data block processing still remains
    streaming layer. In later commits, these codes will be moved to the layer.

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

    Takashi Sakamoto