firefly-linux-kernel-4.4.55.git
10 years agoALSA: hda/realtek - Add more entry for enable HP mute led
Kailang Yang [Fri, 13 Jun 2014 09:16:31 +0000 (17:16 +0800)]
ALSA: hda/realtek - Add more entry for enable HP mute led

More HP machine need mute led support.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add quirk for external mic on Lifebook U904
David Henningsson [Fri, 13 Jun 2014 09:15:44 +0000 (11:15 +0200)]
ALSA: hda - Add quirk for external mic on Lifebook U904

According to the bug reporter (Данило Шеган), the external mic
starts to work and has proper jack detection if only pin 0x19
is marked properly as an external headset mic.

AlsaInfo at https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/1328587/+attachment/4128991/+files/AlsaInfo.txt

Cc: stable@vger.kernel.org
BugLink: https://bugs.launchpad.net/bugs/1328587
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - fix a fixup value for codec alc293 in the pin_quirk table
Hui Wang [Fri, 13 Jun 2014 01:23:10 +0000 (09:23 +0800)]
ALSA: hda - fix a fixup value for codec alc293 in the pin_quirk table

The fixup value for codec alc293 was set to
ALC269_FIXUP_DELL1_MIC_NO_PRESENCE by a mistake, if we don't fix it,
the Dock mic will be overwriten by the headset mic, this will make
the Dock mic can't work.

Cc: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: intel8x0: Use ktime and ktime_get()
Thomas Gleixner [Wed, 11 Jun 2014 23:59:15 +0000 (23:59 +0000)]
ALSA: intel8x0: Use ktime and ktime_get()

do_posix_clock_monotonic_gettime() is a leftover from the initial
posix timer implementation which maps to ktime_get_ts() and returns
the monotonic time in a timespec.

Use ktime based ktime_get() and use the ktime_delta_us() function to
calculate the delta instead of open coding the timespec math.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: core: Use ktime_get_ts()
Thomas Gleixner [Wed, 11 Jun 2014 23:59:14 +0000 (23:59 +0000)]
ALSA: core: Use ktime_get_ts()

do_posix_clock_monotonic_gettime() is a leftover from the initial
posix timer implementation which maps to ktime_get_ts().

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - verify pin:converter connection on unsol event for HSW and VLV
Mengdong Lin [Thu, 12 Jun 2014 06:42:25 +0000 (14:42 +0800)]
ALSA: hda - verify pin:converter connection on unsol event for HSW and VLV

This patch will verify the pin's coverter selection for an active stream
when an unsol event reports this pin becomes available again after a display
mode change or hot-plug event.

For Haswell+ and Valleyview: display mode change or hot-plug can change the
transcoder:port connection and make all the involved audio pins share the 1st
converter. So the stream using 1st convertor will flow to multiple pins
but active streams using other converters will fail. This workaround
is to assure the pin selects the right conveter and an assigned converter is
not shared by other unused pins.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: compress: Cancel the optimization of compiler and fix the size of struct for...
Wang, Xiaoming [Thu, 12 Jun 2014 22:47:07 +0000 (18:47 -0400)]
ALSA: compress: Cancel the optimization of compiler and fix the size of struct for all platform.

Cancel the optimization of compiler for struct snd_compr_avail
which size will be 0x1c in 32bit kernel while 0x20 in 64bit
kernel under the optimizer. That will make compaction between
32bit and 64bit. So add packed to fix the size of struct
snd_compr_avail to 0x1c for all platform.

Signed-off-by: Zhang Dongxing <dongxing.zhang@intel.com>
Signed-off-by: xiaoming wang <xiaoming.wang@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - Add quirk for ABit AA8XE
David Henningsson [Tue, 10 Jun 2014 08:52:50 +0000 (10:52 +0200)]
ALSA: hda - Add quirk for ABit AA8XE

Bios does not set up the pin config default correctly (everything
is set to zero). Reporter claims that 6stack-dig and 6stack-automute
solve the problem.

Alsa-info at http://www.alsa-project.org/db/?f=376c0804cbdde90bcd2cb94799407cb1cacf5d05
BugLink: https://bugs.launchpad.net/bugs/1319291
Reported-by: Stefano Statuti <stefano.statuti@hotmail.it>
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoRevert "ALSA: hda - mask buggy stream DMA0 for Broadwell display controller"
Libin Yang [Mon, 9 Jun 2014 07:28:58 +0000 (15:28 +0800)]
Revert "ALSA: hda - mask buggy stream DMA0 for Broadwell display controller"

This reverts commit 7189eb9b8f7962474956196c301676470542f253.

It will use LPIB to get the DMA position on Broadwell HDMI Audio.

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - using POS_FIX_LPIB on Broadwell HDMI Audio
Libin Yang [Mon, 9 Jun 2014 07:28:59 +0000 (15:28 +0800)]
ALSA: hda - using POS_FIX_LPIB on Broadwell HDMI Audio

Broadwell HDMI can't use position buffer reliably, force to use LPIB

Signed-off-by: Libin Yang <libin.yang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda/realtek - Add support of ALC667 codec
Kailang Yang [Fri, 6 Jun 2014 08:51:18 +0000 (16:51 +0800)]
ALSA: hda/realtek - Add support of ALC667 codec

New codec suooprt of ALC667.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda/realtek - Add more codec rename
Kailang Yang [Fri, 6 Jun 2014 08:46:43 +0000 (16:46 +0800)]
ALSA: hda/realtek - Add more codec rename

