Dominic Sacré [Tue, 30 Jun 2015 15:41:33 +0000 (17:41 +0200)]
ALSA: usb-audio: Add MIDI support for Steinberg MI2/MI4
The Steinberg MI2 and MI4 interfaces are compatible with the USB class
audio spec, but the MIDI part of the devices is reported as a vendor
specific interface.
This patch adds entries to quirks-table.h to recognize the MIDI
endpoints. Audio functionality was already working and is unaffected by
this change.
Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de> Signed-off-by: Albert Huitsing <albert@huitsing.nl> Acked-by: Clemens Ladisch <clemens@ladisch.de> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Colin Ian King [Mon, 29 Jun 2015 16:10:22 +0000 (17:10 +0100)]
ALSA: Fix uninintialized error return
Static analysis with cppcheck found the following error:
[sound/core/init.c:118]: (error) Uninitialized variable: err
..this was introduced by commit 2471b6c80a70e80de69f5ff4c37187c3912e5874
("ALSA: info: Register proc entries recursively, too") where the call
to snd_info_card_register was removed and no longer setting the error
return in err. When snd_info_create_card_entry fails to allocate a
an entry, the error path exits with garbage in err. Fix is to return
-ENOMEM if entry fails to be allocated.
Fixes: 2471b6c80a ("ALSA: info: Register proc entries recursively, too") Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Mon, 29 Jun 2015 06:38:02 +0000 (08:38 +0200)]
ALSA: hda - Fix the dock headphone output on Fujitsu Lifebook E780
Fujitsu Lifebook E780 sets the sequence number 0x0f to only only of
the two headphones, thus the driver tries to assign another as the
line-out, and this results in the inconsistent mapping between the
created jack ctl and the actual I/O. Due to this, PulseAudio doesn't
handle it properly and gets the silent output.
Takashi Iwai [Sat, 27 Jun 2015 08:21:13 +0000 (10:21 +0200)]
ALSA: hda - Add headset support to Acer Aspire V5
Acer Aspire V5 with ALC282 codec needs the similar quirk like Dell
laptops to support the headset mic. The headset mic pin is 0x19 and
it's not exposed by BIOS, thus we need to fix the pincfg as well.
Takashi Iwai [Fri, 26 Jun 2015 04:59:57 +0000 (06:59 +0200)]
ALSA: jack: Fix endless loop at unique index detection
While the commit [d0a601c278de: ALSA: jack: Fix the id uniqueness
check] fixes the wrong string check, it leads to a worse result -- the
loop in get_available_index() goes into an endless loop. The cause is
that snd_ctl_find_id() returns the object assigned to the numid if
it's set. Thus it points to the previous entry again.
This patch clears the numid field for the next call properly.
Reported-and-tested-by: Tomáš Pružina <pruzinat@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Alex Deucher [Wed, 24 Jun 2015 18:37:18 +0000 (14:37 -0400)]
ALSA: hda - set proper caps for newer AMD hda audio in KB/KV
Fixes audio problems on newer asics.
Noticed by: Kelly Anderson <kelly@xilka.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org Signed-off-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai [Thu, 25 Jun 2015 06:48:54 +0000 (08:48 +0200)]
ALSA: hda - Disable widget power-save for VIA codecs
The widget power-save that was enabled in 4.1 kernel seems resulting
in the silent output on VIA codecs by some reason. Some widgets get
wrong power states.
As a quick fix, turn this flag off while keeping power_down_unused
flag. This will bring back to the state of 4.0.x.
Fixes: 688b12cc3ca8 ('ALSA: hda - Use the new power control for VIA codecs') Reported-and-tested-by: Harald Dunkel <harri@afaics.de> Cc: <stable@vger.kernel.org> # v4.1 Signed-off-by: Takashi Iwai <tiwai@suse.de>
ALSA: hda - Fix Dock Headphone on Thinkpad X250 seen as a Line Out
Thinkpad X250, when attached to a dock, has two headphone outs but
no line out. Make sure we don't try to turn this into one headphone
and one line out (since that disables the headphone amp on the dock).
Takashi Iwai [Tue, 23 Jun 2015 09:56:22 +0000 (11:56 +0200)]
ALSA: pcm: Fix pcm_class sysfs output
The pcm_class sysfs of each PCM substream gives only "none" since the
recent code change to embed the struct device. Fix the code to point
directly to the embedded device object properly.
Mark Brown [Mon, 22 Jun 2015 10:19:39 +0000 (11:19 +0100)]
Merge tag 'asoc-v4.2-2' into asoc-next
ASoC: Further updates for v4.2
There's a bunch of additional updates and fixes that came in since my
orignal pull request here, including DT support for rt5645 and fairly
large serieses of cleanups and improvements to tas2552 and rcar.
# gpg: Signature made Mon 22 Jun 2015 10:24:48 BST using RSA key ID 5D5487D0
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg: aka "Mark Brown <broonie@debian.org>"
# gpg: aka "Mark Brown <broonie@kernel.org>"
# gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg: aka "Mark Brown <broonie@linaro.org>"
# gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
Mark Brown [Mon, 22 Jun 2015 10:19:31 +0000 (11:19 +0100)]
Merge tag 'asoc-v4.2' into asoc-next
ASoC: Updates for v4.2
The big thing this release has been Liam's addition of topology support
to the core. We've also seen quite a bit of driver work and the
continuation of Lars' refactoring for component support.
- Support for loading ASoC topology maps from firmware, intended to be
used to allow self-describing DSP firmware images to be built which
can map controls added by the DSP to userspace without the kernel
needing to know about individual DSP firmwares.
- Lots of refactoring to avoid direct access to snd_soc_codec where
it's not needed supporting future refactoring.
- Big refactoring and cleanup serieses for the Wolfson ADSP and TI
TAS2552 drivers.
- Support for TI TAS571x power amplifiers.
- Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs.
- Support for x86 systems with RT5650 and Qualcomm Storm.
# gpg: Signature made Mon 08 Jun 2015 18:48:37 BST using RSA key ID 5D5487D0
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg: aka "Mark Brown <broonie@debian.org>"
# gpg: aka "Mark Brown <broonie@kernel.org>"
# gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg: aka "Mark Brown <broonie@linaro.org>"
# gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
Takashi Iwai [Mon, 22 Jun 2015 09:32:41 +0000 (11:32 +0200)]
Merge tag 'asoc-v4.2-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into for-next
ASoC: Further updates for v4.2
There's a bunch of additional updates and fixes that came in since my
orignal pull request here, including DT support for rt5645 and fairly
large serieses of cleanups and improvements to tas2552 and rcar.
Mark Brown [Mon, 22 Jun 2015 09:24:19 +0000 (10:24 +0100)]
Merge tag 'asoc-v4.2' into asoc-next
ASoC: Updates for v4.2
The big thing this release has been Liam's addition of topology support
to the core. We've also seen quite a bit of driver work and the
continuation of Lars' refactoring for component support.
- Support for loading ASoC topology maps from firmware, intended to be
used to allow self-describing DSP firmware images to be built which
can map controls added by the DSP to userspace without the kernel
needing to know about individual DSP firmwares.
- Lots of refactoring to avoid direct access to snd_soc_codec where
it's not needed supporting future refactoring.
- Big refactoring and cleanup serieses for the Wolfson ADSP and TI
TAS2552 drivers.
- Support for TI TAS571x power amplifiers.
- Support for Qualcomm APQ8016 and ZTE ZX296702 SoCs.
- Support for x86 systems with RT5650 and Qualcomm Storm.
# gpg: Signature made Mon 08 Jun 2015 18:48:37 BST using RSA key ID 5D5487D0
# gpg: Oops: keyid_from_fingerprint: no pubkey
# gpg: Good signature from "Mark Brown <broonie@sirena.org.uk>"
# gpg: aka "Mark Brown <broonie@debian.org>"
# gpg: aka "Mark Brown <broonie@kernel.org>"
# gpg: aka "Mark Brown <broonie@tardis.ed.ac.uk>"
# gpg: aka "Mark Brown <broonie@linaro.org>"
# gpg: aka "Mark Brown <Mark.Brown@linaro.org>"
ASoC: wm_adsp: Move DSP Rate controls into the codec
The rate controls are codec-specific, it's not possible to
generically say what the range or the meaning of each control
is (or even if they exist at all) - that depends on the
particular codec.
This is currently being handled for Arizona codecs by putting
an Arizona-specific table of controls inside the wm_adsp driver.
This creates a dependency between wm_adsp and arizona.c, and is an
awkward solution if the ADSP is used in another family of codecs
Fix this by moving the Arizona-specific rate controls into the
Arizona codec drivers.
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Axel Lin [Tue, 16 Jun 2015 11:39:09 +0000 (19:39 +0800)]
ASoC: wm8995: Fix setting sysclk for WM8995_SYSCLK_MCLK2 case
Fix trivial typo.
Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Vinod Koul [Wed, 17 Jun 2015 05:50:18 +0000 (11:20 +0530)]
ALSA: hda: provide default bus io ops extended hdac
A typical io ops use simple io accessors which can be common for most
drivers, so provide a default ops which will be used if driver doesn't
provide one
Vinod Koul [Wed, 17 Jun 2015 05:50:17 +0000 (11:20 +0530)]
ALSA: hda: add hda link cleanup routine
In HDA extended bus the HDA link objects are created when multilink
capabilities are parsed. We need a routine which free up these link objects
for a bus. So add snd_hdac_link_free_all routine
Vinod Koul [Wed, 17 Jun 2015 05:50:16 +0000 (11:20 +0530)]
ALSA: hda: add hdac_ext stream creation and cleanup routines
HDAC extended core should create streams for an extended bus and also free
up those on cleanup. So introduce snd_hdac_ext_stream_init_all and
snd_hdac_stream_free_all routines
'047000278da3a17f8("ASoC: rsrc-card: cleanup for DPCM")'
cleanuped rsrc-card driver, but then, unused ret was left.
Below warning happen without this patch
${LINUX}/sound/soc/sh/rcar/rsrc-card.c: In function 'rsrc_card_startup':
${LINUX}/sound/soc/sh/rcar/rsrc-card.c:78:6: warning: unused variable \
'ret' [-Wunused-variable]
Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Vinod Koul [Tue, 16 Jun 2015 15:30:22 +0000 (21:00 +0530)]
ALSA: HDAC: move SND_HDA_PREALLOC_SIZE to core
Since this is common option for HDA driver to specfiy pre-allocated
buffer, we should make this option availble to all HDA driver by
moving this to HDA core
Koro Chen [Mon, 15 Jun 2015 14:38:04 +0000 (22:38 +0800)]
ASoC: mediatek: Add machine driver for rt5650 rt5676 codec
This is the DPCM based machine driver with rt5650 and rt5676
Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Signed-off-by: Koro Chen <koro.chen@mediatek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many path
if it supports MIXer. In such case, mod <-> io is no longer 1:1
relationship. rsnd_mod_to_io() is no longer needed. Let's remove it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsnd: move rsnd_mod_is_working() to rsnd_io_is_working()
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many paths
if it supports MIXer. In such case, mod <-> io is no longer 1:1
relationship.
This patch checks module working status via io instead of mod
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsnd: don't use rsnd_mod_to_io() on snd_kcontrol
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many paths
if it supports MIXer. In such case, mod <-> io is no longer 1:1
relationship. This patch removes rsnd_mod_to_io() from snd_kcontrol
and related function.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_src_xxx()
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many paths
if it supports MIXer. In such case, mod <-> io is no longer 1:1
relationship. This patch removes rsnd_mod_to_io() from rsnd_src_xxx()
and related function.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_ssi_xxx()
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many paths
if it supports MIXer. In such case, mod <-> io is no longer 1:1
relationship. This patch removes rsnd_mod_to_io() from rsnd_ssi_xxx()
and related function.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_dma_xxx()
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many paths
if it supports MIXer. In such case, mod <-> io is no longer 1:1
relationship. This patch removes rsnd_mod_to_io() from rsnd_dma_xxx()
and related function
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsnd: don't use rsnd_mod_to_io() on rsnd_get_adinr()
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many paths
if it supports MIXer. In such case, mod <-> io is no longer 1:1
relationship. This patch removes rsnd_mod_to_io() from rsnd_get_adinr()
and its related function
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsnd: add common interrupt handler for SSI/SRC/DMA
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many paths
if it supports MIXer. In such case, mod <-> io is no longer 1:1
relationship. Then, interrupt handler can't use rsnd_mod_to_io().
This patch adds SSI/SRC/DMA common interrupt handler frame
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsnd: adds struct rsnd_dai_stream as on each fuction as parameter
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many paths
if it supports MIXer. In such case, mod <-> io is no longer 1:1
relationship. This means we can't call rsnd_mod_to_io() any more.
This patch adds struct rsnd_dai_stream to each function as parameter.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many paths
if it supports MIXer. In such case, mod <-> io is no longer 1:1
relationship. This means we can't use rsnd_mod_to_io() in SSI/SRC/DMA
interrupt handler. In such case, we need to check all io in interrupt
handler, and then, "priv" is needed.
This patch adds rsnd_priv pointer in rsnd_mod for prepare it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Each Renesas sound mod (= SSI/SRC/DVC) might be called from many paths
if it supports MIXer. Then, we don't need to re-call each mod function
that had been called. This patch count each mod status.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
rsrc-card driver is based on simple-card driver which is caring about
CPU / Codec connection. OTOH, rsrc-card is used for DPCM system.
FE portion is constituted by CPU and dummy Codec, and BE is constituted
by dummy CPU and Codec in DPCM system.
Because of this, current rsrc-card is doing pointless method. It works well
if FE/BE was 1:1, but not good for multi FE/BE.
This patch cleanups rsrc-card driver for DPCM. and this is prepare for
MIX support for Renesas sound driver.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsrc-card: used "fe.xxx"/"be.xxx" name for dai_link
Current dai_link name is using "cpu_dai_name + codec_dai_name",
but one of them is always "snd-soc-dummy-dai" when DPCM.
This patch uses "fe.xxx" for cpu, "be.xxx" for codec.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsnd: don't call snd_pcm_period_elapsed() under spin lock
'a9e1ac1a9e4585b5("ASoC: rsnd: spin lock for interrupt handler")'
added spin lock under interrupt handler to solve HW restart issue.
OTOH, current rsnd driver calls snd_pcm_period_elapsed() from
rsnd_dai_pointer_update(). but, it will be called under spin lock
if SSI was PIO mode.
If it was called under spin lock, it will call
snd_pcm_update_state() -> snd_pcm_drain_done().
Then, it calls rsnd_soc_dai_trigger() and will be dead-lock.
This patch doesn't call rsnd_dai_pointer_update() under spin lock
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
ASoC: rsnd: don't care under/over run error when PIO
PIO is used only for checking data path / codec settings. And underrun
is very normal when PIO mode. Let's don't care about under/over run
error when PIO case. Otherwise, 1) too many HW restart happens, 2) some
sounds which need much data transfer can't play since it falls into
error detection method which was created for DMA transfer
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> Tested-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Tue, 16 Jun 2015 10:23:36 +0000 (12:23 +0200)]
ALSA: hda - Fix unused label skip_i915
When CONFIG_SND_HDA_I915=n, we get a compile warning:
sound/pci/hda/hda_intel.c: In function ‘azx_probe_continue’:
sound/pci/hda/hda_intel.c:1882:2: warning: label ‘skip_i915’ defined but not used [-Wunused-label]
Fix it by putting again ifdef to it. Sigh.
Fixes: bf06848bdbe5 ('ALSA: hda - Continue probing even if i915 binding fails') Reported-by: Borislav Petkov <bp@suse.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Michele Curti [Mon, 15 Jun 2015 02:44:11 +0000 (10:44 +0800)]
ASoC: rt5645: move RT5650 muxes to rt5650_specific_dapm_widgets
Developing a driver for an Asus X205TA laptop I get these dmesg
errors:
rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 ADC1 Swap Mux has no paths
rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 ADC2 Swap Mux has no paths
rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 ADC3 Swap Mux has no paths
rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 ADC Mux has no paths
rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 DAC1 L Mux has no paths
rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 DAC1 R Mux has no paths
rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 DAC2 L Mux has no paths
rt5645 i2c-10EC5648:00: ASoC: mux RT5650 IF1 DAC2 R Mux has no paths
so, move these muxes to the rt5650_specific_dapm_widgets[] list.
Signed-off-by: Michele Curti <michele.curti@gmail.com> Signed-off-by: Oder Chiou <oder_chiou@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
The new Dell XPS13 also requires the similar quirk for fixing the
noisy outputs. (But, as the codec was changed, now the fixup for
Latitude is used instead.)
Behringer FCA610 transmits packets with periodic noisy PCM samples
when receiving no streams, and generates a bit noisy sound.
ALSA BeBoB driver is programmed to establish both in/out connections
when starting streaming, then transfers packets as userspace applications
requested. This means that there's a case that one of incoming/outgoing
streams is running, to save CPU and bandwidth usage. Although, it's natural
to start transferring packets in both direction.
This commit makes this driver to keeps duplex streams always.
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:35 +0000 (12:49 +0900)]
ALSA: bebob: loosen up severity of checking continuity for BeBoB v3 quirk
PrismSound Orpheus, Behringer UFX1604 and FCA610 work with BeBoB v3, and
they're confirmed to transmit discontinuous packets in the beginning of
streaming.
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:34 +0000 (12:49 +0900)]
ALSA: bebob: expand timeout for DM1500 quirk
Behringer FCA610 and UFX1604 is confirmed to require more time till
transmitting packets after establishing connections. This seems to
be a quirk of DM1500 ASIC which ArchWave produced.
For this quirk, this commit extends the time to wait up to 2 seconds.
As a result, in worst cases, below userspace functions require 2 seconds
to return.
- snd_pcm_prepare()
- snd_pcm_hw_params()
- snd_pcm_recover()
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:30 +0000 (12:49 +0900)]
ALSA: bebob: use normalized representation for the type of clock source
This commit changes function prototype and its processing. As a result,
function caller can execute additional processing according to detected
clock source.
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:29 +0000 (12:49 +0900)]
ALSA: bebob: preparation for replacing string literals by normalized representation for model-dependent structures
Previous commit adds a enumerator as a normalized representation of
clock source, while model-dependent structures still use string literals
for this purpose.
Takashi Sakamoto [Sun, 14 Jun 2015 03:49:27 +0000 (12:49 +0900)]
ALSA: bebob: improve signal mode detection for clock source
With BeBoB version 3, current ALSA BeBoB driver detects the type of
current clock signal source wrongly. This is due to a lack of proper
implementation to parse the information.
This commit renews the parser. As a result, this driver detects
SYT-Match clock signal, thus it can start streams with two modes;
SYT-Match mode and the others. SYT-Match mode will be supported in future
commits.
There's a constrain about detected internal/external clock source.
When detecting external clock source, this driver allows userspace
applications to use current sampling rate only. This is due to consider
abour synchronization to external clock sources such as S/PDIF, ADAT or
word-clock.
According to several information from some devices, I guesss that the
internal clock of most devices synchronize to IEEE 1394 cycle start
packet. In this case, by a usual way, it's detect as 'Sync type
of output Music Sub-Unit' connected to 'Sync type of PCR output Unit
(oPCR)', and this driver judges it as internal clock. Therefore,
userspace applications is allowed to request arbitrary supported sampling
rates.
On the other hand, several devices based on BeBoB version 3 have
additional internal clock. In this case, by a usual way, it's detect as
'Sync/Additional type of External input Unit'. Unfortunately, there's no
way to distinguish this sync type from the other external clock sources
such as word-clock. In this case, this driver handles it as external and
userspace applications is forced to use current sampling rate.
I note that when the source of clock is detected as 'Isochronous stream
type of input PCR[0]', it's under 'SYT-Match' mode. In this mode, the
synchronization clock is generated according to SYT-series in received
packets. In this case, this driver generates the series by myself. I
experienced this mode often make the device silent suddenly during
playbacking. This means that the mode is easy to lost synchronization.
Axel Lin [Sun, 14 Jun 2015 02:28:01 +0000 (10:28 +0800)]
ASoC: ml26124: Remove duplicate code
Current code has duplicate code for 16000, 32000 and 48000 sample rates.
get_srate() returns negative error code for unsupported rate, so we can
remove the duplicate code in the swith cases by calling get_srate() first.
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Takashi Iwai [Mon, 15 Jun 2015 09:59:32 +0000 (11:59 +0200)]
ALSA: hda - Fix audio crackles on Dell Latitude E7x40
We still got a report that the audio crackles and noises occur with
the recent 4.1 kernels on Dell machines. These machines seem to need
similar workarounds that have been applied to the recent Dell XPS 13
models. Since the codec of these machines (Dell Latitute E7240 and
E7440) is different from XPS 13's one, we need a new fixup entry.
Also, it was confirmed that the previous workaround to disable the
widget power-save (commit [219f47e4f964: ALSA: hda - Disable widget
power-saving for ALC292 & co]) is no longer needed after this fix.
So, this patch includes the partial revert of the commit, too.
Reported-and-tested-by: Mihai Donțu <mihai.dontu@gmail.com> Tested-by: Jonathan McDowell <noodles@earth.li> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fang, Yang A [Wed, 3 Jun 2015 22:07:41 +0000 (15:07 -0700)]
ASoC: Intel: fixed TI button detection
In order to make TI button interrupt working max98090 codec
Need provide mic bias all the time as long as mic is present
so SHDN and micbias pin are forced on.we also need set max98090
codec bias close or lower than TI bias.We set them in bios/coreboot
kernel reads them from device property
Signed-off-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Some tiny improvements, cutting 180 bytes off the generated code.
- use strchr() for single-character needle
- compute index using pointer subtraction instead of two strlen()
calls
- factor out the common check for whether the initial part of
kctl->id.name (before the space) is identical to w->name.
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: Vinod Koul <vinod.koul@intel.com> Tested-by: Fang, Yang A <yang.a.fang@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Hui Wang [Mon, 15 Jun 2015 09:43:39 +0000 (17:43 +0800)]
ALSA: hda - adding a DAC/pin preference map for a HP Envy TS machine
On a HP Envy TouchSmart laptop, there are 2 speakers (main speaker
and subwoofer speaker), 1 headphone and 2 DACs, without this fixup,
the headphone will be assigned to a DAC and the 2 speakers will be
assigned to another DAC, this assignment makes the surround-2.1
channels invalid.
To fix it, here using a DAC/pin preference map to bind the main
speaker to 1 DAC and the subwoofer speaker will be assigned to another
DAC.
Cc: <stable@vger.kernel.org> Signed-off-by: Hui Wang <hui.wang@canonical.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>