06 Feb, 2015

10 commits


03 Feb, 2015

1 commit

  • To quote from section 1.3.1 of the data sheet:
    The SGTL5000 has an internal reset that is deasserted
    8 SYS_MCLK cycles after all power rails have been brought
    up. After this time, communication can start

    ...
    1.0us represents 8 SYS_MCLK cycles at the minimum 8.0 MHz SYS_MCLK.

    Signed-off-by: Eric Nelson
    Reviewed-by: Fabio Estevam
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Eric Nelson
     

30 Jan, 2015

3 commits


29 Jan, 2015

1 commit

  • When ak4114 work calls its callback and the callback invokes
    ak4114_reinit(), it stalls due to flush_delayed_work(). For avoiding
    this, control the reentrance by introducing a refcount. Also
    flush_delayed_work() is replaced with cancel_delayed_work_sync().

    The exactly same bug is present in ak4113.c and fixed as well.

    Reported-by: Pavel Hofman
    Acked-by: Jaroslav Kysela
    Tested-by: Pavel Hofman
    Cc:
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

28 Jan, 2015

3 commits

  • We need hold lock each time updating shirm registers, otherwise,
    we may set unexpected values to them when they are set in
    different thread at different time sequence.

    The notification work will be scheduled in global work queue,
    which won't hold this sst->spinlock itself, so here we need
    change to use the lock version to update shim registers.

    Signed-off-by: Jie Yang
    Signed-off-by: Mark Brown

    Jie Yang
     
  • The I2C init path forgot to init the mutex, leading to an oops when
    controls are accessed.

    Signed-off-by: Manuel Lauss
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Manuel Lauss
     
  • According to the I2S specification information as following:
    - WS = 0, channel 1 (left)
    - WS = 1, channel 2 (right)
    So, the start event should be TF/RF falling edge.

    Reported-by: Songjun Wu
    Signed-off-by: Bo Shen
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Bo Shen
     

27 Jan, 2015