Some vendor has special bonding options.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda/realtek - New vendor ID for ALC233
Kailang Yang [Fri, 6 Jun 2014 09:05:33 +0000 (17:05 +0800)]
ALSA: hda/realtek - New vendor ID for ALC233

This is compatible with ALC255.
It is use for Lenovo.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - add two new pin tables
Hui Wang [Fri, 6 Jun 2014 02:50:24 +0000 (10:50 +0800)]
ALSA: hda - add two new pin tables

These two new pin tables can fix headset mic problems for several
new Dell machines.

And also delete some machines from old quirk table since the existing
pin talbes already cover them.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda/realtek - Add support of ALC891 codec
Kailang Yang [Thu, 5 Jun 2014 03:13:44 +0000 (11:13 +0800)]
ALSA: hda/realtek - Add support of ALC891 codec

New codec support for ALC891.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: seq: Continue broadcasting events to ports if one of them fails
Adam Goode [Wed, 4 Jun 2014 15:20:55 +0000 (11:20 -0400)]
ALSA: seq: Continue broadcasting events to ports if one of them fails

Sometimes PORT_EXIT messages are lost when a process is exiting.
This happens if you subscribe to the announce port with client A,
then subscribe to the announce port with client B, then kill client A.
Client B will not see the PORT_EXIT message because client A's port is
closing and is earlier in the announce port subscription list. The
for each loop will try to send the announcement to client A and fail,
then will stop trying to broadcast to other ports. Killing B works fine
since the announcement will already have gone to A. The CLIENT_EXIT
message does not get lost.

How to reproduce problem:

*** termA
$ aseqdump -p 0:1
  0:1   Port subscribed            0:1 -> 128:0

*** termB
$ aseqdump -p 0:1

*** termA
  0:1   Client start               client 129
  0:1   Port start                 129:0
  0:1   Port subscribed            0:1 -> 129:0

*** termB
  0:1   Port subscribed            0:1 -> 129:0

*** termA
^C

*** termB
  0:1   Client exit                client 128
   <--- expected Port exit as well (before client exit)

Signed-off-by: Adam Goode <agoode@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: bebob: Remove unused function prototype
Takashi Sakamoto [Wed, 4 Jun 2014 06:25:37 +0000 (15:25 +0900)]
ALSA: bebob: Remove unused function prototype

snd_bebob_stream_map() is not defined.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fireworks: Remove meaningless mutex_destroy()
Takashi Sakamoto [Wed, 4 Jun 2014 06:25:36 +0000 (15:25 +0900)]
ALSA: fireworks: Remove meaningless mutex_destroy()

Currently mutex_destroy() is called in module's cleanup function. But after
cleaned up, this mutex is automatically released. So this function call
is meaningless.

[fixed a typo in changelog by tiwai]

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fireworks: Remove a constant over width to which it's applied
Takashi Sakamoto [Wed, 4 Jun 2014 06:25:35 +0000 (15:25 +0900)]
ALSA: fireworks: Remove a constant over width to which it's applied

The constants of enum snd_efw_grp_type is for struct snd_efw_phys_grp.type.
But this member is 1 byte. Although the value is between 0x00-0xff, a constant
has 0x10000. This constant is meaningless.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fireworks: Improve comments about Fireworks transaction
Takashi Sakamoto [Wed, 4 Jun 2014 06:25:34 +0000 (15:25 +0900)]
ALSA: fireworks: Improve comments about Fireworks transaction

It includes descriptions to cause misreading.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fireworks: Use safer way to arrange ring buffer pointer
Takashi Sakamoto [Wed, 4 Jun 2014 06:25:33 +0000 (15:25 +0900)]
ALSA: fireworks: Use safer way to arrange ring buffer pointer

To reverse a pointer for the ring buffer, subtraction by buffer
size is better than assignment to the beginning of the buffer.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fireworks/bebob: Shorten critical section for stream_stop_duplex()
Takashi Sakamoto [Wed, 4 Jun 2014 06:25:32 +0000 (15:25 +0900)]
ALSA: fireworks/bebob: Shorten critical section for stream_stop_duplex()

All assignment for local variables in these functions are not related to
critical section.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: seq: correctly detect input buffer overflow
Adam Goode [Wed, 4 Jun 2014 05:02:51 +0000 (01:02 -0400)]
ALSA: seq: correctly detect input buffer overflow

snd_seq_event_dup returns -ENOMEM in some buffer-full conditions,
but usually returns -EAGAIN. Make -EAGAIN trigger the overflow
condition in snd_seq_fifo_event_in so that the fifo is cleared
and -ENOSPC is returned to userspace as stated in the alsa-lib docs.

Signed-off-by: Adam Goode <agoode@google.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoASoC: Fix wrong argument for card remove callbacks
Takashi Iwai [Tue, 3 Jun 2014 10:31:46 +0000 (12:31 +0200)]
ASoC: Fix wrong argument for card remove callbacks

The commit [e1d4d3c8: ASoC: free jack GPIOs before the sound card is
freed] introduced snd_soc_card remove callbacks to a few drivers, but
they are implemented with a wrong argument type.  The callback should
receive snd_soc_card pointer instead of snd_soc_pcm_runtime.

Fixes: e1d4d3c854f2 ('ASoC: free jack GPIOs before the sound card is freed')
Acked-by: Mark Brown <broonie@linaro.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge tag 'asoc-v3.16-2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Takashi Iwai [Tue, 3 Jun 2014 09:51:14 +0000 (11:51 +0200)]
Merge tag 'asoc-v3.16-2' of git://git./linux/kernel/git/broonie/sound into for-next

