13 Jan, 2020

3 commits

  • Stanton SCS.1d uses Oxford Semiconductor FW 971 ASIC (FW971) for
    communication. Although the unit is bound to ALSA oxfw driver, the instance
    of sound card can not be added due to its quirk of plug information. This
    bug was added when snd-scs1x is merged into snd-oxfw at commit
    9e2004f9cedf ("ALSA: oxfw: obsolete scs1x module").

    This commit fixes the driver for the quirk. In cases that the unit returns
    NOT IMPLEMENTED for some AV/C commands, the sound card is added without any
    PCM/MIDI interfaces for packet streaming. For SCS.1d, model dependent
    operation adds MIDI interface and applications can use it to operate
    according to HSS1394 protocol from reverse-engineering work by Sean M.
    Pappalardo.

    Plug Control Register (PCR) has information that the unit has a pair of
    plugs for isochronous communication:

    (oMPR)
    $ ./firewire-request /dev/fw1 read 0xfffff0000900
    result: 80ff0001
    (iMPR)
    $ ./firewire-request /dev/fw1 read 0xfffff0000980
    result: 80ff0001

    AV/C PLUG INFO also returns information that the unit has a pair of
    plugs for isochronous communication.

    (AV/C PLUG INFO command)
    $ ./firewire-request /dev/fw1 fcp 0x01ff0200ffffffff
    response: 000: 0c ff 02 00 01 01 02 02

    However, AV/C PLUG SIGNAL INFO command is rejected for both plugs.

    (AV/C OUTPUT PLUG SIGNAL INFO command)
    $ ./firewire-request /dev/fw1 fcp 0x01ff1800ffffffff
    response: 000: 0a ff 18 00 ff ff ff ff
    (AV/C INPUT PLUG SIGNAL INFO command)
    $ ./firewire-request /dev/fw1 fcp 0x01ff1900ffffffff
    response: 000: 0a ff 19 00 ff ff ff ff

    Furthermore, AV/C EXTENDED STREAM FORMAT INFO is not implemented.

    (AV/C EXTENDED STREAM FORMAT INFO list subfunction for input plug)
    $ ./firewire-request /dev/fw1 fcp 0x01ffbfc000000000ffff00ff
    response: 000: 08 ff bf c0 00 00 00 00 ff ff 00 ff
    (AV/C EXTENDED STREAM FORMAT INFO list subfunction for output plug)
    $ ./firewire-request /dev/fw1 fcp 0x01ffbfc001000000ffff00ff
    response: 000: 08 ff bf c0 01 00 00 00 ff ff 00 ff
    (AV/C EXTENDED STREAM FORMAT INFO single subfunction for input plug)
    $ ./firewire-request /dev/fw1 fcp 0x01ffbfc100000000ffffffff
    response: 000: 08 ff bf c1 00 00 00 00 ff ff ff ff
    (AV/C EXTENDED STREAM FORMAT INFO single subfunction for output plug)
    $ ./firewire-request /dev/fw1 fcp 0x01ffbfc101000000ffffffff
    response: 000: 08 ff bf c1 01 00 00 00 ff ff ff ff

    Reference: https://mailman.alsa-project.org/pipermail/alsa-devel/2012-May/052264.html
    Signed-off-by: Takashi Sakamoto
    Link: https://lore.kernel.org/r/20200113073418.24622-4-o-takashi@sakamocchi.jp
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     
  • Stanton SCS.1d doesn't support packet streaming even if it has plugs for
    isochronous communication.

    This commit is a preparation for this case. The 'has_input' member is
    added to specific structure, and MIDI/PCM interfaces are not added when
    the member is false.

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

    Takashi Sakamoto
     
  • When AV/C command returns 'NOT IMPLEMENTED' status in its response, ALSA
    oxfw driver uses ENOSYS as error code. However, it's expected just to be
    used for missing system call number.

    This commit replaces it with ENXIO.

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

    Takashi Sakamoto
     

11 Dec, 2019

2 commits

  • All the PCM ioctl ops of ALSA FireWire drivers do nothing but calling
    the default handler.

    Now PCM core accepts NULL as the default ioctl ops(*), so let's drop
    altogether.

    (*) commit fc033cbf6fb7 ("ALSA: pcm: Allow NULL ioctl ops")

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

    Takashi Iwai
     
  • Clean up the drivers with the new managed buffer allocation API.
    The superfluous snd_pcm_lib_malloc_pages() and
    snd_pcm_lib_free_pages() calls are dropped.

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

    Takashi Iwai
     

10 Dec, 2019

1 commit


06 Nov, 2019

1 commit

  • The recent change (*) in the ALSA memalloc core allows us to drop the
    special vmalloc-specific allocation and page handling. This patch
    coverts to the common code.
    (*) 1fe7f397cfe2: ALSA: memalloc: Add vmalloc buffer allocation
    support
    7e8edae39fd1: ALSA: pcm: Handle special page mapping in the
    default mmap handler

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

    Takashi Iwai
     

19 Oct, 2019