3 commits

  • Asus T100TAF uses ACPI ID "10EC5642" for its audio codec. I suppose it is
    updated ACPI ID for the RT5642 codec since some earlier platforms are using
    "10EC5640" with the RT5642 too.

    Signed-off-by: Jarkko Nikula
    Signed-off-by: Mark Brown

    Jarkko Nikula
     
  • The wm97xx touchscreen driver binds itself to the snd_ac97 device that gets
    registered by the CODEC driver and expects that the device has already been
    reset. Before commit 6794f709b712 ("ASoC: ac97: Drop delayed device
    registration") the device was only registered after the probe function of
    the CODEC driver had finished running, but starting with the mentioned
    commit the device is registered as soon as snd_soc_new_ac97_codec() is
    called. This causes the touchscreen driver to no longer work. Modify the
    CODEC drivers to use snd_soc_alloc_ac97_codec() instead of
    snd_soc_new_ac97_codec() and make sure that the AC'97 device is reset before
    the snd_ac97 device gets registered.

    Fixes: 6794f709b712 ("ASoC: ac97: Drop delayed device registration")
    Reported-by: Manuel Lauss
    Signed-off-by: Lars-Peter Clausen
    Tested-by: Manuel Lauss
    Acked-by: Charles Keepax
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Lars-Peter Clausen
     
  • In some cases it is necessary to before additional operations after the
    device has been initialized and before the device is registered. This can
    for example be resetting the device.

    This patch introduces a new function snd_soc_alloc_ac97_codec() which is
    similar to snd_soc_new_ac97_codec() except that it does not register the
    device. Any users of snd_soc_alloc_ac97_codec() are responsible for calling
    device_add() manually.

    Fixes: 6794f709b712 ("ASoC: ac97: Drop delayed device registration")
    Reported-by: Manuel Lauss
    Signed-off-by: Lars-Peter Clausen
    Tested-by: Manuel Lauss
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Lars-Peter Clausen
     

26 Jan, 2015

5 commits


18 Jan, 2015

1 commit


17 Jan, 2015

2 commits

  • Do no send MIDI bytes at the full rate at which FireWire packets happen
    to be sent, but restrict them to the actual rate of a real MIDI port.
    This is required by the specification, and prevents data loss when the
    device's buffer overruns.

    Signed-off-by: Clemens Ladisch
    Reviewed-by: Takashi Sakamoto
    Tested-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • There are several devices that expect to receive MIDI data only in the
    first eight data blocks of a packet. If the driver restricts the data
    rate to the allowed rate (as mandated by the specification, but not yet
    implemented by this driver), this happens naturally. Therefore, there
    is no reason to ever try to use more data packets with any device.

    Signed-off-by: Clemens Ladisch
    Reviewed-by: Takashi Sakamoto
    Tested-by: Takashi Sakamoto
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     

16 Jan, 2015

1 commit


15 Jan, 2015

5 commits

  • In soc_new_compress() when rtd->dai_link->dynamic is set, we create the pcm
    substreams with this call:

    ret = snd_pcm_new_internal(rtd->card->snd_card, new_name, num,
    1, 0, &be_pcm);

    which passes 0 as capture_count leading to

    be_pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream

    being NULL, hence when trying to set rtd a few lines below we get an oops.

    Fix by using rtd->dai_link->dpcm_playback and rtd->dai_link->dpcm_capture as
    playback_count and capture_count to snd_pcm_new_internal().

    Signed-off-by: Qais Yousef
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Qais Yousef
     
  • There is only one I2S I/F, AD/DA path must operate to the same
    format.

    Signed-off-by: Bard Liao
    Signed-off-by: Mark Brown

    Bard Liao
     
  • Correct the path name for mux to get rid of the following warning:

    --->8---
    wm8904 1-001a: Control not supported for path ADCL -> [Left] -> AIFOUTL
    wm8904 1-001a: ASoC: no dapm match for ADCL --> Left --> AIFOUTL
    wm8904 1-001a: ASoC: Failed to add route ADCL -> Left -> AIFOUTL
    wm8904 1-001a: Control not supported for path ADCR -> [Right] -> AIFOUTL
    wm8904 1-001a: ASoC: no dapm match for ADCR --> Right --> AIFOUTL
    wm8904 1-001a: ASoC: Failed to add route ADCR -> Right -> AIFOUTL
    wm8904 1-001a: Control not supported for path ADCL -> [Left] -> AIFOUTR
    wm8904 1-001a: ASoC: no dapm match for ADCL --> Left --> AIFOUTR
    wm8904 1-001a: ASoC: Failed to add route ADCL -> Left -> AIFOUTR
    wm8904 1-001a: Control not supported for path ADCR -> [Right] -> AIFOUTR
    wm8904 1-001a: ASoC: no dapm match for ADCR --> Right --> AIFOUTR
    wm8904 1-001a: ASoC: Failed to add route ADCR -> Right -> AIFOUTR
    wm8904 1-001a: Control not supported for path AIFINR -> [Right] -> DACL
    wm8904 1-001a: ASoC: no dapm match for AIFINR --> Right --> DACL
    wm8904 1-001a: ASoC: Failed to add route AIFINR -> Right -> DACL
    wm8904 1-001a: Control not supported for path AIFINL -> [Left] -> DACL
    wm8904 1-001a: ASoC: no dapm match for AIFINL --> Left --> DACL
    wm8904 1-001a: ASoC: Failed to add route AIFINL -> Left -> DACL
    wm8904 1-001a: Control not supported for path AIFINR -> [Right] -> DACR
    wm8904 1-001a: ASoC: no dapm match for AIFINR --> Right --> DACR
    wm8904 1-001a: ASoC: Failed to add route AIFINR -> Right -> DACR
    wm8904 1-001a: Control not supported for path AIFINL -> [Left] -> DACR
    wm8904 1-001a: ASoC: no dapm match for AIFINL --> Left --> DACR
    wm8904 1-001a: ASoC: Failed to add route AIFINL -> Left -> DACR
    ---8
    Acked-by: Charles Keepax
    Signed-off-by: Mark Brown

    Bo Shen
     
  • If asoc_simple_card_probe() fails, asoc_simple_card_unref() may be
    called before dev_set_drvdata(), causing a NULL pointer dereference in
    asoc_simple_card_unref():

    Unable to handle kernel NULL pointer dereference at virtual address 000000d4
    ...
    PC is at asoc_simple_card_unref+0x14/0x48
    LR is at asoc_simple_card_probe+0x3d4/0x40c

    This typically happens because asoc_simple_card_parse_of() returns
    -EPROBE_DEFER, but other failure modes are possible.
    devm_snd_soc_register_card()/snd_soc_register_card() may fail either
    before or after dev_set_drvdata().

    Pass a snd_soc_card pointer instead of a platform_device pointer to
    asoc_simple_card_unref() to fix this.

    Note that if CONFIG_OF_DYNAMIC=n, of_node_put() is a dummy, and gcc may
    optimize away the loop over card->dai_link, never actually dereferencing
    card, and thus avoiding the crash...

    Signed-off-by: Geert Uytterhoeven
    Fixes: e512e001dafa54e5 ("ASoC: simple-card: Fix the reference count of device nodes")
    Signed-off-by: Mark Brown
    Cc: stable@vger.kernel.org

    Geert Uytterhoeven
     
  • The following crash happens when trying to unload the snd_soc_imx_wm8962 module
    while playback is active:

    [ 208.666868] Unable to handle kernel paging request at virtc
    [ 208.674110] pgd = 80004000
    [ 208.676867] [7f06541c] *pgd=4c334811, *pte=00000000, *ppte=00000000
    [ 208.683211] Internal error: Oops: 80000007 [#1] SMP ARM
    [ 208.688445] Modules linked in: snd_soc_wm8962 snd_soc_fsl_ssi snd_soc_imx_audmux imx_pcm_fiq evbug]
    ...

    In order to avoid such problem, fill the card owner field as suggested by
    Lars-Peter Clausen:

    "But looking at the source it seems that this is a core feature of ALSA and at
    least for the card module itself it will do the ref-counting when a stream is
    started/stopped. And we even support setting the owner of a card in ASoC.
    It's just that pretty much no ASoC card driver bothers to set the owner field
    in the snd_soc_card struct. So this particular problem can be fixed by updating
    the imx-wm8962 driver to set the owner field."

    By doing as suggested, we no longer see the crash when attempting to unload the
    snd_soc_imx_wm8962 module while playback is active:

    $ modprobe -r snd_soc_imx_wm8962
    modprobe: can't unload module snd_soc_imx_wm8962: Resource temporarily
    unavailable

    Reported-by: Jiada Wang
    Suggested-by: Lars-Peter Clausen
    Signed-off-by: Fabio Estevam
    Signed-off-by: Mark Brown

    Fabio Estevam
     

10 Jan, 2015

2 commits


09 Jan, 2015

1 commit

  • Commit 2ffa531078037a0 ("ASoC: fsl_ssi: Fix module unbound") changed the way to
    retrieve the irq number from irq_of_parse_and_map() to platform_get_irq(), but
    missed to updated the irq error check accordingly.

    We should test for negative irq number and propagate it in the case of error.

    Signed-off-by: Fabio Estevam
    Signed-off-by: Mark Brown

    Fabio Estevam
     

08 Jan, 2015

2 commits