ASoC: Final updates for v3.16

A few more updates from the last week of development, nothing too
exciting.  Highlights include:

- GPIO descriptor support for jacks
- More updates and fixes to the Freescale SSI, Intel and rsnd drivers.
- New drivers for Analog Devices ADAU1361, ADAU1381, ADAU1761 and
  ADAU1781, and Realtek RT5677.

10 years agoASoC: free jack GPIOs before the sound card is freed
Stephen Warren [Fri, 30 May 2014 18:42:57 +0000 (12:42 -0600)]
ASoC: free jack GPIOs before the sound card is freed

This is the same change as commit fb6b8e71448a "ASoC: tegra: free jack
GPIOs before the sound card is freed", but applied to all other ASoC
machine drivers where code inspection indicates the same problem exists.

That commit's description is:
==========
snd_soc_jack_add_gpios() schedules a work queue item to poll the GPIO to
generate an initial jack status report. If sound card initialization
fails, that work item needs to be cancelled, so it doesn't run after the
card has been freed. Specifically, freeing the card calls
snd_jack_dev_free() which calls snd_jack_dev_disconnect() which sets
jack->input_dev = NULL, and input_dev is used by snd_jack_report(), which
is called from the work queue item.

snd_soc_jack_free_gpios() cancels the work item. The Tegra ASoC machine
drivers do call this function in the platform driver remove() callback.
However, this happens after the sound card is freed, at least when the
card is freed due to errors late during snd_soc_instantiate_card(). This
leaves a window where the work item can execute after the card is freed.
In next-20140522, sound card initialization does fail for unrelated
reasons, and hits the problem described above.

To solve this, fix the Tegra ASoC machine drivers to clean up the Jack
GPIOs during the snd_soc_card's .remove() callback, which is executed
before the overall card object is freed. also, guard the cleanup call
based on whether we actually setup up the GPIOs in the first place.
Ideally, we'd do the cleanup in a struct snd_soc_dai_link .fini/remove
function to match where the GPIOs get set up. However, there is no such
callback.
==========

Note that I have not even compile-tested this in most cases, since most
of the drivers rely on specific mach-* support I don't have enabled, and
don't support COMPILE_TEST. Testing by the relevant board maintainers
would be useful.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoMerge remote-tracking branches 'asoc/topic/wm8804' and 'asoc/topic/wm9713' into asoc...
Mark Brown [Tue, 3 Jun 2014 09:40:00 +0000 (10:40 +0100)]
Merge remote-tracking branches 'asoc/topic/wm8804' and 'asoc/topic/wm9713' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/tegra' into asoc-next
Mark Brown [Tue, 3 Jun 2014 09:39:59 +0000 (10:39 +0100)]
Merge remote-tracking branch 'asoc/topic/tegra' into asoc-next

10 years agoMerge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc...
Mark Brown [Tue, 3 Jun 2014 09:39:57 +0000 (10:39 +0100)]
Merge remote-tracking branches 'asoc/topic/samsung', 'asoc/topic/sgtl5000', 'asoc/topic/simple' and 'asoc/topic/sirf' into asoc-next

10 years agoMerge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5677' into asoc...
Mark Brown [Tue, 3 Jun 2014 09:39:55 +0000 (10:39 +0100)]
Merge remote-tracking branches 'asoc/topic/rl6231' and 'asoc/topic/rt5677' into asoc-next

10 years agoMerge remote-tracking branches 'asoc/topic/omap' and 'asoc/topic/rcar' into asoc...
Mark Brown [Tue, 3 Jun 2014 09:39:53 +0000 (10:39 +0100)]
Merge remote-tracking branches 'asoc/topic/omap' and 'asoc/topic/rcar' into asoc-next

10 years agoMerge remote-tracking branches 'asoc/topic/max98090' and 'asoc/topic/max98095' into...
Mark Brown [Tue, 3 Jun 2014 09:39:52 +0000 (10:39 +0100)]
Merge remote-tracking branches 'asoc/topic/max98090' and 'asoc/topic/max98095' into asoc-next

10 years agoMerge remote-tracking branches 'asoc/topic/gpio' and 'asoc/topic/intel' into asoc...
Mark Brown [Tue, 3 Jun 2014 09:39:50 +0000 (10:39 +0100)]
Merge remote-tracking branches 'asoc/topic/gpio' and 'asoc/topic/intel' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/fsl-ssi' into asoc-next
Mark Brown [Tue, 3 Jun 2014 09:39:49 +0000 (10:39 +0100)]
Merge remote-tracking branch 'asoc/topic/fsl-ssi' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/davinci' into asoc-next
Mark Brown [Tue, 3 Jun 2014 09:39:48 +0000 (10:39 +0100)]
Merge remote-tracking branch 'asoc/topic/davinci' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/cs42l56' into asoc-next
Mark Brown [Tue, 3 Jun 2014 09:39:47 +0000 (10:39 +0100)]
Merge remote-tracking branch 'asoc/topic/cs42l56' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/alc5623' into asoc-next
Mark Brown [Tue, 3 Jun 2014 09:39:46 +0000 (10:39 +0100)]
Merge remote-tracking branch 'asoc/topic/alc5623' into asoc-next

10 years agoMerge remote-tracking branches 'asoc/topic/adau' and 'asoc/topic/adsp' into asoc...
Mark Brown [Tue, 3 Jun 2014 09:39:44 +0000 (10:39 +0100)]
Merge remote-tracking branches 'asoc/topic/adau' and 'asoc/topic/adsp' into asoc-next

