1. 04 Sep, 2017 1 commit
  2. 03 Sep, 2017 1 commit
    • Wang YanQing's avatar
      ALSA: hda: Fix regression of hdmi eld control created based on invalid pcm · 1f7f51a6
      Wang YanQing authored
      Commit fb087eaa ("ALSA: hda - hdmi eld control created based on pcm")
      forget to filter out invalid pcm numbers, if there is only one invalid pcm
      number, then this issue causes we create eld control for invalid pcm silently,
      but when there are more than one invalid pcm numbers, then this issue bring
      probe error looks like below dmesg:
      "
      kernel: [    1.647283] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops 0xc2967540)
      kernel: [    1.651192] snd_hda_intel 0000:00:03.0: Too many HDMI devices
      kernel: [    1.651195] snd_hda_intel 0000:00:03.0: Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y
      kernel: [    1.651197] snd_hda_intel 0000:00:03.0: Too many HDMI devices
      kernel: [    1.651199] snd_hda_intel 0000:00:03.0: Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y
      kernel: [    1.651201] snd_hda_intel 0000:00:03.0: Too many HDMI devices
      kernel: [    1.651203] snd_hda_intel 0000:00:03.0: Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y
      kernel: [    1.651676] snd_hda_intel 0000:00:03.0: control 3:0:0:ELD:0 is already present
      kernel: [    1.651787] snd_hda_codec_hdmi: probe of hdaudioC0D0 failed with error -16
      "
      
      This patch add invalid pcm number filter before calling hdmi_create_eld_ctl.
      
      Fixes: fb087eaa ("ALSA: hda - hdmi eld control created based on pcm")
      Signed-off-by: default avatarWang YanQing <udknight@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      1f7f51a6
  3. 31 Aug, 2017 9 commits
  4. 30 Aug, 2017 5 commits
    • Takashi Iwai's avatar
      ALSA: pcm: Unify ioctl functions for playback and capture streams · 67616fed
      Takashi Iwai authored
      Some ioctl functions are implemented individually for both playback
      and capture streams although most of the codes are identical with just
      a few different stream-specific function calls.  This patch unifies
      these places, removes the superfluous trivial check and flattens the
      call paths as a cleanup.  Meanwhile, for better readability, some
      codes (e.g. xfer ioctls or forward/rewind ioctls) are factored out as
      functions.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      67616fed
    • Takashi Iwai's avatar
      ALSA: Get rid of card power_lock · 7d8e8292
      Takashi Iwai authored
      Currently we're taking power_lock at each card component for assuring
      the power-up sequence, but it doesn't help anything in the
      implementation at the moment: it just serializes unnecessarily the
      callers, but it doesn't protect about the power state change itself.
      It used to have some usefulness in the early days where we managed the
      PM manually.  But now the suspend/resume core procedure is beyond our
      hands, and power_lock lost its meaning.
      
      This patch drops the power_lock from allover the places.
      There shouldn't be any issues by this change, as it's no helper
      regarding the power state change.  Rather we'll get better performance
      by removing the serialization; which is the only slight concern of any
      behavior change, but it can't be a showstopper, after all.
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      7d8e8292
    • Lucas Stach's avatar
      ASoC: simple_card_utils: fix fallback when "label" property isn't present · 1b4a56cd
      Lucas Stach authored
      snd_soc_of_parse_card_name() doesn't return an error if the requested
      property isn't present, but silently fails to fill the card name. This can
      not be changed, as it is a backwards compatibility measure itself.
      
      We can not rely on the return value of this function alone, but must check
      if the card name has been filled sucessfully when deciding to skip the
      fallback path, which is in place for existing users.
      
      Fixes: dedfaa1e (ASoC: simple-card-utils: enable "label" on
                           asoc_simple_card_parse_card_name)
      Signed-off-by: default avatarLucas Stach <l.stach@pengutronix.de>
      Acked-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      1b4a56cd
    • Takashi Iwai's avatar
      Merge branch 'for-linus' into for-next · 3454a476
      Takashi Iwai authored
      3454a476
    • Takashi Iwai's avatar
      ALSA: pcm: Fix power lock unbalance via OSS emulation · bcab3a6e
      Takashi Iwai authored
      PCM OSS emulation issues the drain ioctl without power lock.  It used
      to work in the earlier kernels as the power lock was taken inside
      snd_pcm_drain() itself.  But since 68b4acd3 ("ALSA: pcm: Apply
      power lock globally to common ioctls"), the power lock is taken
      outside the function.  Due to that change, the call via OSS emulation
      leads to the unbalanced power lock, thus it deadlocks.
      
      As a quick fix, just take the power lock before snd_pcm_drain() call
      for OSS emulation path.  A better cleanup will follow later.
      
      Fixes: 68b4acd3 ("ALSA: pcm: Apply power lock globally to common ioctls")
      Reported-and-tested-by: default avatarMarkus Trippelsdorf <markus@trippelsdorf.de>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      bcab3a6e
  5. 29 Aug, 2017 1 commit
  6. 24 Aug, 2017 6 commits
    • Takashi Iwai's avatar
      ALSA: pcm: Correct broken procfs set up · e6b4c525
      Takashi Iwai authored
      The commit c8da9be4 ("ALSA: pcm: Adjust nine function calls
      together with a variable assignment") contained a badly incorrect
      conversion, a "status" PCM procfs creation was replaced with the next
      one.  Luckily, this could be spotted easily by the kernel runtime
      warning.
      
      Fixes: c8da9be4 ("ALSA: pcm: Adjust nine function calls together...")
      Reported-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
      Tested-by: default avatarFabio Estevam <fabio.estevam@nxp.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e6b4c525
    • Tom Rini's avatar
      ASoC: rt5677: Reintroduce I2C device IDs · 9ce76511
      Tom Rini authored
      Not all devices with ACPI and this combination of sound devices will
      have the required information provided via ACPI.  Reintroduce the I2C
      device ID to restore sound functionality on on the Chromebook 'Samus'
      model.
      
      [ More background note:
       the commit a36afb0a ("ASoC: rt5677: Introduce proper table...")
       moved the i2c ID probed via ACPI ("RT5677CE:00") to a proper
       acpi_device_id table.  Although the action itself is correct per se,
       the overseen issue is the reference id->driver_data at
       rt5677_i2c_probe() for retrieving the corresponding chip model for
       the given id.  Since id=NULL is passed for ACPI matching case, we get
       an Oops now.
      
       We already have queued more fixes for 4.14 and they already address
       the issue, but they are bigger changes that aren't preferable for the
       late 4.13-rc stage.  So, this patch just papers over the bug as a
       once-off quick fix for a particular ACPI matching.  -- tiwai ]
      
      Fixes: a36afb0a ("ASoC: rt5677: Introduce proper table for ACPI enumeration")
      Signed-off-by: default avatarTom Rini <trini@konsulko.com>
      Acked-by: default avatarMark Brown <broonie@kernel.org>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      9ce76511
    • Takashi Sakamoto's avatar
      ALSA: control: TLV data is unavailable at initial state of user-defined element set · b8e2204b
      Takashi Sakamoto authored
      For user-defined element set, in its initial state, TLV data is not
      registered. It's firstly available when any application register it by
      an additional operation. However, in current implementation, it's available
      in its initial state. As a result, applications get -ENXIO to read it.
      
      This commit controls its readability to manage info flags properly. In an
      initial state, elements don't have SND_CTL_ELEM_ACCESS_TLV_READ flag. Once
      TLV write operation is executed, they get the flag.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      b8e2204b
    • Takashi Sakamoto's avatar
      ALSA: control: queue TLV event for a set of user-defined element · da428828
      Takashi Sakamoto authored
      In a design of user-defined element set, applications allow to change TLV
      data on the set. This operation doesn't only affects to a target element,
      but also to elements in the set.
      
      This commit generates TLV event for all of elements in the set when the TLV
      data is changed.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      da428828
    • Takashi Sakamoto's avatar
      ALSA: control: delegate TLV eventing to each driver · fb8027eb
      Takashi Sakamoto authored
      In a design of ALSA control core, a set of elements is represented by
      'struct snd_kcontrol' to share common attributes. The set of elements
      shares TLV (Type-Length-Value) data, too.
      
      On the other hand, in ALSA control interface/protocol for applications,
      a TLV operation is committed to an element. Totally, the operation can
      have sub-effect to the other elements in the set. For example, TLV_WRITE
      operation is expected to change TLV data, which returns to applications.
      Applications attempt to change the TLV data per element, but in the above
      design, they can effect to elements in the same set.
      
      As a default, ALSA control core has no implementation except for TLV_READ
      operation. Thus, the above design looks to have no issue. However, in
      kernel APIs of ALSA control component, developers can program a handler
      for any request of the TLV operation. Therefore, for elements in a set
      which has the handler, applications can commit TLV_WRITE and TLV_COMMAND
      requests.
      
      For the above scenario, ALSA control core assist notification. When the
      handler returns positive value, the core queueing an event for a requested
      element. However, this includes design defects that the event is not
      queued for the other element in a set. Actually, developers can program
      the handlers to keep per-element TLV data, but it depends on each driver.
      
      As of v4.13-rc6, there's no driver in tree to utilize the notification,
      except for user-defined element set. This commit delegates the notification
      into each driver to prevent developers from the design defects.
      Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      fb8027eb
    • Arvind Yadav's avatar
      ALSA: nm256: constify snd_ac97_res_table · 5d3806ee
      Arvind Yadav authored
      snd_ac97_res_table are not supposed to change at runtime. All functions
      working with snd_ac97_res_table provided by <sound/ac97_codec.h> work with
      const snd_ac97_res_table. So mark the non-const structs as const.
      Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      5d3806ee
  7. 23 Aug, 2017 12 commits
  8. 22 Aug, 2017 5 commits