3 commits

  • Some devices have a quirk to postpone transmission of isoc packet for
    several dozen or hundred isoc cycles since configured to transmit.
    Furthermore, some devices have a quirk to transmit isoc packet with
    discontinued data of its header.

    In 1394 OHCI specification, software allows to start isoc context with
    certain isoc cycle. Linux firewire subsystem has kernel API to use it
    as well.

    This commit uses the functionality of 1394 OHCI controller to handle
    the quirks. At present, this feature is convenient to ALSA bebob and
    fireface driver. As a result, some devices can be safely handled, as
    long as I know:
    - MAudio FireWire solo
    - MAudio ProFire Lightbridge
    - MAudio FireWire 410
    - Roland FA-66

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

    Takashi Sakamoto
     
  • An isoc context for AMDTP stream is flushed to queue packet
    by a call of pcm.ack. This commit extends this for AMDTP
    domain.

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

    Takashi Sakamoto
     
  • An isoc context for AMDTP stream is flushed to queue packet
    by a call of pcm.pointer. This commit extends this for AMDTP
    domain.

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

    Takashi Sakamoto
     

18 Oct, 2019

2 commits

  • This commit allows ALSA oxfw driver to share PCM buffer size for both
    capture and playback PCM substream. When AMDTP domain starts for one
    of the PCM substream, buffer size of the PCM substream is stores to
    AMDTP domain structure. Some AMDTP streams have already run with the
    buffer size when another PCM substream starts, therefore the PCM
    substream has a constraint to its buffer size.

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

    Takashi Sakamoto
     
  • The number of packets in packet buffer has been fixed number (=48) since
    first commit of ALSA IEC 61883-1/6 packet streaming engine.

    This commit allows the engine to use variable number of packets in the
    buffer. The size is calculated by a parameter in AMDTP domain structure
    surely to store the number of events in the packets of buffer. Although
    the value of parameter is expected to come from 'period size' parameter
    of PCM substream, at present 48 is still used.

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

    Takashi Sakamoto
     

17 Oct, 2019

2 commits

  • In current implementation, when opening a PCM substream, it's needed to
    check whether the opposite PCM substream runs. This is to assign
    effectual constraints (e.g. sampling rate) to opened PCM substream.

    The number of PCM substreams and MIDI substreams on AMDTP streams in
    domain is recorded in own structure. Usage of this count is an
    alternative of the above check. This is better because the count is
    incremented in pcm.hw_params earlier than pcm.trigger.

    This idea has one issue because it's incremented for MIDI substreams as
    well. In current implementation, for a case that any MIDI substream run
    and a PCM substream is going to start, PCM application to start the PCM
    substream can decide hardware parameters by restart packet streaming.
    Just checking the substream count can brings regression.

    Now AMDTP domain structure has a member for the size of PCM period in
    PCM substream which starts AMDTP streams in domain. When the value has
    zero and the substream count is greater than 1, it means that any MIDI
    substream starts AMDTP streams in domain. Usage of the value can resolve
    the above issue.

    This commit replaces the check with the substream count and the value for
    the size of PCM period.

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

    Takashi Sakamoto
     
  • This commit is a preparation to share the size of PCM period between
    PCM substreams on AMDTP streams in the same domain. At this time,
    the size of PCM period in PCM substream which starts AMDTP streams in the
    same domain is recorded.

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

    Takashi Sakamoto
     

10 Sep, 2019

1 commit

  • ASoC: Updates for v5.4

    Quite a big update this time around, particularly in the core
    where we've had a lot of cleanups from Morimoto-san - there's
    not much functional change but quite a bit of modernization
    going on. We've also seen a lot of driver work, a lot of it
    cleanups but also some particular drivers.

    - Lots and lots of cleanups from Morimoto-san and Yue Haibing.
    - Lots of cleanups and enhancements to the Freescale, sunxi dnd
    Intel rivers.
    - Initial Sound Open Firmware suppot for i.MX8.
    - Removal of w90x900 and nuc900 drivers as the platforms are
    being removed.
    - New support for Cirrus Logic CS47L15 and CS47L92, Freescale
    i.MX 7ULP and 8MQ, Meson G12A and NXP UDA1334

    Takashi Iwai
     

26 Aug, 2019

2 commits

  • When userspace application calls ioctl(2) to configure hardware for PCM
    playback substream, ALSA OXFW driver handles incoming AMDTP stream.
    In this case, outgoing AMDTP stream should be handled.

    This commit fixes the bug for v5.3-rc kernel.

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

    Takashi Sakamoto
     
  • ALSA oxfw driver supports Griffin FireWave. This device supports one
    isochronous stream for PCM playback. Current driver executes code to
    wait event for stream structure of opposite direction. This causes
    NULL pointer dereference.

    This commit fixes the bug.

    Fixes: ac5d77864cfc ("ALSA: oxfw: support AMDTP domain")
    Signed-off-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Takashi Sakamoto
     

06 Aug, 2019

1 commit


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
     

07 Jul, 2019

1 commit

  • 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
     