10 years agoMerge remote-tracking branch 'asoc/topic/core' into asoc-next
Mark Brown [Tue, 3 Jun 2014 09:39:43 +0000 (10:39 +0100)]
Merge remote-tracking branch 'asoc/topic/core' into asoc-next

10 years agoMerge remote-tracking branches 'asoc/fix/pxa' and 'asoc/fix/tlv320aic3x' into asoc...
Mark Brown [Tue, 3 Jun 2014 09:39:38 +0000 (10:39 +0100)]
Merge remote-tracking branches 'asoc/fix/pxa' and 'asoc/fix/tlv320aic3x' into asoc-linus

10 years agoMerge branch 'for-linus' into for-next
Takashi Iwai [Tue, 3 Jun 2014 06:14:47 +0000 (08:14 +0200)]
Merge branch 'for-linus' into for-next

Just to catch up a few small fixes for HD-audio and DMA engine.

10 years agoALSA: firewire-lib: Remove a comment about restriction of asynchronous operation
Takashi Sakamoto [Tue, 3 Jun 2014 05:45:37 +0000 (14:45 +0900)]
ALSA: firewire-lib: Remove a comment about restriction of asynchronous operation

The comment for fcp_avc_transaction() describes it doesn't support this type
of operation. But it was already supported by this commit.

00a7bb81c20f3e81711e28e0f6c08cee8fd18514
ALSA: firewire-lib: Add support for deferred transaction

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoASoC: cache: Fix error code when not using ASoC level cache
Mark Brown [Mon, 2 Jun 2014 15:08:21 +0000 (16:08 +0100)]
ASoC: cache: Fix error code when not using ASoC level cache

It is not an error to have no cache so we shouldn't return an error code
and cause our callers to fail, just silently do nothing instead.  Thanks
to Jarkko for identify the problematic commit.

Reported-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Reported-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoALSA: hda/realtek - Fix COEF widget NID for ALC260 replacer fixup
Takashi Iwai [Mon, 2 Jun 2014 13:16:07 +0000 (15:16 +0200)]
ALSA: hda/realtek - Fix COEF widget NID for ALC260 replacer fixup

The conversion to a fixup table for Replacer model with ALC260 in
commit 20f7d928 took the wrong widget NID for COEF setups.  Namely,
NID 0x1a should have been used instead of NID 0x20, which is the
common node for all Realtek codecs but ALC260.

Fixes: 20f7d928fa6e ('ALSA: hda/realtek - Replace ALC260 model=replacer with the auto-parser')
Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda/realtek - Correction of fixup codes for PB V7900 laptop
Ronan Marquet [Sun, 1 Jun 2014 16:38:53 +0000 (18:38 +0200)]
ALSA: hda/realtek - Correction of fixup codes for PB V7900 laptop

Correcion of wrong fixup entries add in commit ca8f0424 to replace
static model quirk for PB V7900 laptop (will model).

[note: the removal of ALC260_FIXUP_HP_PIN_0F chain is also needed as a
 part of the fix; otherwise the pin is set up wrongly as a headphone,
 and user-space (PulseAudio) may be wrongly trying to detect the jack
 state -- tiwai]

