Skip to content
Snippets Groups Projects
  1. Sep 20, 2018
  2. Sep 12, 2018
    • Yu Zhao's avatar
      sound: don't call skl_init_chip() to reset intel skl soc · 75383f8d
      Yu Zhao authored
      
      Internally, skl_init_chip() calls snd_hdac_bus_init_chip() which
      1) sets bus->chip_init to prevent multiple entrances before device
      is stopped; 2) enables interrupt.
      
      We shouldn't use it for the purpose of resetting device only because
      1) when we really want to initialize device, we won't be able to do
      so; 2) we are ready to handle interrupt yet, and kernel crashes when
      interrupt comes in.
      
      Rename azx_reset() to snd_hdac_bus_reset_link(), and use it to reset
      device properly.
      
      Fixes: 60767abc ("ASoC: Intel: Skylake: Reset the controller in probe")
      Reviewed-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarYu Zhao <yuzhao@google.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Unverified
      75383f8d
    • Srinivas Kandagatla's avatar
      ASoC: core: add support to card rebind · e894efef
      Srinivas Kandagatla authored
      
      Current behaviour of ASoC core w.r.t to component removal is that it
      unregisters dependent sound card totally. There is no support to
      rebind the card if the component comes back.
      Typical use case is DSP restart or kernel modules itself.
      
      With this patch, core now maintains list of cards that are unbind due to
      any of its depended components are removed and card not unregistered yet.
      This list is cleared when the card is rebind successfully or when the
      card is unregistered from machine driver.
      
      This list of unbind cards are tried to bind once again after every new
      component is successfully added, giving a fair chance for card bind
      to be successful.
      
      Signed-off-by: default avatarSrinivas Kandagatla <srinivas.kandagatla@linaro.org>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Unverified
      e894efef
  3. Sep 11, 2018
  4. Sep 05, 2018
  5. Sep 04, 2018
  6. Aug 31, 2018
    • Kuninori Morimoto's avatar
      ASoC: simple-card-util: support snd_soc_dai_link_component style for platform · 868cdb46
      Kuninori Morimoto authored
      
      Current ASoC is supporting snd_soc_dai_link_component for binding,
      it is more useful than current legacy style.
      Currently only codec is supporting it as multicodec (= codecs).
      CPU will support multi style in the future.
      We want to have it on Platform too in the future.
      
      If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component
      style, we can remove legacy complex style.
      This patch supports snd_soc_dai_link_component style
      for simple-card-util for platform.
      
      [current]
      struct snd_soc_dai_link {
      	...
      	*cpu_name;
      	*cpu_of_node;
      	*cpu_dai_name;
      
      	*codec_name;
      	*codec_of_node;
      	*codec_dai_name;
      	*codecs;
      	num_codecs;
      
      	*platform_name;
      	*platform_of_node;
      	...
      }
      
      [in the future]
      struct snd_soc_dai_link {
      	...
      	*cpus
      	num_cpus;
      
      	*codecs;
      	num_codecs;
      
      	*platform;
      	...
      }
      
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Unverified
      868cdb46
    • Kuninori Morimoto's avatar
      ASoC: soc-core: use snd_soc_dai_link_component for platform · daecf46e
      Kuninori Morimoto authored
      
      Current struct snd_soc_dai_link is supporting multicodec,
      and it is supporting legacy style of
      	codec_name
      	codec_of_node
      	code_dai_name
      This is handled as single entry of multicodec.
      
      We don't have multicpu support yet, but in the future we will.
      In such case, we can use snd_soc_dai_link_component for both
      cpu/codec. Then the code will be more simple and readble.
      
      As next step, we want to use it for platform, too.
      This patch adds snd_soc_dai_link_component style for platform.
      We might have multiplatform support in the future, but we
      don't know yet. To avoid un-known issue / complex code,
      this patch supports just single-platform as 1st step.
      
      If we could use snd_soc_dai_link_component for all CPU/Codec/Platform,
      we will switch to new style, and remove legacy code.
      This is prepare for it.
      
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Unverified
      daecf46e
    • Kuninori Morimoto's avatar
      ASoC: simple_card_utils: support snd_soc_dai_link_component style for codec · e664de68
      Kuninori Morimoto authored
      
      Current ASoC is supporting snd_soc_dai_link_component for binding,
      it is more useful than current legacy style.
      Currently only codec is supporting it as multicodec (= codecs).
      CPU will support multi style in the future.
      We want to have it on Platform too in the future.
      
      If all Codec/CPU/Platform are replaced into snd_soc_dai_link_component
      style, we can remove legacy complex style.
      This patch supports snd_soc_dai_link_component style
      for simple_card_utils for codec.
      
      [current]
      struct snd_soc_dai_link {
      	...
      	*cpu_name;
      	*cpu_of_node;
      	*cpu_dai_name;
      
      	*codec_name;
      	*codec_of_node;
      	*codec_dai_name;
      	*codecs;
      	num_codecs;
      
      	*platform_name;
      	*platform_of_node;
      	...
      }
      
      [in the future]
      struct snd_soc_dai_link {
      	...
      	*cpus
      	num_cpus;
      
      	*codecs;
      	num_codecs;
      
      	*platform;
      	...
      }
      
      Signed-off-by: default avatarKuninori Morimoto <kuninori.morimoto.gx@renesas.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Unverified
      e664de68
  7. Aug 30, 2018
  8. Aug 28, 2018
  9. Aug 15, 2018
  10. Aug 02, 2018
  11. Aug 01, 2018
    • Takashi Iwai's avatar
      ALSA: seq: Minor cleanup of MIDI event parser helpers · ef965ad5
      Takashi Iwai authored
      
      snd_midi_event_encode_byte() can never fail, and it can return rather
      true/false.  Change the return type to bool, adjust the argument to
      receive a MIDI byte as unsigned char, and adjust the comment
      accordingly.  This allows callers to drop error checks, which
      simplifies the code.
      
      Meanwhile, snd_midi_event_encode() helper is used only in seq_midi.c,
      and it can be better folded into it.  This will reduce the total
      amount of lines in the end.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      ef965ad5
  12. Jul 30, 2018
    • Takashi Iwai's avatar
      ALSA: seq: virmidi: Use READ_ONCE/WRITE_ONCE() macros · 89b4ab21
      Takashi Iwai authored
      
      The trigger flag in vmidi object can be referred in different contexts
      concurrently, hence it's better to be put with READ_ONCE() and
      WRITE_ONCE() macros to assure the accesses.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      89b4ab21
    • Takashi Iwai's avatar
      ALSA: seq: virmidi: Offload the output event processing · f7debfe5
      Takashi Iwai authored
      
      The virmidi sequencer stuff tries to translate the rawmidi bytes to
      sequencer events and deliver the packets at trigger callback.  The
      amount of the whole process of these translations and deliveries
      depends on the incoming rawmidi bytes, and we have no limit for that;
      this was the cause of a CPU soft lockup that had been reported and
      fixed recently.
      
      Although we've fixed the soft lockup by putting the temporary unlock
      and cond_resched(), it's rather a quick band aid.  In this patch,
      meanwhile, the event parsing and delivery process is offloaded to a
      dedicated work, and the trigger callback just kicks it off.  It has
      three merits, at least:
      
      - The processing is always done in a sleepable context, which can
        assure the event delivery with non-atomic flag without hackish
        is_atomic() usage.
      
      - Other relevant codes can be simplified, reducing the lines
      
      - It makes me happier
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      f7debfe5
    • Takashi Iwai's avatar
      ALSA: memalloc: Fix missing PAGE_SIZE definition · 345a9ca3
      Takashi Iwai authored
      
      The recent fix moved the inline snd_sgbuf_aligned_pages() outside the
      ifdef, and this triggered a build error on some architectures due to
      the undefined PAGE_SIZE, as spotted by 0day bot.
      Fix it by adding the missing header inclusion.
      
      Fixes: 4cae99d9 ("ALSA: memalloc: declare snd_sgbuf_aligned_pages() unconditionally")
      Reported-by: default avatarkbuild test robot <lkp@intel.com>
      Cc: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Unverified
      345a9ca3
  13. Jul 27, 2018
    • Takashi Iwai's avatar
      ALSA: sb: Fix sparse warning wrt PCM format type · e5d3765b
      Takashi Iwai authored
      
      The PCM format type is with __bitwise, and it can't be converted from
      integer implicitly.  Instead of an ugly cast, declare the function
      argument of snd_sb_csp_autoload() with the proper snd_pcm_format_t
      type.
      
      This fixes the sparse warnings like:
        sound/isa/sb/sb16_csp.c:743:22: warning: restricted snd_pcm_format_t degrades to integer
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      e5d3765b
    • Takashi Iwai's avatar
      ALSA: hda: Fix implicit PCM format type conversion · a6ea5fe9
      Takashi Iwai authored
      
      The PCM format type is defined with __bitwise, hence it can't be
      passed as integer but needs an explicit cast.  In this patch, instead
      of the messy cast flood, define the format argument of
      snd_hdac_calc_stream_format() to be the proper snd_pcm_format_t type.
      
      This fixes sparse warnings like:
        sound/hda/hdac_device.c:760:38: warning: incorrect type in argument 1 (different base types)
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a6ea5fe9
  14. Jul 26, 2018
  15. Jul 24, 2018
  16. Jul 20, 2018
  17. Jul 18, 2018
  18. Jul 17, 2018
    • Takashi Iwai's avatar
      ALSA: hda: Make audio component support more generic · a57942bf
      Takashi Iwai authored
      
      This is the final step for more generic support of DRM audio
      component.  The generic audio component code is now moved to its own
      file, and the symbols are renamed from snd_hac_i915_* to
      snd_hdac_acomp_*, respectively.  The generic code is enabled via the
      new kconfig, CONFIG_SND_HDA_COMPONENT, while CONFIG_SND_HDA_I915 is
      kept as the super-class.
      
      Along with the split, three new callbacks are added to audio_ops:
      pin2port is for providing the conversion between the pin number and
      the widget id, and master_bind/master_unbin are called at binding /
      unbinding the master component, respectively.  All these are optional,
      but used in i915 implementation and also other later implementations.
      
      A note about the new snd_hdac_acomp_init() function: there is a slight
      difference between this and the old snd_hdac_i915_init().  The latter
      (still) synchronizes with the master component binding, i.e. it
      assures that the relevant DRM component gets bound when it returns, or
      gives a negative error.  Meanwhile the new function doesn't
      synchronize but just leaves as is.  It's the responsibility by the
      caller's side to synchronize, or the caller may accept the
      asynchronous binding on the fly.
      
      v1->v2: Fix missing NULL check in master_bind/unbind
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      a57942bf
    • Takashi Iwai's avatar
      ALSA: hda/i915: Associate audio component with devres · 82887c0b
      Takashi Iwai authored
      
      The HD-audio i915 binding code contains a single pointer, hdac_acomp,
      for allowing the access to audio component from the master bind/unbind
      callbacks.  This was needed because the callbacks pass only the device
      pointer and we can't guarantee the object type assigned to the drvdata
      (which is free for each controller driver implementation).
      And this implementation will be a problem if we support multiple
      components for different DRM drivers, not only i915.
      
      As a solution, allocate the audio component object via devres and
      associate it with the given device, so that the component callbacks
      can refer to it via devres_find().
      
      The removal of the object is still done half-manually via
      devres_destroy() to make the code consistent (although it may work
      without the explicit call).
      
      Also, the snd_hda_i915_register_notifier() had the reference to
      hdac_acomp as well.  In this patch, the corresponding code is removed
      by passing hdac_bus object to the function, too.
      
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      82887c0b
    • Takashi Iwai's avatar
      drm/i915: Split audio component to a generic type · ae891abe
      Takashi Iwai authored
      
      For allowing other drivers to use the DRM audio component, rename the
      i915_audio_component_* with drm_audio_component_*, and split the
      generic part into drm_audio_component.h.  The i915 specific stuff
      remains in struct i915_audio_component, which contains
      drm_audio_component as the base.
      
      The license of drm_audio_component.h is kept to MIT as same as the the
      original i915_component.h.
      
      This is a preliminary change for further development, and no
      functional changes by this patch itself, merely code-split and
      renames.
      
      v1->v2: Use SPDX for drm_audio_component.h, fix remaining i915
              argument in drm_audio_component.h
      
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
      ae891abe
  19. Jul 11, 2018
  20. Jul 06, 2018
  21. Jul 03, 2018
    • Liam Girdwood's avatar
      ASoC: core: Allow topology to override machine driver FE DAI link config. · a655de80
      Liam Girdwood authored
      
      Machine drivers statically define a number of DAI links that currently
      cannot be changed or removed by topology. This means PCMs and platform
      components cannot be changed by topology at runtime AND machine drivers
      are tightly coupled to topology.
      
      This patch allows topology to override the machine driver DAI link config
      in order to reuse machine drivers with different topologies and platform
      components. The patch supports :-
      
      1) create new FE PCMs with a topology defined PCM ID.
      2) destroy existing static FE PCMs
      3) change the platform component driver.
      4) assign any new HW params fixups.
      5) assign a new card name prefix to differentiate this topology to userspace.
      
      The patch requires no changes to the machine drivers, but does add some
      platform component flags that the platform component driver can assign
      before loading topologies.
      
      Signed-off-by: default avatarLiam Girdwood <liam.r.girdwood@linux.intel.com>
      Signed-off-by: default avatarMark Brown <broonie@kernel.org>
      Unverified
      a655de80
  22. Jul 02, 2018
Loading