01 Jul, 2019

1 commit


21 Jun, 2019

1 commit


17 Jun, 2019

1 commit

  • In current implementation, establishment connection corresponds to
    allocation of isochronous resources. Although this is an ideal
    implementation of CMP described in IEC 61883-1, it's not enough
    efficient to recover PCM substream multiplexed in packet streaming.
    The packet streaming can always restart on the same allocated
    isochronous resources even if the previous packet streaming
    corrupted.

    This commit splits allocation of isochronous resources from
    establishment of connection so that CMP runs with allocated
    isochronous resources.

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

    Takashi Sakamoto
     

14 Jun, 2019

1 commit

  • Pull sound fixes from Takashi Iwai:
    "It might feel like deja vu to receive a bulk of changes at rc5, and it
    happens again; we've got a collection of fixes for ASoC. Most of fixes
    are targeted for the newly merged SOF (Sound Open Firmware) stuff and
    the relevant fixes for Intel platforms.

    Other than that, there are a few regression fixes for the recent ASoC
    core changes and HD-audio quirk, as well as a couple of FireWire fixes
    and for other ASoC codecs"

    * tag 'sound-5.2-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (54 commits)
    Revert "ALSA: hda/realtek - Improve the headset mic for Acer Aspire laptops"
    ALSA: ice1712: Check correct return value to snd_i2c_sendbytes (EWS/DMX 6Fire)
    ALSA: oxfw: allow PCM capture for Stanton SCS.1m
    ALSA: firewire-motu: fix destruction of data for isochronous resources
    ASoC: Intel: sst: fix kmalloc call with wrong flags
    ASoC: core: Fix deadlock in snd_soc_instantiate_card()
    SoC: rt274: Fix internal jack assignment in set_jack callback
    ALSA: hdac: fix memory release for SST and SOF drivers
    ASoC: SOF: Intel: hda: use the defined ppcap functions
    ASoC: core: move DAI pre-links initiation to snd_soc_instantiate_card
    ASoC: Intel: cht_bsw_rt5672: fix kernel oops with platform_name override
    ASoC: Intel: cht_bsw_nau8824: fix kernel oops with platform_name override
    ASoC: Intel: bytcht_es8316: fix kernel oops with platform_name override
    ASoC: Intel: cht_bsw_max98090: fix kernel oops with platform_name override
    ASoC: sun4i-i2s: Add offset to RX channel select
    ASoC: sun4i-i2s: Fix sun8i tx channel offset mask
    ASoC: max98090: remove 24-bit format support if RJ is 0
    ASoC: da7219: Fix build error without CONFIG_I2C
    ASoC: SOF: Intel: hda: Fix COMPILE_TEST build error
    ASoC: SOF: fix DSP oops definitions in FW ABI
    ...

    Linus Torvalds
     

12 Jun, 2019

9 commits


11 Jun, 2019

1 commit

  • Stanton SCS.1m can transfer isochronous packet with Multi Bit Linear
    Audio data channels, therefore it allows software to capture PCM
    substream. However, ALSA oxfw driver doesn't.

    This commit changes the driver to add one PCM substream for capture
    direction.

    Fixes: de5126cc3c0b ("ALSA: oxfw: add stream format quirk for SCS.1 models")
    Cc: # v4.5+
    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
     

21 May, 2019

1 commit


07 Feb, 2019

1 commit


13 Nov, 2018

1 commit

  • This commit adds support for APOGEE duet FireWire, launched 2007, already
    discontinued. This model uses Oxford Semiconductor FW971 as its
    communication engine. Below is information on Configuration ROM of this
    unit. The unit supports some AV/C commands defined by Audio subunit
    specification and vendor dependent commands.

    $ ./hinawa-config-rom-printer /dev/fw1
    { 'bus-info': { 'adj': False,
    'bmc': False,
    'chip_ID': 42949742248,
    'cmc': False,
    'cyc_clk_acc': 255,
    'generation': 0,
    'imc': False,
    'isc': True,
    'link_spd': 3,
    'max_ROM': 0,
    'max_rec': 64,
    'name': '1394',
    'node_vendor_ID': 987,
    'pmc': False},
    'root-directory': [ ['VENDOR', 987],
    ['DESCRIPTOR', 'Apogee Electronics'],
    ['MODEL', 122333],
    ['DESCRIPTOR', 'Duet'],
    [ 'NODE_CAPABILITIES',
    { 'addressing': {'64': True, 'fix': True, 'prv': False},
    'misc': {'int': False, 'ms': False, 'spt': True},
    'state': { 'atn': False,
    'ded': False,
    'drq': True,
    'elo': False,
    'init': False,
    'lst': True,
    'off': False},
    'testing': {'bas': False, 'ext': False}}],
    [ 'UNIT',
    [ ['SPECIFIER_ID', 41005],
    ['VERSION', 65537],
    ['MODEL', 122333],
    ['DESCRIPTOR', 'Duet']]]]}

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

    Takashi Sakamoto
     

10 Oct, 2018

2 commits