Fixes: ca8f04247eaa ('ALSA: hda/realtek - Add the fixup codes for ALC260 model=will')
Signed-off-by: Ronan Marquet <ronan.marquet@orange.fr>
Cc: <stable@vger.kernel.org> [v3.4+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: firewire-lib: Use IEC 61883-6 compliant labels for Raw Audio data
Takashi Sakamoto [Sun, 1 Jun 2014 16:50:16 +0000 (01:50 +0900)]
ALSA: firewire-lib: Use IEC 61883-6 compliant labels for Raw Audio data

According to AM824 in IEC 61883-6:2002, 2 bits in LSB of label for Raw Audio
data means Valid Length Code (VBL). Ths value is:
- b00 for 24 bits sample (label is 0x40)
- b01 for 20 bits sample (label is 0x41)
- b10 for 16 bits sample (label is 0x42)

But current firewire-lib apply 24 bits label for both of 16/24 bits samples.

As long as developers investigate BeBoB/Fireworks/OXFW/Dice, all of them
have a behaviour to ignore the label. They can generate correct sound even
if firewire-lib gives wrong label (i.e. 0xff). On BeBoB, this is not only
for Raw Audio data channel, but also for IEC 60958 Conformant data channel.

So there is little possibility of regression.

Acked-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoASoC: add RT5677 CODEC driver
Oder Chiou [Mon, 26 May 2014 12:32:33 +0000 (20:32 +0800)]
ASoC: add RT5677 CODEC driver

This patch adds the Realtek ALC5677 codec driver.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: intel: The Baytrail/MAX98090 driver depends on I2C
Mark Brown [Sun, 1 Jun 2014 19:12:05 +0000 (20:12 +0100)]
ASoC: intel: The Baytrail/MAX98090 driver depends on I2C

Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: rt5640: Add the function "get_clk_info" to RL6231 shared support
Oder Chiou [Tue, 20 May 2014 07:01:55 +0000 (15:01 +0800)]
ASoC: rt5640: Add the function "get_clk_info" to RL6231 shared support

The patch adds the function "get_clk_info" to RL6231 shared support.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: rt5640: Add the function of the PLL clock calculation to RL6231 shared support
Oder Chiou [Tue, 20 May 2014 07:01:54 +0000 (15:01 +0800)]
ASoC: rt5640: Add the function of the PLL clock calculation to RL6231 shared support

The patch adds the function of the PLL clock calculation to RL6231 shared
support.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: rt5640: Add RL6231 class device shared support for RT5640, RT5645 and RT5651
Oder Chiou [Tue, 20 May 2014 07:01:53 +0000 (15:01 +0800)]
ASoC: rt5640: Add RL6231 class device shared support for RT5640, RT5645 and RT5651

The patch adds the RL6231 class device shared support for RT5640, RT5645 and
RT5651. The function of the DMIC clock calculation can be shared by RL6231
shared support.

Signed-off-by: Oder Chiou <oder_chiou@realtek.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoMerge branches 'topic/rt5640', 'topic/rt5645' and 'topic/rt5651' of git://git.kernel...
Mark Brown [Sun, 1 Jun 2014 19:04:24 +0000 (20:04 +0100)]
Merge branches 'topic/rt5640', 'topic/rt5645' and 'topic/rt5651' of git://git./linux/kernel/git/broonie/sound into asoc-rl6231

10 years agoASoC: cache: Fix possible ZERO_SIZE_PTR pointer dereferencing error.
Xiubo Li [Mon, 19 May 2014 08:32:09 +0000 (16:32 +0800)]
ASoC: cache: Fix possible ZERO_SIZE_PTR pointer dereferencing error.

Since we cannot make sure the 'reg_size' will always be none zero here,
and then if 'reg_size' equals to zero, the kzalloc() will return ZERO_SIZE_PTR,
which equals to ((void *)16).

So this patch fix this with just doing the 'reg_size' zero check before calling
kzalloc().

Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Add helper functions to cast from DAPM context to CODEC/platform
Lars-Peter Clausen [Sun, 18 May 2014 12:24:12 +0000 (14:24 +0200)]
ASoC: Add helper functions to cast from DAPM context to CODEC/platform

This is useful if we have a pointer to a DAPM context and know that it is a
CODEC or platform DAPM context and want to get a pointer to the CODEC or
platform.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoALSA: bebob: sizeof() vs ARRAY_SIZE() typo
Dan Carpenter [Wed, 28 May 2014 16:43:30 +0000 (19:43 +0300)]
ALSA: bebob: sizeof() vs ARRAY_SIZE() typo

ARRAY_SIZE() was intended here instead of sizeof().  The
"bridgeco_freq_table" array holds integers so the original condition is
never true.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoMerge branch 'topic/fsl' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie...
Mark Brown [Sun, 1 Jun 2014 13:02:07 +0000 (14:02 +0100)]
Merge branch 'topic/fsl' of git://git./linux/kernel/git/broonie/sound into asoc-fsl-ssi

Conflicts:
sound/soc/fsl/Kconfig

10 years agoASoC: wm9713: correct mono out PGA sources
Matt Reimer [Mon, 19 May 2014 16:35:47 +0000 (09:35 -0700)]
ASoC: wm9713: correct mono out PGA sources

The mono output PGA input only has four possible sources, so
omit the rest.

Signed-off-by: Matt Reimer <mreimer@sdgsystems.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoALSA: synth: emux: soundfont.c: Cleaning up memory leak
Rickard Strandqvist [Sun, 1 Jun 2014 11:35:24 +0000 (13:35 +0200)]
ALSA: synth: emux: soundfont.c: Cleaning up memory leak

There is a risk for memory leak in when something unexpected happens
and the function returns.

This was largely found by using a static code analysis program called cppcheck.

[fixed a typo of kfree() by tiwai]

Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoASoC: fsl: Remove dependencies of boards for SND_SOC_EUKREA_TLV320
Alexander Shiyan [Fri, 23 May 2014 11:11:01 +0000 (15:11 +0400)]
ASoC: fsl: Remove dependencies of boards for SND_SOC_EUKREA_TLV320

Eukrea-i.MX51 board was converted to use DT, ie we no longer have a
MACH_EUKREA_MBIMXSD51_BASEBOARD symbol.
Transformation of other boards planned for the near future, so this
patch removes all these dependencies and restricts build of this
driver to ARCH_MXC.

Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: fsl-ssi: Use regmap
Markus Pargmann [Tue, 27 May 2014 08:24:25 +0000 (10:24 +0200)]
ASoC: fsl-ssi: Use regmap

This patch replaces the ssi specific functions write_ssi, read_ssi and
write_ssi_mask by standard regmap function calls.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: fsl-ssi: reorder and document fsl_ssi_private
Markus Pargmann [Tue, 27 May 2014 08:24:24 +0000 (10:24 +0200)]
ASoC: fsl-ssi: reorder and document fsl_ssi_private

Reorder all variables in struct fsl_ssi_private to have groups that make
sense together. The patch also updates the struct documentation.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: fsl-ssi: Fix baudclock handling
Markus Pargmann [Tue, 27 May 2014 08:24:23 +0000 (10:24 +0200)]
ASoC: fsl-ssi: Fix baudclock handling

The baudclock may be used and set by different streams.

Allow only the first stream to set the bitclock rate. Other streams have
to try to get to the correct rate without modifying the bitclock rate
using the SSI internal clock modifiers.

The variable baudclk_streams is introduced to keep track of the active
streams that are using the baudclock. This way we know if the baudclock
may be set and whether we may enable/disable the clock.

baudclock enable/disable is moved to hw_params()/hw_free(). This way we can
keep track of the baudclock in those two functions and avoid a running
clock while it is not used. As hw_params()/hw_free() may be called
multiple times for the same stream, we have to use baudclk_streams
variable to know whether we may enable/disable the clock.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: fsl-ssi: Set framerate divider correctly for i2s master mode
Sascha Hauer [Tue, 27 May 2014 08:24:22 +0000 (10:24 +0200)]
ASoC: fsl-ssi: Set framerate divider correctly for i2s master mode

In i2s master mode the fsl_ssi driver depends on someone calling
.set_tdm_slot correctly. In this mode though only a DC value of
2 is allowed, so set it in this case and no longer depend on
.set_tdm_slot.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: fsl-ssi: remove unnecessary spinlock
Sascha Hauer [Tue, 27 May 2014 08:24:21 +0000 (10:24 +0200)]
ASoC: fsl-ssi: remove unnecessary spinlock

The baudclock_locked variable is only used in functions which
are serialized anyway from the core. No need to have a lock
around the variable, so remove it.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: fsl-ssi: set bitclock in master mode from hw_params
Sascha Hauer [Tue, 27 May 2014 08:24:20 +0000 (10:24 +0200)]
ASoC: fsl-ssi: set bitclock in master mode from hw_params

The fsl_ssi driver uses the .set_sysclk callback to configure the
bitclock for master mode. This is unnecessary since the bitclock
is known in hw_params. This patch configures the bitclock from .hw_params.
.set_dai_sysclk now sets a bitclock frequency which is preferred over
the default calculated bitclock frequency.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: fsl-ssi: make fsl,mode property optional
Markus Pargmann [Tue, 27 May 2014 08:24:19 +0000 (10:24 +0200)]
ASoC: fsl-ssi: make fsl,mode property optional

The simple soundcard binding has its own way for specifying the dai
format. To be able to use this binding we have to make the fsl,mode
property optional. As the property is used in existing devicetrees
keep the option around for compatibility reasons.

Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: fsl-ssi: introduce SoC specific data
Sascha Hauer [Tue, 27 May 2014 08:24:18 +0000 (10:24 +0200)]
ASoC: fsl-ssi: introduce SoC specific data

Introduce a SoC data struct which contains the differences between
the different SoCs this driver supports. This makes it easy to support
more differences without having to introduce a new switch/case each
time.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Markus Pargmann <mpa@pengutronix.de>
Tested-By: Michael Grzeschik <mgr@pengutronix.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Intel: byt-rt5640: Use card PM ops from core
Jarkko Nikula [Mon, 26 May 2014 13:56:33 +0000 (16:56 +0300)]
ASoC: Intel: byt-rt5640: Use card PM ops from core

Use card PM ops from ASoC core instead of defining custom PM ops here since
we are calling anyway common suspend/resume callbacks.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Intel: Use devm_snd_soc_register_card
Jarkko Nikula [Wed, 28 May 2014 09:35:39 +0000 (12:35 +0300)]
ASoC: Intel: Use devm_snd_soc_register_card

Simplify byt-rt5640.c and haswell.c machine drivers by using
devm_snd_soc_register_card(). Remove also needless dev_set_drvdata()
from byt_rt5640_probe() since snd_soc_register_card() does it too.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Intel: remove duplicate headers
Andy Shevchenko [Mon, 26 May 2014 13:56:31 +0000 (16:56 +0300)]
ASoC: Intel: remove duplicate headers

A few files contain duplicate headers. This patch removes the second entry of
duplicate in each file under question.

There is no functional changes.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Cc: Liam Girdwood <liam.r.girdwood@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start
Jarkko Nikula [Mon, 26 May 2014 13:56:30 +0000 (16:56 +0300)]
ASoC: Intel: Clear stored Baytrail DSP DMA pointer before stream start

Stored DSP DMA pointer must be cleared before starting the stream since
PCM pointer callback sst_byt_pcm_pointer() can be called before pointer is
updated. In that case last position of previous stream was wronly returned.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: cs42l56: Fix new value argument in snd_soc_update_bits calls
Axel Lin [Fri, 23 May 2014 05:05:31 +0000 (13:05 +0800)]
ASoC: cs42l56: Fix new value argument in snd_soc_update_bits calls

The new value argument needs proper shift to match the mask bit fields.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Tested-by: Brian Austin <brian.austin@cirrus.com>
Acked-by: Brian Austin <brian.austin@cirrus.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Intel: byt/hsw: Add missing kthread_stop to error/cleanup path
Imre Deak [Fri, 30 May 2014 07:52:29 +0000 (10:52 +0300)]
ASoC: Intel: byt/hsw: Add missing kthread_stop to error/cleanup path

Baytrail and Haswell SST IPC don't stop the kernel thread in error and
cleanup path thus leaving orphan kernel thread behind in such a case.

Also while at it, fix one error path in sst-haswell-ipc.c that doesn't free
hsw->msg.

[Jarkko: I edited the commit log a little]
Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Intel: Add Baytrail byt-max98090 machine driver
Jarkko Nikula [Fri, 30 May 2014 12:16:43 +0000 (15:16 +0300)]
ASoC: Intel: Add Baytrail byt-max98090 machine driver

Add machine driver and ACPI probing for Baytrail SST with MAX98090 codec.

Jack detect code from Kevin Strasser <kevin.strasser@intel.com>, GPIO
resolving from Mika Westerberg <mika.westerberg@linux.intel.com> and fixes
and cleanups from Liam Girdwood <liam.r.girdwood@linux.intel.com>.

Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: tlv320aci3x: Fix custom snd_soc_dapm_put_volsw_aic3x() function
Peter Ujfalusi [Fri, 30 May 2014 13:47:41 +0000 (16:47 +0300)]
ASoC: tlv320aci3x: Fix custom snd_soc_dapm_put_volsw_aic3x() function

For some unknown reason the parameters for snd_soc_test_bits() were in wrong
order:
It was:
snd_soc_test_bits(codec, val, mask, reg); /* WRONG!!! */
while it should be:
snd_soc_test_bits(codec, reg, mask, val);

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
Cc: stable@vger.kernel.org
10 years agoALSA: Docs: Fix typo in tegra_hda doc.
Dylan Reid [Sat, 31 May 2014 02:15:47 +0000 (19:15 -0700)]
ALSA: Docs: Fix typo in tegra_hda doc.

The correct name of the third clock is hda2codec_2x.

Signed-off-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: firewire: Fix dependency on PCM and rawmidi
Takashi Iwai [Fri, 30 May 2014 08:15:58 +0000 (10:15 +0200)]
ALSA: firewire: Fix dependency on PCM and rawmidi

Now snd-firewire-lib supports rawmidi in addition to PCM, thus we need
to give a proper dependency.  For fixing and simplification, move the
selections of SND_PCM and SND_RAWMIDI into SND_FIREWIRE_LIB section.
Then each driver doesn't have to select them but only
SND_FIREWIRE_LIB.

Reported-by: Jim Davis <jim.epost@gmail.com>
Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda/analog - Fix silent output on ASUS A8JN
Takashi Iwai [Fri, 23 May 2014 07:21:06 +0000 (09:21 +0200)]
ALSA: hda/analog - Fix silent output on ASUS A8JN

ASUS A8JN with AD1986A codec seems following the normal EAPD in the
normal order (0 = off, 1 = on) unlike other machines with AD1986A.
Apply the workaround used for Toshiba laptop that showed the same
problem.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=75041
Cc: <stable@vger.kernel.org> [3.11+]
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: gus: remove checks for CONFIG_SND_DEBUG_ROM
Paul Bolle [Thu, 29 May 2014 16:58:25 +0000 (18:58 +0200)]
ALSA: gus: remove checks for CONFIG_SND_DEBUG_ROM

Checks for CONFIG_SND_DEBUG_ROM were added in v2.5.5 but a Kconfig
symbol SND_DEBUG_ROM was never added. These checks have always
evaluated to false. Remove them and the printk()s they hide.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agosound: remove checks for CONFIG_BCM_CS4297A_CSWARM
Paul Bolle [Thu, 29 May 2014 16:51:44 +0000 (18:51 +0200)]
sound: remove checks for CONFIG_BCM_CS4297A_CSWARM

Checks for CONFIG_BCM_CS4297A_CSWARM were added in v2.6.11. The related
Kconfig symbol was never added so these checks always evaluated to true.
Remove them.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoASoC: wm8804: Allow control of master clock divider in PLL generation
Daniel Matuschek [Thu, 29 May 2014 14:08:03 +0000 (15:08 +0100)]
ASoC: wm8804: Allow control of master clock divider in PLL generation

WM8804 can run with PLL frequencies of 256xfs and 128xfs for
most sample rates. At 192kHz only 128xfs is supported. The
existing driver selects 128xfs automatically for some lower
samples rates. By using an additional mclk_div divider, it
is now possible to control the behaviour. This allows using
256xfs PLL frequency on all sample rates up to 96kHz. It
should allow lower jitter and better signal quality. The
behavior has to be controlled by the sound card driver,
because some sample frequency share the same setting. e.g.
192kHz and 96kHz use 24.576MHz master clock. The only
difference is the MCLK divider.

Signed-off-by: Daniel Matuschek <daniel@matuschek.net>
Tested-by: Florian Meier <florian.meier@koalo.de>
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoALSA: hda - move some alc662 family machines to hda_pin_quirk table
Hui Wang [Thu, 29 May 2014 07:59:19 +0000 (15:59 +0800)]
ALSA: hda - move some alc662 family machines to hda_pin_quirk table

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: hda - move some alc269 family machines to hda_pin_quirk table
Hui Wang [Thu, 29 May 2014 07:59:18 +0000 (15:59 +0800)]
ALSA: hda - move some alc269 family machines to hda_pin_quirk table

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoRevert "ALSA: hda - drop def association and sequence from pinconf comparing"
Hui Wang [Thu, 29 May 2014 07:59:17 +0000 (15:59 +0800)]
Revert "ALSA: hda - drop def association and sequence from pinconf comparing"

This reverts commit c687200b9d4ef60042a50f7d942cfef120cc7bf1.

Dropping the def association and sequence from pinconf comparing is a
bit risky, It will introduce a greater risk of catching unwanted
machines.

And in addition, so far no BIOS experts give us an explicit answer
whether it makes senses to compare these two fields or not.

For safety reason, we revert this commit.

Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fireworks: small leak on error path
Dan Carpenter [Wed, 28 May 2014 16:42:46 +0000 (19:42 +0300)]
ALSA: fireworks: small leak on error path

There was a typo here so we return directly instead of freeing "hwinfo".

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fireworks: remove some stray checks
Dan Carpenter [Wed, 28 May 2014 16:42:02 +0000 (19:42 +0300)]
ALSA: fireworks: remove some stray checks

We checked "err" earlier.  These things seem to be left over code.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Tested-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: au1x00: Use resource_size instead of computation
Benoit Taine [Wed, 28 May 2014 15:14:06 +0000 (17:14 +0200)]
ALSA: au1x00: Use resource_size instead of computation

This issue was reported by coccicheck using the semantic patch
at scripts/coccinelle/api/resource_size.cocci

Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoASoC: Blackfin: ADAU1X81 eval board support
Lars-Peter Clausen [Tue, 27 May 2014 08:53:21 +0000 (10:53 +0200)]
ASoC: Blackfin: ADAU1X81 eval board support

This patch adds a ASoC machine driver to support the EVAL-ADAU1X81 board
connected to a Analog Devices BF5XX evaluation board.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Blackfin: ADAU1X61 eval board support
Lars-Peter Clausen [Tue, 27 May 2014 08:53:20 +0000 (10:53 +0200)]
ASoC: Blackfin: ADAU1X61 eval board support

This patch adds a ASoC machine driver to support the EVAL-ADAU1X61 board
connected to a Analog Devices BF5XX evaluation board.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Add ADAU1381/ADAU1781 audio CODEC support
Lars-Peter Clausen [Tue, 27 May 2014 08:53:19 +0000 (10:53 +0200)]
ASoC: Add ADAU1381/ADAU1781 audio CODEC support

This patch adds support for the Analog Devices ADAU1381 and ADAU1781 audio
CODECs. The device is a low-power, 24-bit stereo audio CODEC with multiple
analog inputs and outputs, two digital microphone inputs and an I2S interface.
The device can be controlled either using I2C or SPI. The main difference
between the two variants is that the ADAU1781 has a freely programmable SigmaDSP
processor, while the ADAU1381 has a fixed function wind noise reduction filter.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Add ADAU1361/ADAU1761 audio CODEC support
Lars-Peter Clausen [Tue, 27 May 2014 08:53:18 +0000 (10:53 +0200)]
ASoC: Add ADAU1361/ADAU1761 audio CODEC support

This patch adds support for the Analog Devices ADAU1361 and ADAU1761 CODECs.
The device is a a low-power, 24-bit stereo audio CODEC with multiple analog
input and outputs, one digital microphone input and an I2S interface. The device
can be controlled either via I2C or SPI. The main difference between the two
variants is that the ADAU1761 has a built-in SigmaDSP, while the ADAU1361 has
not.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoASoC: Add ADAU1X61 and ADAU1X81 CODECs common code
Lars-Peter Clausen [Tue, 27 May 2014 08:53:17 +0000 (10:53 +0200)]
ASoC: Add ADAU1X61 and ADAU1X81 CODECs common code

The ADAU1X61 and ADAU1X81 are very similar in the digital domain, but are quite
different in the analog domain. This patch adds support for the common parts of
the ADAU1X61 and ADAU1X81 CODECs.

The patch also restores some of the alphabetical order in the Makfile and
Kconfig.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@linaro.org>
10 years agoMerge branch 'topic/firewire' into for-next
Takashi Iwai [Tue, 27 May 2014 15:38:08 +0000 (17:38 +0200)]
Merge branch 'topic/firewire' into for-next

This is a merge of big firewire audio stack updates by Takashi Sakamoto.

10 years agoALSA: bebob: Improve comments about stream format
Takashi Sakamoto [Tue, 27 May 2014 15:14:47 +0000 (00:14 +0900)]
ALSA: bebob: Improve comments about stream format

Currently bebob driver apply Raw Audio Data channel (in IEC 61883-1:2002,
Multi Bit Linear Audio Data channel in IEC 61883-6:20005) to IEC 60958
Conformant Data channel because both fireworks and bebob based devices
can handle it by ignoring each label.

This patch improves a comment about this.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: bebob: Remove meaningless mutex_unlock()
Takashi Sakamoto [Tue, 27 May 2014 15:14:46 +0000 (00:14 +0900)]
ALSA: bebob: Remove meaningless mutex_unlock()

Currently mutex_unlock() is called in module's cleanup function. But after
cleaned up, this mutex is automatically released. So this function call
is meaningless.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: bebob: Add static specifier to identifier with file scope
Takashi Sakamoto [Tue, 27 May 2014 15:14:45 +0000 (00:14 +0900)]
ALSA: bebob: Add static specifier to identifier with file scope

Some variables were declared without static even if they're not referred
to from external files. This commit make them local symbols for better
information-hiding by file unit.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: bebob: Use different names for identifiers in the same file
Takashi Sakamoto [Tue, 27 May 2014 15:14:44 +0000 (00:14 +0900)]
ALSA: bebob: Use different names for identifiers in the same file

To suppress 'sparse' warning.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fireworks/bebob: Improve indentation
Takashi Sakamoto [Tue, 27 May 2014 15:14:43 +0000 (00:14 +0900)]
ALSA: fireworks/bebob: Improve indentation

According to coding rule.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fireworks/bebob: Add suffix for long long integer literal
Takashi Sakamoto [Tue, 27 May 2014 15:14:42 +0000 (00:14 +0900)]
ALSA: fireworks/bebob: Add suffix for long long integer literal

This commit adds suffix to register values of each device, to supress 'sparse'
warnings. Additionally, this commit changes offset values with integer literal.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
10 years agoALSA: fireworks/bebob: Use the same type of variables as function parameters
Takashi Sakamoto [Tue, 27 May 2014 15:14:41 +0000 (00:14 +0900)]
ALSA: fireworks/bebob: Use the same type of variables as function parameters

The second argument of snd_efw_command_get_sampling_rate() means sampling
rate and its type is 'unsigned int'. But 'int' variable is passed as parameter.
It's better to apply the same type for the variable as its argument.

Similally, the type of variable for snd_efw_command_get_clock_source() and
avc_bridgeco_get_plug_type() should be the same type as each argument.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>