1. 08 5月, 2015 1 次提交
  2. 07 5月, 2015 4 次提交
    • L
      ASoC: dapm: Add demux support · d714f97c
      Lars-Peter Clausen 提交于
      A demux is conceptually similar to a mux. Where a mux has multiple input
      and one output and selects one of the inputs to be connected to the output,
      the demux has one input and multiple outputs and selects one of the outputs
      to which the input gets connected.
      
      This similarity makes it straight forward to support them in DAPM using the
      existing mux support, we only need to swap sinks and sources when initially
      setting up the paths.
      
      The only slightly tricky part is that there can only be one control per
      path. Since mixers/muxes are at the sink of a path and a demux is at the
      source and both types want a control it is not possible to directly connect
      a demux output to a mixer/mux input. The patch adds some sanity checks to
      make sure that this does not happen.
      
      Drivers who want to model hardware which directly connects a demux output
      to a mixer/mux input can do this by inserting a dummy widget between the
      two. E.g.:
      
      	{ "Dummy", "Demux Control", "Demux" },
      	{ "Mixer", "Mixer Control", "Dummy" },
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      d714f97c
    • L
      ASoC: dapm: Add new widgets to the end of the widget list · 92fa1242
      Lars-Peter Clausen 提交于
      Currently new widgets are appended to the beginning of the cards widget
      list. This has the effect that widgets that are created while iterating
      over the widget list in snd_soc_dapm_new_widgets() (like e.g. the
      auto-disable widgets) are not covered during that invocation of the
      function. If no further invocations of snd_soc_dapm_new_widgets() happen
      these widgets will not be fully initialized and e.g. no debugfs entries are
      created for them.
      
      By adding new widgets to the end of the widget list we make sure that
      widgets that are created in snd_soc_dapm_new_widgets() will still be
      handled during the same snd_soc_dapm_new_widgets() invocation and are
      always fully initialized.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      92fa1242
    • C
      ASoC: dapm: Add support for autodisable mux controls · 561ed680
      Charles Keepax 提交于
      Commit 57295073 ("ASoC: dapm: Implement mixer input auto-disable")
      added support for autodisable controls, controls whose values are only
      written to the hardware when their respective widgets are powered up.
      But it only added support for controls based on the mixer abstraction.
      
      This patch add support for mux controls (DAPM controls based on the
      enum abstraction) to be auto-disabled as well. As each mux can only have
      a single control, there is no need to tie the autodisable widget to the
      inputs (as is done for the mixer controls) it can be tided directly to
      the mux widget itself.
      
      Note that it is assumed that the first entry in a autodisable mux
      control will always represent the off state for the mux and is what the
      mux will be set to whilst it is disabled.
      Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Reviewed-by: NLars-Peter Clausen <lars@metafoo.de>
      Tested-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      561ed680
    • C
      ASoC: dapm: Append "Autodisable" to autodisable widget names · 773da9b3
      Charles Keepax 提交于
      This makes it a little easier to follow what is happening in debugfs.
      Additionally is also useful in facilitating work to add autodisable
      muxes because the control name is already used for the mux widget and
      thus shouldn't be reused for the autodisable widget.
      Signed-off-by: NCharles Keepax <ckeepax@opensource.wolfsonmicro.com>
      Reviewed-by: NLars-Peter Clausen <lars@metafoo.de>
      Tested-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      773da9b3
  3. 04 5月, 2015 1 次提交
  4. 01 5月, 2015 2 次提交
  5. 28 4月, 2015 3 次提交
  6. 24 4月, 2015 1 次提交
  7. 23 4月, 2015 1 次提交
  8. 21 4月, 2015 3 次提交
    • D
      ALSA: hda - fix "num_steps = 0" error on ALC256 · 7d1b6e29
      David Henningsson 提交于
      The ALC256 does not have a mixer nid at 0x0b, and there's no
      loopback path (the output pins are directly connected to the DACs).
      
      This commit fixes an "num_steps = 0 for NID=0xb (ctl = Beep Playback Volume)"
      error (and as a result, problems with amixer/alsamixer).
      
      If there's pcbeep functionality, it certainly isn't controlled by setting an
      amp on 0x0b, so disable beep functionality (at least for now).
      
      Cc: stable@vger.kernel.org
      BugLink: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1446517Signed-off-by: NDavid Henningsson <david.henningsson@canonical.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      7d1b6e29
    • T
      ALSA: usb-audio: Fix audio output on Roland SC-D70 sound module · 6d1f2f60
      Takamichi Horikawa 提交于
      Roland SC-D70 reports its device class as vendor specific class and
      the quirk QUIRK_AUDIO_FIXED_ENDPOINT was used for audio output.
      
      In the quirks table the sampling rate was hard-coded to 44100 Hz
      and therefore not worked when the sound module was in 48000 Hz mode.
      
      In this change the quirk is changed to QUIRK_AUDIO_STANDARD_INTERFACE
      but as the sound module reports incorrect bSubframeSize in its
      descriptors, additional change is made in format.c to detect it and
      to override it (which uses the existing code for Edirol SD-90).
      
      Tested both when the sound module was in 44100 Hz mode and 48000 Hz
      mode and both audio input and output. MIDI related part of the driver
      is not touched.
      Signed-off-by: NTakamichi Horikawa <takamichiho@gmail.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      6d1f2f60
    • M
      ALSA: hda - add AZX_DCAPS_I915_POWERWELL to Baytrail · 40cc2392
      Mengdong Lin 提交于
      This patch addes AZX_DCAPS_I915_POWERWELL to BYT (Baytrail).
      
      Like Braswell and Skylake, the HDMI codec on Bytrail is also in the shared
      power well with GPU. This power well must be turned on before we reset link
      to probe the codec, to avoid communication failure with the codec.
      
      The side effect is that this power is always ON in S0 because the BYT HDMI
      codec does not support EPSS or D3ClkStop and so the controller doesn't enter
      D3 at runtime, and the HDMI codec and analog codec share a single physical
      HD-A link and so we cannot reset the HD-A link freely when we re-enable the
      power to use the HDMI codec.
      
      Next step is to test if an AGP reset or double AGP reset on BYT HDMI codec is
      okay to bring the HDMI codec back to a functional state after restoring the
      power. If okay, we can bind the power on/off with the HDMI codec PM without
      interrupting the analog audio.
      Signed-off-by: NMengdong Lin <mengdong.lin@intel.com>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      40cc2392
  9. 20 4月, 2015 2 次提交
  10. 18 4月, 2015 1 次提交
    • A
      sound/oss: fix deadlock in sequencer_ioctl(SNDCTL_SEQ_OUTOFBAND) · bc26d4d0
      Alexey Khoroshilov 提交于
      A deadlock can be initiated by userspace via ioctl(SNDCTL_SEQ_OUTOFBAND)
      on /dev/sequencer with TMR_ECHO midi event.
      
      In this case the control flow is:
      sound_ioctl()
      -> case SND_DEV_SEQ:
         case SND_DEV_SEQ2:
           sequencer_ioctl()
           -> case SNDCTL_SEQ_OUTOFBAND:
                spin_lock_irqsave(&lock,flags);
                play_event();
                -> case EV_TIMING:
                     seq_timing_event()
                     -> case TMR_ECHO:
                          seq_copy_to_input()
                          -> spin_lock_irqsave(&lock,flags);
      
      It seems that spin_lock_irqsave() around play_event() is not necessary,
      because the only other call location in seq_startplay() makes the call
      without acquiring spinlock.
      
      So, the patch just removes spinlocks around play_event().
      By the way, it removes unreachable code in seq_timing_event(),
      since (seq_mode == SEQ_2) case is handled in the beginning.
      
      Compile tested only.
      
      Found by Linux Driver Verification project (linuxtesting.org).
      Signed-off-by: NAlexey Khoroshilov <khoroshilov@ispras.ru>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      bc26d4d0
  11. 17 4月, 2015 2 次提交
  12. 16 4月, 2015 3 次提交
  13. 14 4月, 2015 1 次提交
  14. 13 4月, 2015 5 次提交
    • J
      ALSA: hda/realtek - Enable the ALC292 dock fixup on the Thinkpad T450 · f2aa1110
      Jo-Philipp Wich 提交于
      The Lenovo Thinkpad T450 requires the ALC292_FIXUP_TPT440_DOCK as well in
      order to get working sound output on the docking stations headphone jack.
      
      Patch tested on a Thinkpad T450 (20BVCTO1WW) using kernel 4.0-rc7 in
      conjunction with a ThinkPad Ultradock.
      Signed-off-by: NJo-Philipp Wich <jow@openwrt.org>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      f2aa1110
    • T
      ALSA: hda - Fix another race in runtime PM refcounting · c3aeda62
      Takashi Iwai 提交于
      Although some races in runtime PM refcount was fixed by the commit
      [664c7155: ALSA: hda - Work around races of power up/down with
      runtime PM], there is still a race in the following case:
      
      CPU0:                   CPU1 :
      runtime suspend:
        codec->in_pm = 1
                              snd_hdac_power_up_pm():
                                pm_runtime_get_sync() skipped
      suspend finished:
        codec->in_pm = 0
                              snd_hdac_power_down_pm():
                                pm_runtime_put_*() is called!
      
      For avoiding this situation, increment in_pm flag atomically when it's
      non-zero, and decrement accordingly, to ensure that in_pm is set
      consistently for the whole concurrent operations.
      
      Also, since atomic_inc_not_zero() and atomic_dec_if_positive() are
      lengthy inline functions, move snd_hdac_power_up_pm() and _down_pm()
      to sound/hda/hdac_device.c as no inline functions.
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      c3aeda62
    • T
      ALSA: hda - Expose codec type sysfs · eacf6e0a
      Takashi Iwai 提交于
      The type field of HD-audio codec object should be exposed to
      user-space so that it can identify which driver type to bind (legacy /
      asoc).
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      eacf6e0a
    • T
      ALSA: ctl: fix to handle several elements added by one operation for userspace element · e1c78df1
      Takashi Sakamoto 提交于
      An element instance can have several elements with the same feature.
      Some userspace applications can add such an element instance by add
      operation with the number of elements. Then, the element instance
      gets a memory object to keep states of these elements.
      
      But the element instance has just one memory object for the elements.
      This causes the same result to each read/write operations to the
      different elements.
      
      This commit fixes this bug by allocating enough memory objects to the
      element instance for each of elements.
      Signed-off-by: NTakashi Sakamoto <o-takashi@sakamocchi.jp>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      e1c78df1
    • K
      ASoC: Intel: fix array_size.cocci warnings · a5e5e12b
      kbuild test robot 提交于
      sound/soc/intel/haswell/sst-haswell-ipc.c:646:28-29: WARNING: Use ARRAY_SIZE
      
       Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
      
      Semantic patch information:
       This makes an effort to find cases where ARRAY_SIZE can be used such as
       where there is a division of sizeof the array by the sizeof its first
       element or by any indexed element or the element type. It replaces the
       division of the two sizeofs by ARRAY_SIZE.
      
      Generated by: scripts/coccinelle/misc/array_size.cocci
      
      CC: Jie Yang <yang.jie@intel.com>
      Signed-off-by: NFengguang Wu <fengguang.wu@intel.com>
      Signed-off-by: NMark Brown <broonie@kernel.org>
      a5e5e12b
  15. 12 4月, 2015 10 次提交