Commit graph

26096 commits

Author SHA1 Message Date
Kuninori Morimoto
d9fc40639d ASoC: core: replace codec_dev_list to component_dev_list on Card
Current Card has Codec list (= codec_dev_list), but Codec will be
removed in the future. Because of this reason, this patch adds
new Component list in Card, and replace Codec list.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-12-01 20:09:34 +00:00
Chen-Yu Tsai
4a15b24a65 ASoC: sun4i-codec: Add support for H3 codec
The codec on the H3 is similar to the one found on the A31. One key
difference is the analog path controls are routed through the PRCM
block. This is supported by the sun8i-codec-analog driver, and tied
into this codec driver with the audio card's aux_dev.

In addition, the H3 has no HP (headphone) and HBIAS support, and no
MIC3 input. The FIFO related registers are slightly rearranged.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 18:06:51 +00:00
Chen-Yu Tsai
dac5f86bc9 ASoC: sun4i-codec: Add support for A23 codec
The codec in the A23 is similar to the one found on the A31. One key
difference is the analog path controls are routed through the PRCM
block. This is supported by the sun8i-codec-analog driver, and tied
into this codec driver with the audio card's aux_dev.

In addition, the A23 does not have LINEOUT, and it does not support
headset jack detection or buttons.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 18:06:18 +00:00
Takashi Iwai
fee3244cd1 ASoC: cht_bsw_rt5672: Use HID translation unit
Instead of hard-coded "i2c-10EC5670:00", use the translation helper to
avoid the mismatch between i2c-codec and ACPI strings just like what
we've done for bytcr_rt5640.  This gives more robust binding on funky
devices like Dell Wyse 3040.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 18:00:59 +00:00
Takashi Iwai
2fc995a87f ASoC: intel: Fix crash at suspend/resume without card registration
When ASoC Intel SST Medfield driver is probed but without codec / card
assigned, it causes an Oops and freezes the kernel at suspend/resume,

 PM: Suspending system (freeze)
 Suspending console(s) (use no_console_suspend to debug)
 BUG: unable to handle kernel NULL pointer dereference at 0000000000000018
 IP: [<ffffffffc09d9409>] sst_soc_prepare+0x19/0xa0 [snd_soc_sst_mfld_platform]
 Oops: 0000 [#1] PREEMPT SMP
 CPU: 0 PID: 1552 Comm: systemd-sleep Tainted: G W 4.9.0-rc6-1.g5f5c2ad-default #1
 Call Trace:
  [<ffffffffb45318f9>] dpm_prepare+0x209/0x460
  [<ffffffffb4531b61>] dpm_suspend_start+0x11/0x60
  [<ffffffffb40d3cc2>] suspend_devices_and_enter+0xb2/0x710
  [<ffffffffb40d462e>] pm_suspend+0x30e/0x390
  [<ffffffffb40d2eba>] state_store+0x8a/0x90
  [<ffffffffb43c670f>] kobj_attr_store+0xf/0x20
  [<ffffffffb42b0d97>] sysfs_kf_write+0x37/0x40
  [<ffffffffb42b02bc>] kernfs_fop_write+0x11c/0x1b0
  [<ffffffffb422be68>] __vfs_write+0x28/0x140
  [<ffffffffb43728a8>] ? apparmor_file_permission+0x18/0x20
  [<ffffffffb433b2ab>] ? security_file_permission+0x3b/0xc0
  [<ffffffffb422d095>] vfs_write+0xb5/0x1a0
  [<ffffffffb422e3d6>] SyS_write+0x46/0xa0
  [<ffffffffb4719fbb>] entry_SYSCALL_64_fastpath+0x1e/0xad

Add proper NULL checks in the PM code of mdfld driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Cc: <stable@vger.kernel.org>
2016-11-30 17:58:53 +00:00
John Hsu
2263fddcd0 ASoC: nau8825: lock longer to avoid playback pop upon resume
There is an issue about pop noise in NAU88L25 as follows.
Issue 54078: Chell_headphone pop back from S3
(1)Play directly to hw, bypassing CRAS:
sox -b 16 -n -t alsa hw:0,0 synth sine 200 sine 200
(2)Close lid or powerd_dbus_suspend, then press a key to resume.
(3)no audio after resume
(4)Audio will be back after close then reopen the pcm device.

After verification, we find one defect is that semaphone lock is not
long enough and expired. In this situation, the playback comes back
early but pauses a while to wait for the crosstalk detection done.
But the detection spends too much time and lock time is up. Therefore,
the playback and jack detection sequence interfere to each other.
That breaks sequence and makes noise. The driver extends the lock
time for the issue.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 17:42:52 +00:00
Takashi Iwai
786e1c3719 ASoC: intel: Replace kthread with work
The usage pattern of kthread worker in Intel SST drivers can be
replaced gracefully with the normal workqueue, which is more light-
weight and easier to manage in general.  Let's do it.

While in the replacement, move the schedule_work() call inside the
spinlock for excluding the race, too.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Subhransu S. Prusty <subhransu.s.prusty@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 17:41:13 +00:00
Richard Fitzgerald
35f4403edb ASoC: arizona: Use component pin control functions
We need to modify the state of some of our own pins and are currently
not taking account that the pin name may have a name_prefix applied
to it.

Replace the snd_soc_dapm_x_pin functions with the equivalent
snd_soc_component_x_pin functions so that any name_prefix will be
handled automatically.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 17:24:11 +00:00
Mark Brown
19a113ae59 Merge branch 'topic/dapm-pin' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-arizona 2016-11-30 17:23:38 +00:00
Richard Fitzgerald
1b4d9c2219 ASoC: core: Add component pin control functions
It's often the case that a codec driver will need to control its
own pins. However, if a name_prefix has been applied to this codec it
must be included in the name passed to any of the snd_soc_dapm_x_pin()
functions.

The behaviour of the existing pin control functions is reasonable, since
you may want to search for a fully-specified name within the scope of an
entire card. This means that we can't apply the prefix in these functions
because it will break card-scope searches.

Constructing a prefixed string "manually" in codec drivers leads to a lot
of repetition of the same code.

To make this tidier in codec drivers this patch adds a new set of
equivalent functions that take a struct snd_soc_component instead of a
dapm context and automatically add the component's name_prefix to the
given name. This makes it a simple change in codec drivers to be
prefix-safe.

The new functions are not quite trivial enough to be inlines and the
compiler won't be able to compile-away any part of them.

Although it looks somewhat inefficient to have to allocate a temporary
buffer and combine strings, the current design of the widget list
doesn't lend itself to a more optimized implementation - it's a single
list of all widgets on a card and is searched linearly for a matching
string. As pin state changes are generally low-frequency events it's
unlikely to be a significant issue - at least not enough to rewrite the
widget list handling just for this.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 17:16:09 +00:00
Takashi Iwai
d252800608 ASoC: rt5670: Add missing 10EC5072 ACPI ID
rt5670 driver supports also RT5672 codec, but its ACPI ID is missing.
This was found on Dell Wyse 3040 box.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 16:24:35 +00:00
Takashi Iwai
b4ff47d284 ASoC: rt5670: Enable Braswell platform workaround for Dell Wyse 3040
Dell Wyse 3040 requires the platform workaround for enabling dmic and
jack detection as defined for Braswell CRB.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 16:24:13 +00:00
Takashi Iwai
6648eb8666 ASoC: Intel: Add missing 10EC5672 ACPI ID matching for Cherry Trail
Add the missing ACPI ID 10EC5672 for Cherry Trail, which bounds with
cht-bsw-rt5672 driver.  This combination was found on Dell Wyse 3040.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-30 16:23:28 +00:00
Dave Airlie
6320745596 drm/virtio: fix busid in a different way, allocate more vbufs.
drm/qxl: various bugfixes and cleanups,
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJYMzLfAAoJEEy22O7T6HE41rIQANAEl/o8cYUoyYTJlhmmnl2U
 K+QBdr7PACdbr8RZrGpwA5ad9ZJGijpZRd2gThrzNS0JBdZI48gPEzU7V206xlyD
 AriBeAu6IkoBTEl+GGx2DfvOdLR6+7KlIrDYIpl2vILgkqlHhneXdHR3R03byRHG
 2Jrxv2YQxCs8swtAb8FRkVNaUgrfkKOKFFlx1LoLFApYeP02oSxZp0Ve4nuRNj7x
 9DCivIw4NyQ9tY1fORapmrEPTerqZnzYdb9RFSv4xilx4Stq1UWdXfTSpwXZHZaG
 VroXZb1I0fZEk1aapIxuzLZFGNSM7wLET/nK02sSvzxJJv2PiyVAabIo70nUqsQK
 H/iGT2g4MZC1Yvz6evENtckbiA1p3F9jnd+Po9ivDY/RrTpND3hVC2WbcOXWxZkb
 m69muvXfrnZwoF9xWPG8aTrCATim++1Ty8/8LoKdVq1d0Dp/Gzk8KnklBPY2vRFt
 dpxqH3jLgED/QcO5W/yQdf0kPRsrNwKFNLqP9bCF2hMIw1VHHddZtnBBXDGATXYq
 hdFA8EEg3gh/kY7V8b+GyxjRKRbveG208hu+H4EirxHmRn5xJN1VoTLk9va+AJL1
 I30l4USLDkTgf1AjYmk7yFIUTemCtwjfa0lsuu4l3rRJ3k1eBrtZe2cpWv2BoQDU
 by0sNnDelzJTQ9/v1i3J
 =OYiT
 -----END PGP SIGNATURE-----

Merge tag 'drm-qemu-20161121' of git://git.kraxel.org/linux into drm-next

drm/virtio: fix busid in a different way, allocate more vbufs.
drm/qxl: various bugfixes and cleanups,

* tag 'drm-qemu-20161121' of git://git.kraxel.org/linux: (224 commits)
  drm/virtio: allocate some extra bufs
  qxl: Allow resolution which are not multiple of 8
  qxl: Don't notify userspace when monitors config is unchanged
  qxl: Remove qxl_bo_init() return value
  qxl: Call qxl_gem_{init, fini}
  qxl: Add missing '\n' to qxl_io_log() call
  qxl: Remove unused prototype
  qxl: Mark some internal functions as static
  Revert "drm: virtio: reinstate drm_virtio_set_busid()"
  drm/virtio: fix busid regression
  drm: re-export drm_dev_set_unique
  Linux 4.9-rc5
  gp8psk: Fix DVB frontend attach
  gp8psk: fix gp8psk_usb_in_op() logic
  dvb-usb: move data_mutex to struct dvb_usb_device
  iio: maxim_thermocouple: detect invalid storage size in read()
  aoe: fix crash in page count manipulation
  lightnvm: invalid offset calculation for lba_shift
  Kbuild: enable -Wmaybe-uninitialized warnings by default
  pcmcia: fix return value of soc_pcmcia_regulator_set
  ...
2016-11-30 14:18:51 +10:00
Takashi Iwai
4763601a56 ALSA: usb-audio: Fix bogus error return in snd_usb_create_stream()
The function returns -EINVAL even if it builds the stream properly.
The bogus error code sneaked in during the code refactoring, but it
wasn't noticed until now since the returned error code itself is
ignored in anyway.  Kill it here, but there is no behavior change by
this patch, obviously.

Fixes: e5779998bf ('ALSA: usb-audio: refactor code')
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-29 22:28:40 +01:00
Andrej Krutak
fc90172ba2 ALSA: line6: Claim pod x3 usb data interface
Userspace apps have to claim USB interfaces before using endpoints in
them (drivers/usb/core/devio.c:checkintf()). It's a lock mechanism so
that two "drivers" don't steal data from each other. Kernel drivers don't
have to claim interfaces to work - but they should, to lock out userspace.

While there, fix line6_properties struct to match checkpatch.pl.

Signed-off-by: Andrej Krutak <dev@andree.sk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-29 22:16:14 +01:00
Pan Bian
e59d8bb574 ALSA: echoaudio: Fix improper return value in function load_asic
When the second call to load_asic_generic() fails in function
load_asic(), "false" is returned. The real value of "false" is 0, which
indicates success in the context. As a result, the execution status and
the return value may be inconsistent. This patch fixes the bug.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=188761
Signed-off-by: Pan Bian <bianpan2016@163.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-29 19:59:57 +01:00
Bard Liao
e3d62cb8c7 ASoC: rt298: disable IRQ when jack is NULL
Disable IRQ when jack is NULL in rt298_mic_detect. So machine driver
can use it in suspend/resume.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Reviewed-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-29 11:36:27 +00:00
Takashi Iwai
91197a9230 ASoC: Intel: atom: Make some messages to debug level
Intel sst driver spews lots of kernel messages in INFO level;
typically, it gives a kernel message at each time it allocates or
frees a stream, or at each time when a stream is started or stopped.
This will piles up quickly, and it's almost useless for normal users,
so let's hide them to KERN_DEBUG level.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-29 11:34:13 +00:00
Charles Keepax
63079b6e43 ASoC: wm_adsp: Remove redundant extern declarations
Functions are given external linkage by default making the extern's
unnecessary, as such remove them.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-29 11:02:34 +00:00
Charles Keepax
739507159e ASoC: arizona: Remove redundant extern declarations
Functions are given external linkage by default making the extern's
unnecessary, as such remove them.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-29 11:02:33 +00:00
Kailang Yang
c6790c8e77 ALSA: hda/realtek - Add support for headset MIC for ALC622
Add headset MIC support for ALC622 of USI platform.
It only support headset of iphone type.

Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-29 08:20:28 +01:00
Takashi Iwai
55d2b19071 Merge branch 'for-linus' into for-next 2016-11-29 08:20:13 +01:00
Linus Torvalds
96e52d3ac8 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Pull sparc fixes from David Miller:
 "Two ugly build warning fixes"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  dbri: Fix compiler warning
  qlogicpti: Fix compiler warnings
2016-11-28 13:53:19 -08:00
Tushar Dave
16f46050e7 dbri: Fix compiler warning
dbri uses 'u32' for dma handle while invoking kernel DMA APIs,
instead of using dma_addr_t. This hasn't caused any 'incompatible
pointer type' warning on SPARC because until now dma_addr_t is of
type u32. However, recent changes in SPARC ATU (iommu) enabled 64bit
DMA and therefore dma_addr_t became of type u64. This makes
'incompatible pointer type' warnings inevitable.

e.g.
sound/sparc/dbri.c: In function ‘snd_dbri_create’:
sound/sparc/dbri.c:2538: warning: passing argument 3 of ‘dma_zalloc_coherent’ from incompatible pointer type
./include/linux/dma-mapping.h:608: note: expected ‘dma_addr_t *’ but argument is of type ‘u32 *’

For the record, dbri(sbus) driver never executes on sun4v. Therefore
even though 64bit DMA is enabled on SPARC, dbri continues to use
legacy iommu that guarantees DMA address is always in 32bit range.

This patch resolves above compiler warning.

Signed-off-by: Tushar Dave <tushar.n.dave@oracle.com>
Reviewed-by: thomas tai <thomas.tai@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2016-11-28 15:51:31 -05:00
Sven Hahne
b5337cfe06 ALSA: hda/ca0132 - Add quirk for Alienware 15 R2 2016
I'm using an Alienware 15 R2 and had to use the alienware quirks to
get my headphone output working.

I fixed it by adding, SND_PCI_QUIRK(0x1028, 0x0708, "Alienware 15 R2
2016", QUIRK_ALIENWARE) to the patch.

Signed-off-by: Sven Hahne <hahne@zeitkunst.eu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-25 14:17:38 +01:00
GuruprasadX Pawse
48458cc891 ASoC: Intel: Skylake: Removed the unused I2S blob structure
Now that I2S conflig blob structure is no longer in use, remove it.

Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-25 13:08:48 +00:00
GuruprasadX Pawse
c186fe7401 ASoC: Intel: Skylake: Don't use dma I2S config structure in kernel
I2S blob config structure can change between DSP copier module versions.
We are not modifying these structures anyway and NHLT blobs specify them
properly, so use the blob directly to send the dma_control ipc instead
of using the predefined I2S blob config structure.

Signed-off-by: GuruprasadX Pawse <guruprasadx.pawse@intel.com>
Signed-off-by: Jeeja KP <jeeja.kp@intel.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-25 13:08:35 +00:00
Dan Carpenter
999982ef7c ASoC: sunxi: Uninitialized variable in probe()
Oddly enough, my version of GCC misses this uninitialized variable.

Fixes: ba2ff3027b ("ASoC: sunxi: Add support for A23/A33/H3 codec's analog path controls")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-24 10:51:18 +00:00
Hui Wang
989dbe4a30 ALSA: hda - fix headset-mic problem on a Dell laptop
This group of new pins is not in the pin quirk table yet, adding
them to the pin quirk table to fix the headset-mic problem.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-24 11:37:45 +01:00
Hui Wang
64047d7f49 ALSA: hda - ignore the assoc and seq when comparing pin configurations
More and more pin configurations have been adding to the pin quirk
table, lots of them are only different from assoc and seq, but they
all apply to the same QUIRK_FIXUP, if we don't compare assoc and seq
when matching pin configurations, it will greatly reduce the pin
quirk table size.

We have tested this change on a couple of Dell laptops, it worked
well.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-24 11:37:34 +01:00
Lars-Peter Clausen
0a69516cd8 ASoC: ab8500: Remove explicit initialization of driver callbacks to NULL
Fields of structs with global storage are implicitly initialized to 0/NULL,
there is usually no need to do this explicitly.

Removing the initialization of the legacy suspend/resume callback fields
also gets the driver ready for the day when they are eventually removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-23 12:41:58 +00:00
Lars-Peter Clausen
222e728ca2 ASoC: uda1380: Request GPIOs at bus probe time
Resources should be requested when the device is probed on the control bus
rather then when the CODEC is bound to the sound card. This allows things
like probe deferring and device managed allocations to work.

So move the GPIO request calls from the CODEC probe to the bus probe and
also make them managed along the way.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-23 12:30:55 +00:00
Lars-Peter Clausen
4185d4be22 ASoC: uda1380: Remove unused DAI ID defines
The DAI ID defines are back from the time when DAIs were referenced by a
numerical ID. These days a string is used for matching instead and the
defines are unused. The last user of these defines was removed in commit
f0fba2ad1b ("ASoC: multi-component - ASoC Multi-Component Support"). So
remove the defines as well.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-23 12:30:55 +00:00
Charles Keepax
48c2c99359 ASoC: wm_adsp: Check return value from wm_adsp_buffer_init
We are not checking the return value from a call to wm_adsp_buffer_init
it looks like this used to be returned at the bottom of the function but
probably got missed when more error paths were added. This patch adds
the appropriate error check.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 18:41:33 +00:00
Chen-Yu Tsai
ba2ff3027b ASoC: sunxi: Add support for A23/A33/H3 codec's analog path controls
The internal codec on A23/A33/H3 is split into 2 parts. The
analog path controls are routed through an embedded custom register
bus accessed through the PRCM block.

The SoCs share a common set of inputs, outputs, and audio paths.
The following table lists the differences.

    ----------------------------------------
    | Feature \ SoC |  A23  |  A33  |  H3  |
    ----------------------------------------
    | Headphone     |   v   |   v   |      |
    ----------------------------------------
    | Line Out      |       |       |  v   |
    ----------------------------------------
    | Phone In/Out  |   v   |   v   |      |
    ----------------------------------------

Add an ASoC component driver for it. This should be tied to the codec
audio card as an auxiliary device. This patch adds the commont paths
and controls, and variant specific headphone out and line out.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 17:59:27 +00:00
Kuninori Morimoto
4821d914fe ASoC: rsnd: use dma_sync_single_for_xxx() for IOMMU
IOMMU needs DMA mapping function to use it. One solution is that
we can use DMA mapped dev on snd_pcm_lib_preallocate_pages_for_all()
for SNDRV_DMA_TYPE_DEV. But pcm_new and dma map timing are mismatched.
Thus, this patch uses SNDRV_DMA_TYPE_CONTINUOUS for pcm_new,
and use dma_sync_single_for_xxx() for each transfer.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 17:25:52 +00:00
Kuninori Morimoto
edce5c496c ASoC: rsnd: Request/Release DMA channel each time
Current Renesas Sound driver requests DMA channel when .probe timing,
and release it when .remove timing. And use DMA on .start/.stop
But, Audio DMAC power ON was handled when request timing (= .probe),
and power OFF was when release timing (= .remove).
This means Audio DMAC power is always ON during driver was enabled.
The best choice to solve this issue is that DMAEngine side handle
this. But current DMAEngine API design can't solve atmic/non-atmic
context issue for power ON/OFF. So next better choice is sound
driver request/release DMA channel each time. This patch do it

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 17:25:52 +00:00
Richard Fitzgerald
1db51e6fb0 ASoC: wm_adsp: Remove unused wm_coeff_ctl.kcontrol
The kcontrol pointer in wm_coeff_ctl is not used now.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 17:24:43 +00:00
Richard Fitzgerald
685f51a5eb ASoC: wm_adsp: Firmware controls should be added as codec controls
We were adding firmware controls as card controls (using
snd_soc_add_codec_controls). The DSP is part of a specific codec so
we should be adding them as codec controls. Adding as codec controls
also means that if the codec has a name_prefix it will be added to
the control name, which won't happen when adding as a card control.

As that was the only use of the card pointer in struct wm_adsp it can
be removed.

For ADSP2 codecs a wm_adsp2_codec_probe() was added since the original
control handling was written, and that's the logical place to store a
pointer to the codec rather than delaying it until the codec is
powered-up.

For ADSP1 we don't use a codec_probe() stage so the codec pointer
initialization replaces the original card pointer initialization in
wm_adsp1_event().

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 17:24:43 +00:00
Takashi Iwai
a823a17981 ASoC: cht_bsw_rt5645: Fix leftover kmalloc
cht_bsw_rt5645 driver allocates the own codec_id string but doesn't
release it.  For simplicity, put the string in cht_mc_private; then
the string is allocated in a shot and released altogether.

Fixes: c8560b7c91 ("ASoC: cht_bsw_rt5645: Fix writing to string literal")
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 17:22:38 +00:00
Krzysztof Kozlowski
95f5609d22 ASoC: samsung: Enable COMPILE_TEST for SmartQ and WM8580
The I2S sound drivers for SmartQ board and WM8580 codec can be compile
tested to increase build coverage.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 16:49:01 +00:00
Krzysztof Kozlowski
a41dcdeee5 ASoC: samsung: Enable COMPILE_TEST for entire Samsung ASoc
Instead of build time, Samsung ASoC drivers have rather runtime
dependency on Exynos or other Samsung platforms.  For building they
require Common Clock Framework.  If it is provided they could be compile
tested to increase build coverage.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 16:48:46 +00:00
Krzysztof Kozlowski
cd9e2b6276 ASoC: samsung: smdk_wm8580: Remove old platforms and drop mach-types usage
MACH_SMDKC100, MACH_SMDKV210 and MACH_SMDKC110 are no longer supported
so we can drop the dead code.  After this the driver no longer
differentiates between machines (S3C24xx machines are not supported by
it) so there is no need to override I2S device id in cpu_dai_name and
SEC_PLAYBACK dai_link can be removed as well.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 16:48:46 +00:00
Krzysztof Kozlowski
f8cbab42d9 ASoC: samsung: Remove non-existing MACH dependencies
MACH_SMDKC100 was removed in commit b8529ec1c1 ("ARM: S5PC100: no more
support S5PC100 SoC"). MACH_SMDKV210 and MACH_SMDKC110 in commit
28c8331d38 ("ARM: S5PV210: Remove support for board files").

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 16:48:46 +00:00
Lars-Peter Clausen
852801417a ASoC: Make return type of dpcm_state_string() const char *
dpcm_state_string() returns a pointer to a string literal. Modifying a
string literal causes undefined behaviour. So make the return type of the
function const char * to make it explicit that the returned value should
not be modified.

This patch is purely cosmetic, none of the users of dpcm_state_string()
attempt to modify the returned content.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 16:45:46 +00:00
Kuninori Morimoto
60bc6173e0 ASoC: wm8580: Remove #if IS_ENABLED(CONFIG_I2C)
wm8580 driver doesn't work without CONFIG_I2C anyway.
Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-22 16:27:59 +00:00
Kuninori Morimoto
f196e9ac07 ASoC: wm8523: Remove #if IS_ENABLED(CONFIG_I2C)
wm8523 driver doesn't work without CONFIG_I2C anyway.
Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-21 19:19:13 +00:00
Charles Keepax
87aa637462 ASoC: wm_adsp: Only write shutdown controls for active firmwares
The control list may contain shutdown controls for firmwares that are
not currently active, attempting to write this will at best fail. To
avoid this issue we skip any control that is not active.

Fixes: commit f4f0c4c60c ("ASoC: wm_adsp: Signal firmware shutdown
                             through event control")
Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-21 18:20:53 +00:00
Linus Torvalds
c1717701be sound fixes for 4.9-rc6
Three trivial fixes: a regression fix for ASRock mobo, a
 use-after-free fix at hot-unplug of USB-audio, and a quirk for new
 Thinkpad models.
 -----BEGIN PGP SIGNATURE-----
 
 iQIrBAABCAAVBQJYLsqoDhx0aXdhaUBzdXNlLmRlAAoJEGwxgFQ9KSmkF+gQAIyL
 IJROXA6MWSHMaUUa0zToCBYscF+Z1CXavqLkBVGpaMGLM9m4CLkWavmxIIJkfr/1
 XDTDgu6fvDQ0mRBSp3VnxKZGGf0V9fvdODWD7ueCZNHgdNMxMCMwAPaZwTJVk41L
 1W/OfJG/w059L7zY0ZQ05zNphF9noav8Qdb685QdXY5brD92KbGs4TYNHl/D4bw7
 rkT/dcLAxKfSg3Bnwi0Dong5MmXSH+IqvaapHVlhoBkHala5iHZS4URZKS2JgdUl
 nbHFY1kDK5DBN4hHixrRMWqf6MP+ASA/zdEFUeQzoZ9mo/oYjbHURr63+chYkj5I
 Y3yzn4YOEL9O+SdShRYdr6YCHpIJzuvwZCwIPLUlnXrqHoeJPkBnb4J8JiMmqm7O
 F/REdLJoUldqEp3UhBePSSg53UI9qceB1QMYk8YIQy0yyom20uBuQ4GbXnyKQrLl
 MpRb8sfh1GATaTfEshqH+52t7taRPv9VPtGAmDHOLYpcmWhfrJ7Kc6Mh60yTJJbd
 91V4lNib8fV3eqWsW5+l25xzMku8FSIQHgUtG4zW2uOVD3lQiuYS6L8jYiBBApas
 Tgvuowh3Y0toDDH5VTAtorUzYEKF203uqOytey3SgVyTz4lErrzdp+JyaeobGhHv
 BIZKgV1Q00r+FNi7LC4thS9K6yvXLtXPc2mI4OMu
 =aKgB
 -----END PGP SIGNATURE-----

Merge tag 'sound-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Three trivial fixes:

  A regression fix for ASRock mobo, a use-after-free fix at hot-unplug
  of USB-audio, and a quirk for new Thinkpad models"

* tag 'sound-4.9-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: usb-audio: Fix use-after-free of usb_device at disconnect
  ALSA: hda - Fix mic regression by ASRock mobo fixup
  ALSA: hda - add a new condition to check if it is thinkpad
2016-11-18 08:56:47 -08:00
Kuninori Morimoto
e2d575918b ASoC: wm9081: Remove #if IS_ENABLED(CONFIG_I2C)
wm9081 driver doesn't work without CONFIG_I2C anyway.
Let's remove #if IS_ENABLED(CONFIG_I2C)

And, this patch adds "depends on I2C" to Kconfig

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-18 12:07:19 +00:00
Kuninori Morimoto
4a5cf1320a ASoC: uda1380: Remove #if IS_ENABLED(CONFIG_I2C)
uda1380 driver doesn't work without CONFIG_I2C anyway.
Let's remove #if IS_ENABLED(CONFIG_I2C), and use module_i2c_driver().

And, this patch adds "depends on I2C" to Kconfig

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-18 12:05:47 +00:00
Takashi Sakamoto
2e57069c86 ALSA: bebob: compare whole string for model name so that readers are not confused
A modalias of 'ieee1394:ven00000D6Cmo00010060sp' hits units for M-Audio
FireWire Audiophile only. However the unit has two states relevant to
loaded firmware. Initial firmware returns 'FW Audiophile Bootloader',
while functional firmware returns 'FW Audiophile'.

ALSA bebob driver compares the units' model name to strings of 24 characters
by the first 15 characters. This is shorter way to differentiate these two
states but confusing to readers.

This commit improves the code for this point. Kernel stack is consumed more in
call of check_audiophile_booted() by a bit.

With initial firmware:
$ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom
               ROM header and bus information block
               -----------------------------------------------------------------
400  04276da6  bus_info_length 4, crc_length 39, crc 28070
404  31333934  bus_name "1394"
408  006481f2  irmc 0, cmc 0, isc 0, bmc 0, pmc 0, cyc_clk_acc 100,
               max_rec 8 (512), max_rom 1, gen 15, spd 2 (S400)
40c  000d6c03  company_id 000d6c     |
410  102b7e2e  device_id 03102b7e2e  | EUI-64 000d6c03102b7e2e

               root directory
               -----------------------------------------------------------------
414  00067414  directory_length 6, crc 29716
418  0c0083c0  node capabilities per IEEE 1394
41c  03000d6c  vendor
420  81000009  --> descriptor leaf at 444
424  17010060  model
428  8100000c  --> descriptor leaf at 458
42c  d1000001  --> unit directory at 430

               unit directory at 430
               -----------------------------------------------------------------
430  00049da1  directory_length 4, crc 40353 (should be 48611)
434  1200a02d  specifier id: 1394 TA
438  13014001  version: Vender Unique and AV/C
43c  17010060  model
440  8100000f  --> descriptor leaf at 47c

               descriptor leaf at 444
               -----------------------------------------------------------------
444  0004073e  leaf_length 4, crc 1854
448  00000000  textual descriptor
44c  00000000  minimal ASCII
450  4d2d4155  "M-AU"
454  44494f00  "DIO"

               descriptor leaf at 458
               -----------------------------------------------------------------
458  00086f21  leaf_length 8, crc 28449
45c  00000000  textual descriptor
460  00000000  minimal ASCII
464  46572041  "FW A"
468  7564696f  "udio"
46c  7068696c  "phil"
470  6520426f  "e Bo"
474  6f746c6f  "otlo"
478  61646572  "ader"

               descriptor leaf at 47c
               -----------------------------------------------------------------
47c  00086f21  leaf_length 8, crc 28449
480  00000000  textual descriptor
484  00000000  minimal ASCII
488  46572041  "FW A"
48c  7564696f  "udio"
490  7068696c  "phil"
494  6520426f  "e Bo"
498  6f746c6f  "otlo"
49c  61646572  "ader"

With functional firmware:
$ ./linux-firewire-utils/src/crpp < /sys/bus/firewire/devices/fw1/config_rom
               ROM header and bus information block
               -----------------------------------------------------------------
400  042de16f  bus_info_length 4, crc_length 45, crc 57711
404  31333934  bus_name "1394"
408  f0648122  irmc 1, cmc 1, isc 1, bmc 1, pmc 0, cyc_clk_acc 100,
               max_rec 8 (512), max_rom 1, gen 2, spd 2 (S400)
40c  000d6c03  company_id 000d6c     |
410  002b7e2e  device_id 03002b7e2e  | EUI-64 000d6c03002b7e2e

               root directory
               -----------------------------------------------------------------
414  0009dac4  directory_length 9, crc 56004
418  0400000d  hardware version
41c  0c0083c0  node capabilities per IEEE 1394
420  03000d6c  vendor
424  81000012  --> descriptor leaf at 46c
428  17010060  model
42c  81000015  --> descriptor leaf at 480
430  13ffffff  version
434  d1000002  --> unit directory at 43c
438  d4000006  --> dependent info directory at 450

               unit directory at 43c
               -----------------------------------------------------------------
43c  00041eb9  directory_length 4, crc 7865
440  1200a02d  specifier id: 1394 TA
444  13014001  version: Vender Unique and AV/C
448  17010060  model
44c  81000014  --> descriptor leaf at 49c

               dependent info directory at 450
               -----------------------------------------------------------------
450  000637c7  directory_length 6, crc 14279
454  120007f5  specifier id
458  13000001  version
45c  3affffc7  (immediate value)
460  3b100000  (immediate value)
464  3cffffc7  (immediate value)
468  3d600000  (immediate value)

               descriptor leaf at 46c
               -----------------------------------------------------------------
46c  0004b8e4  leaf_length 4, crc 47332
470  00000000  textual descriptor
474  00000000  minimal ASCII
478  4d2d4175  "M-Au"
47c  64696f00  "dio"

               descriptor leaf at 480
               -----------------------------------------------------------------
480  0006194b  leaf_length 6, crc 6475
484  00000000  textual descriptor
488  00000000  minimal ASCII
48c  46572041  "FW A"
490  7564696f  "udio"
494  7068696c  "phil"
498  65000000  "e"

               descriptor leaf at 49c
               -----------------------------------------------------------------
49c  0006194b  leaf_length 6, crc 6475
4a0  00000000  textual descriptor
4a4  00000000  minimal ASCII
4a8  46572041  "FW A"
4ac  7564696f  "udio"
4b0  7068696c  "phil"
4b4  65000000  "e"

Reported-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-18 09:22:47 +01:00
Takashi Iwai
a40db07fbf ASoC: rt5677: Remove superfluous linux/kthread.h inclusion
It's nowhere used in this driver code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-16 17:37:49 +00:00
Takashi Iwai
6342ad66d1 ASoC: rt5514: Remove superfluous linux/kthread.h inclusion
It's nowhere used in this driver code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-16 17:37:35 +00:00
Axel Lin
f2826c1fe5 ASoC: rt5665: Use devm_gpio_request_one()
Simplify the code a bit.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-16 16:27:29 +00:00
Axel Lin
0c95666f0d ASoC: rt5665: Fix missing mutex_unlock in rt5665_calibrate
Reported-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-16 16:27:29 +00:00
Peter Rosin
aa43112445 ASoC: atmel: tse850: add ASoC driver for the Axentia TSE-850
The TSE-850 is an FM Transmitter Station Equipment, designed to generate
baseband signals for FM, mainly the DARC subcarrier, but other signals
are also possible.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-16 11:12:42 +00:00
Peter Rosin
a85787edaa ASoC: atmel_ssc_dai: if not provided, default to sensible dividers
When this driver masters BCLK and/or LRCLK, and noone has stated
differently, assume that all the bits of a frame are used.

This relieves the cpu dai users from the duty to fill in the dividers for
the common case.

Signed-off-by: Peter Rosin <peda@axentia.se>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-16 11:02:31 +00:00
Lars-Peter Clausen
266c618d67 ASoC: intel: mfld: Make static string arrays 'const 'char * const []'
const char * const [] is the preferred type for static string arrays since
this states explicitly that the individual entries are not going to be
changed. Due to limitations in the ASoC API it was not possible to use it
for enum text arrays. Commit 87023ff74b ("ASoC: Declare const properly
for enum texts") changed this, but most drivers still use 'const char
* []' as the type for their enum text arrays.

Change these occurrences of 'static * const char * []' to 'static const
char * const []'.

The conversion was done automatically using the following coccinelle
semantic patch:
// <smpl>
@disable optional_qualifier@
identifier s;
@@
 static
-const char *
+const char * const
 s[] = ...;
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-16 10:08:59 +00:00
Bard Liao
59b0113140 ASoC: rl6231: add 19.2M to 4.096M pll preset table
Add a pll mapping table for 19.2M in and 4.096M out.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-15 17:07:22 +00:00
Takashi Iwai
aeaa6203b6 ALSA: emu10k1: Use workqueue instead of kthread for emu1010 fw polling
This patch is a cleanup of EMU1010 dock probing code in emu10k1 driver
to use work instead of kthread in a loop.  The work is lighter and
easier to control than kthread, in general.

Instead of a loop with the explicit sleep, we do simply
delayed-schedule the work.  At suspend/resume callbacks, the work is
canceled and restarted, respectively.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-15 08:21:19 +01:00
Takashi Iwai
4e4dfe4c3f ALSA: emu10k1: Simplify firmware loader code
The EMU1010 support in emu10k1 driver has two request_firmware()
calls, one for the main board and one for the dock.  Both call
patterns are fairly similar, and we can simplify it by introducing a
helper function and a table instead of the open switch/case.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-15 08:20:43 +01:00
Takashi Iwai
e8c44abeab ALSA: emu10k1: Fix emu1010 dock attach check
The emu1010_firmware_thread() checks the previous dock status, but a
wrong register is recorded as the last status when the dock is plugged
in.  Usually this isn't a big issue since this value gets overwritten
by the next loop after one second.  But when a dock is unplugged
immediately after plugging, it means essentially missing undock
handling.

This patch addresses it by remembering the correct register value.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-15 08:01:14 +01:00
Takashi Iwai
1936f00424 ALSA: ac97: Fix kernel-doc error with sphinx formatter
Sphinx takes a word like (*foo)->bar in the kernel-doc comments as a
part of the emphasized marker, and complains like

  ./sound/pci/ac97/ac97_codec.c:1908: WARNING: Inline emphasis start-string without end-string.

For avoiding this, wrap it with the quotes (``) in the comment.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-15 07:28:12 +01:00
Takashi Iwai
6ff1a25318 ALSA: usb-audio: Fix use-after-free of usb_device at disconnect
The usb-audio driver implements the deferred device disconnection for
the device in use.  In this mode, the disconnection callback returns
immediately while the actual ALSA card object removal happens later
when all files get closed.  As Shuah reported, this code flow,
however, leads to a use-after-free, detected by KASAN:

 BUG: KASAN: use-after-free in snd_usb_audio_free+0x134/0x160 [snd_usb_audio] at addr ffff8801c863ce10
 Write of size 8 by task pulseaudio/2244
 Call Trace:
  [<ffffffff81b31473>] dump_stack+0x67/0x94
  [<ffffffff81564ef1>] kasan_object_err+0x21/0x70
  [<ffffffff8156518a>] kasan_report_error+0x1fa/0x4e0
  [<ffffffff81564ad7>] ? kasan_slab_free+0x87/0xb0
  [<ffffffff81565733>] __asan_report_store8_noabort+0x43/0x50
  [<ffffffffa0fc0f54>] ? snd_usb_audio_free+0x134/0x160 [snd_usb_audio]
  [<ffffffffa0fc0f54>] snd_usb_audio_free+0x134/0x160 [snd_usb_audio]
  [<ffffffffa0fc0fb1>] snd_usb_audio_dev_free+0x31/0x40 [snd_usb_audio]
  [<ffffffff8243c78a>] __snd_device_free+0x12a/0x210
  [<ffffffff8243d1f5>] snd_device_free_all+0x85/0xd0
  [<ffffffff8242cae4>] release_card_device+0x34/0x130
  [<ffffffff81ef1846>] device_release+0x76/0x1e0
  [<ffffffff81b37ad7>] kobject_release+0x107/0x370
  .....
 Object at ffff8801c863cc80, in cache kmalloc-2048 size: 2048
 Allocated:
  [<ffffffff810804eb>] save_stack_trace+0x2b/0x50
  [<ffffffff81564296>] save_stack+0x46/0xd0
  [<ffffffff8156450d>] kasan_kmalloc+0xad/0xe0
  [<ffffffff81560d1a>] kmem_cache_alloc_trace+0xfa/0x240
  [<ffffffff8214ea47>] usb_alloc_dev+0x57/0xc90
  [<ffffffff8216349d>] hub_event+0xf1d/0x35f0
  ....
 Freed:
  [<ffffffff810804eb>] save_stack_trace+0x2b/0x50
  [<ffffffff81564296>] save_stack+0x46/0xd0
  [<ffffffff81564ac1>] kasan_slab_free+0x71/0xb0
  [<ffffffff81560929>] kfree+0xd9/0x280
  [<ffffffff8214de6e>] usb_release_dev+0xde/0x110
  [<ffffffff81ef1846>] device_release+0x76/0x1e0
  ....

It's the code trying to clear drvdata of the assigned usb_device where
the usb_device itself was already released in usb_release_dev() after
the disconnect callback.

This patch fixes it by checking whether the code path is via the
disconnect callback, i.e. chip->shutdown flag is set.

Fixes: 79289e2419 ('ALSA: usb-audio: Refer to chip->usb_id for quirks...')
Reported-and-tested-by: Shuah Khan <shuahkh@osg.samsung.com>
Cc: <stable@vger.kernel.org> # v4.6+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-14 22:05:04 +01:00
Linus Torvalds
ee2bd216e1 ASoC: lpass-platform: fix uninitialized variable
In commit 022d00ee0b ("ASoC: lpass-platform: Fix broken pcm data
usage") the stream specific information initialization was broken, with
the dma channel information not being initialized if there was no
alloc_dma_channel() helper function.

Before that, the DMA channel number was implicitly initialized to zero
because the backing store was allocated with devm_kzalloc().  When the
init code was rewritten, that implicit initialization was lost, and gcc
rightfully complains about an uninitialized variable being used.

Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: Mark Brown <broonie@kernel.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2016-11-14 09:46:08 -08:00
Bard Liao
33ada14a26 ASoC: add rt5665 codec driver
This is the initial codec driver for rt5665.

Signed-off-by: Bard Liao <bardliao@realtek.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-14 11:37:57 +00:00
Richard Fitzgerald
b396ebca73 ASoC: wm_adsp: factor out getting base register for a control
The lookup of the base register corresponding to a control is
duplicated in read and write so factor it out into a separate
function.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-14 11:26:18 +00:00
Lars-Peter Clausen
134340b33f ASoC: rt5616: Don't use rtd->codec
rtd->codec does not necessarily point to the CODEC instance for which the
callback was called (e.g. for CODEC<->CODEC or multi-CODEC links). Use
dai->codec instead.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-14 11:23:17 +00:00
Fabian Frederick
b2fac07303 ALSA: pci: don't opencode IS_REACHABLE()
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-13 21:33:41 +01:00
Lars-Peter Clausen
92be58106e ASoC: pxa: Make static string arrays 'const 'char * const []'
const char * const [] is the preferred type for static string arrays since
this states explicitly that the individual entries are not going to be
changed. Due to limitations in the ASoC API it was not possible to use it
for enum text arrays. Commit 87023ff74 ('ASoC: Declare const properly for
enum texts') changed this, but most drivers still use 'const char
* []' as the type for their enum text arrays.

Change these occurrences of 'static * const char * []' to 'static const
char * const []'.

The conversion was done automatically using the following coccinelle semantic
patch:
// <smpl>
@disable optional_qualifier@
identifier s;
@@
 static
-const char *
+const char * const
 s[] = ...;
// </smpl>

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-13 11:36:59 +00:00
Colin Ian King
28ab49bf9b ASoC: mioa701_wm9713: add missing white space in dev_err message
There is a missing whitespace in the dev_err message between
"will" and "lead".  Add the whitespace.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-13 11:36:59 +00:00
Vinod Koul
2e622ae41e ASoC: compress: Add support for compress dai ops
ASoC Compress ops have only platform ops and no DAI ops unlike PCM device
where we have both platform ops as well as DAI ops.

So add compress dai ops and add this new structure to the ASoC core to make
compressed devices a first class ASoC citizen

Again like PCM ops, drivers are free to implement either or both of
these ops based on device needs.

Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-13 09:35:35 +00:00
Pierre-Louis Bossart
bf46241bee ASoC: Intel: bytct_rt5640: change default capture settings
Most Baytrail-CR devices use analog differential microphones,
modify capture default to avoid DMI quirks. Keep digital mics
for all other configurations.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-13 09:19:58 +00:00
Pierre-Louis Bossart
64e84305cb ASoC: Intel: detect audio routing with CHAN package
Baytrail-CR devices usually expose information in the DSDT
which can be used to auto-detect AIF1/AIF2 connections.
The CHAN package contains two integers, the first one describes
the AIF number (1: AIF1, 2: AIF2) and the second the MCLK
value (ignored in this patch)

For example the following information is found in Lenovo 100s:

Device (RTEK) {
[...]
    Name (CHAN, Package (0x02)
    {
        One,
        0x017D7840
    })

While on Asus T100TAF the package values are:

    Name (CHAN, Package (0x02)
    {
        0x02,
        0x017D7840
    })

This patch relies on the new common routine to extract
a package exposed by a device indexed with the HID value.
The CHAN package contents are queried from the machine driver
and stored in a structure.

If this auto-detection fails (missing or bad package in the
BIOS), the routing falls back to SSP0-AIF2.

Note that quirks may still be needed to support mono speakers
or microphone, but this should reduce the number of issues with
Baytrail significantly.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-13 09:19:54 +00:00
Pierre-Louis Bossart
3421894765 ASoC: Intel: common: add ACPI package extraction utility
Add a new common routine to extract a package exposed by a
device indexed with the HID value. The functionality is
implemented without assumptions on the package type or
structure to allow for reuse. The caller is responsible for
defining the name and allocating structures to store the
results, ACPICA will complain in case of type mismatches
or buffer size issues.

Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-13 09:19:51 +00:00
Peter Ujfalusi
4e2cc814eb ASoC: tlv320aic31xx: Add support for tlv320dac3101
The DAC3101 is mostly identical to DAC3100 with the exception that it has
stereo speaker AMP instead of mono used in DAC3100.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-12 09:56:22 +00:00
Fabian Frederick
658355b599 ALSA: oss: don't opencode IS_REACHABLE()
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-12 10:12:00 +01:00
Fabian Frederick
7e1b23b078 ALSA: rawmidi: don't opencode IS_REACHABLE()
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-12 10:11:52 +01:00
Fabian Frederick
db0717da2a ALSA: opl3: don't opencode IS_REACHABLE()
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-12 10:11:36 +01:00
Richard Fitzgerald
a23ebba845 ASoC: wm_adsp: Support acknowledged controls
This patch handles publishing acknowledged controls through ALSA.
These controls allow user-side to send events to the firmware and
wait for the firmware to acknowledge it.

Note that although acked controls only operate in the direction
host->firmware, and therefore they are write-only as seen from user-
side code, we have to make them readable to account for all the code
out there that assumes that ALSA controls are always readable (amixer
for example.)

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:57:56 +00:00
Stuart Henderson
8eb084d066 ASoC: wm_adsp: Add support for SYSTEM firmware controls
Add support for firmware controls marked SYSTEM. These are
internal to the driver-firmware interface and do not have
a user-accessible ALSA control.

Signed-off-by: Stuart Henderson <stuarth@opensource.wolfsonmicro.com>
Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:57:55 +00:00
Richard Fitzgerald
9ce5e6e611 ASoC: wm_adsp: factor out getting region name from type
This patch factors out converting a memory region type into
a name string, mainly so that it can be used in log commands.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:57:55 +00:00
Richard Fitzgerald
f4f0c4c60c ASoC: wm_adsp: Signal firmware shutdown through event control
If the firmware has any system event signalling controls, signal
them during DSP PRE_PMD to tell the firmware it is about to be stopped.

Signed-off-by: Richard Fitzgerald <rf@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:57:54 +00:00
Lars-Peter Clausen
f174c1db90 ASoC: samsung: Remove unselectable smdk_wm8580pcm
The SND_SOC_SMDK_WM8580_PCM Kconfig entry depends on either MACH_SMDKV210
or MACH_SMDKC110. Both of which were removed in commit 28c8331d38 ("ARM:
S5PV210: Remove support for board files") over two years ago. The driver
has been unselectable ever since.

Considering the lack of complaints about this it can be concluded that the
driver is unused and can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:38:58 +00:00
Valentin Rothberg
5acbd34398 ASoC: samsung: Makefile cleanup
Commit a076d41823 ("ASoC: samsung: Drop AC97 drivers") removed some
unused code and the associated Kconfig options, but left those options
referenced in the Makefile.  Remove the leftover references in the
Makefile.

Signed-off-by: Valentin Rothberg <valentinrothberg@gmail.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:37:15 +00:00
John Hsu
aee02c75a5 ASoC: nau8825: FLL parameters finetune
The driver fine-tune some parameters to improve FLL performance.
Those items have description as follow.
(1)ICTRL_LATCH: FLL DSP speed capability control
When FLL running at high frequency with long decimal number, DSP needs
to operate at high speed. FLL DSP can optimize between performance and
power consumption by ICTRL_LATCH.(111 has highest power consumption.)
The default setting can be used to reduce power.
(2)CUTOFF500: loop filter cutoff frequency at 500Khz
It will give the best FLL performance but highest power consumption
to enable the cutoff frequency. FLL Loop Filter enable to reduce FLL
output noise, especially,(DCO frequency)/(FLL input reference frequency)
is not a integer.
(3)GAIN_ERR: FLL gain error correction threshold setting
The threshold is comparison between DCO and target frequency.
The value 1111 has the most sensitive threshold, that is, 1111 can have
the most accurate DCO to target frequency. However, the gain error setting
conditionally and inversely depends on FLL input reference clock rate.
Higher FLL reference input frequency can only set lower gain error, such
as 0000 for input reference from MCLK=12.288Mhz. On the other side, if FLL
reference input is from Frame Sync, 48KHz, higher error gain can apply
such as 1111.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:35:40 +00:00
John Hsu
d6d197458b ASoC: nau8825: AD/DA over sampling rate configuration
Over Sampling Rate (OSR) is defined as CLK_ADC frequency divided by the
audio sample rate (Fs).
OSR = CLK_ADC / FS
The available OSRs are 32, 64, 128 or 256. Note that the OSR and Fs
values must be selected such that the maximum frequency of CLK_ADC
is less than 6.144 MHz. It is recommended to match the relationship
between OSR and clock SRC according to following Table.
ADC_RATE: 00(OSR=32)  | CLK_ADC_SRC: 11(CODEC 1/8)
ADC_RATE: 01(OSR=64)  | CLK_ADC_SRC: 10(CODEC1/4)
ADC_RATE: 10(OSR=128) | CLK_ADC_SRC: 01(CODEC 1/2)
ADC_RATE: 11(OSR=256) | CLK_ADC_SRC: 00(CODEC CLK)

The over sampling rate about DAC follows the same rule with ADCs.
The driver changes the OSR to 64 value when initiation for better FLL
performance and applies the dynamic SRC change by different OSR.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:35:39 +00:00
John Hsu
93dfec758f ASoC: nau8825: Disable short Frame Sync detection logic
If the short Frame Sync detection logic enabled, the logic will check the
short frame sync threshold. If frame sync is less than the setting;
for example, frame sync less than 252 MCLK, the short frame sync signal is
flagged, digital filter temporary mute and skip that data.

If the system was intended for sampling rate change which could create
temporary short frame sync and not enough MIPS to run the digital filter.
But the situation doesn't happen in ALSA architecure. Thus the Frame Sync
is always stable, then no require to do the detection. Therefore,
the dirver disables the function for better performance.

Signed-off-by: John Hsu <KCHSU0@nuvoton.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:35:39 +00:00
Kuninori Morimoto
1ef5bcd57b ASoC: soc-core: adjust for graph on snd_soc_of_parse_audio_simple_widgets
It is assuming that the card related information is located on
"card" node, but graph case doesn't have it.
This patch adds node parameter to adjust for graph support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:22:02 +00:00
Kuninori Morimoto
8f5ebb1bee ASoC: soc-core: adjust for graph on snd_soc_of_parse_card_name
It is assuming that the card related information is located on
"card" node, but graph case doesn't have it.
This patch adds node parameter to adjust for graph support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:22:01 +00:00
Kuninori Morimoto
b6defcca0a ASoC: soc-core: adjust for graph on snd_soc_of_parse_audio_prefix
It is assuming that the card related information is located on
"card" node, but graph case doesn't have it.
This patch adds node parameter to adjust for graph support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:19:35 +00:00
Kuninori Morimoto
1ad8ec535b ASoC: soc-core: snd_soc_get_dai_name() become non static
snd_soc_get_dai_name() is used from snd_soc_of_get_dai_name(),
and it is assuming that DT is using "sound-dai" / "#sound-dai-cells".
But graph base DT is using "remote-endpoint". This patch makes
snd_soc_get_dai_name() non static for graph support.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:19:34 +00:00
Kuninori Morimoto
7364c8dc25 ASoC: soc-core: adjust for graph on snd_soc_of_parse_audio_routing
It is assuming that the card related information is located on
"card" node, but graph case doesn't have it.
This patch adds node parameter to adjust for graph support

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-11 15:19:34 +00:00
Takashi Iwai
9a2541910d ALSA: hda - Fix mic regression by ASRock mobo fixup
The commit [1a3f099101: ALSA: hda - Fix surround output pins for
ASRock B150M mobo] introduced a fixup of pin configs for ASRock
mobos to fix the surround outputs.  However, this overrides the pin
configs of the mic pins as if they are outputs-only, effectively
disabling the mic inputs.  Of course, it's a regression wrt mic
functionality.

Actually the pins 0x18 and 0x1a don't need to be changed; we just need
to disable the bogus pins 0x14 and 0x15.  Then the auto-parser will
pick up mic pins as switchable and assign the surround outputs there.

This patch removes the incorrect pin overrides of NID 0x18 and 0x1a
from the ASRock fixup.

Fixes: 1a3f099101 ('ALSA: hda - Fix surround output pins for ASRock...')
Reported-and-tested-by: Vitor Antunes <vitor.hda@gmail.com>
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=187431
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-11 12:33:20 +01:00
Peter Ujfalusi
a4a1d79ea7 ASoC: tlv320aic31xx: Add missing of_device_id for dac3100
The compatible table was not updated when the support for DAC3100 was added.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Reviewed-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-10 17:55:04 +00:00
Charles Keepax
88c1886075 ASoC: arizona: Call arizona_init_notifiers for all CODECs
The call to arizona_init_notifiers was only added for CODECs that are
generating voice trigger events, however, this is somewhat annoying
for machine drivers that might be used with multiple CODECs as they
need to conditionally register for the notifier, depending on the
CODEC being attached.

As the cost of initialising the notifier is so minimal, and we may
well add other events in the future that apply to more CODECs, simply
do this for all Arizona CODECs.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-10 16:20:24 +00:00
Charles Keepax
d3d5c90556 ASoC: arizona: Move notifier functions to header and make inline
These functions are very thin wrappers around core functions, so they
make sense as inline functions.  Also making them inline avoids build
issues in the case where the machine driver is built in but the CODEC
is built as a module.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-10 16:20:24 +00:00
Charles Keepax
4090d63b49 ASoC: wm2200: Correct types of mixer texts and values
The core expects "const char * const" and "unsigned int" for enum
controls, the mixer control definitions in wm2200 use "const char *"
and "int".  This patch corrects the type of these arrays.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-10 16:19:42 +00:00
kbuild test robot
45ee1d8555 ASoC: fix platform_no_drv_owner.cocci warnings
sound/soc/codecs/cs42l42.c:1972:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

CC: James Schulman <james.schulman@cirrus.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-10 16:13:57 +00:00
kbuild test robot
35db57622c ASoC: sun4i-codec: fix semicolon.cocci warnings
sound/soc/sunxi/sun4i-codec.c:1339:2-3: Unneeded semicolon

 Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-10 16:12:59 +00:00
Hui Wang
2ecb704a12 ALSA: hda - add a new condition to check if it is thinkpad
Latest Thinkpad laptops use the HKEY_HID LEN0268 instead of the
LEN0068, as a result neither audio mute led nor mic mute led can work
any more.

After adding the new HKEY_HID into the is_thinkpad(), both of them
works well as before.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-10 09:32:55 +01:00
Jayachandran B
8b4a133c61 ASoC: Intel: Skylake: Flush pending D0i3 request on suspend
While going to suspend, if we have any pending D0i3 work scheduled,
flush that and force the DSP to goto D0i3 mode before going to suspend.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 15:22:48 +00:00
Jayachandran B
68d03a3aa2 ASoC: Intel: Skylake: remove pci device enabling calls on suspend
We were invoking pci_disable_device() while going to suspend-to-idle and
pci_enable_device() while coming back to active state.

Turns out that we do not need these calls as we only need system to be
wake capable when in suspend-to-idle state. The wake capability is
already done by enable_irq_wake() calls, so remove these unwanted calls
in driver.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 15:22:48 +00:00
Mengdong Lin
dbab1cb88e ASoC: topology: Check name strings of physical DAI links
Check if the name strings are properly terminated, and only use valid
name strings to find existing physical DAI links to configure.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 14:46:04 +00:00
Axel Lin
b4f89a0cce ASoC: msm8916-wcd-analog: Update correct register setting for MIC BIAS Internal1
pm8916_wcd_analog_enable_micbias_int1() should set micbias1_cap_mode
rather than micbias2_cap_mode.

Also change the order of pm8916_wcd_analog_enable_micbias_int1/init2
functions for better readability.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 14:45:44 +00:00
Randy Dunlap
b3af6d3f96 ASoC: fsl: fix fsl_spdif.c build errors
Fix build errors in sound/soc/fsl/fsl_spdif.c by selecting BITREVERSE.
Fixes these build errors:

sound/built-in.o: In function `spdif_write_channel_status':
fsl_spdif.c:(.text+0xbe39d): undefined reference to `byte_rev_table'
fsl_spdif.c:(.text+0xbe3a8): undefined reference to `byte_rev_table'
fsl_spdif.c:(.text+0xbe3be): undefined reference to `byte_rev_table'
fsl_spdif.c:(.text+0xbe3d8): undefined reference to `byte_rev_table'

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 14:44:43 +00:00
Chen-Yu Tsai
9aead156c0 ASoC: sun4i-codec: Add support for optional reset control to quirks
The later Allwinner SoCs have a dedicated reset controller, and
peripherals have dedicated reset controls which need to be deasserted
before the associated peripheral can be used.

Add support for this to the quirks structure and probe/remove functions.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 14:43:35 +00:00
Chen-Yu Tsai
24c99f8432 ASoC: sun4i-codec: Add support for A31 ADC capture path
The A31's internal codec capture path has a mixer in front of the ADC
for each channel, capable of selecting various inputs, including
microphones, line in, phone in, and the main output mixer.

This patch adds the various controls, widgets and routes needed for
audio capture from the already supported inputs on the A31.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 14:43:35 +00:00
Charles Keepax
06859fca43 ASoC: core: If a platform doesn't have an of_node use parent's node
Support was added to allow location of both CPU and CODEC components
of a DAI link from their parent's of_node if they did not have an
of_node themselves in this commit:

commit 3e0aa8d83b ("ASoC: core: If component doesn't have of_node
                      use parent's node instead")

However this leaves platforms as something of a special case as the
major DAI component that doesn't do this. Since this is useful for MFD
devices which often utilise a single device tree entry for the whole
device, add support for looking up platforms from the parent's of_node
as well.

Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 14:01:54 +00:00
Maxime Ripard
fbd972d7f4 ASoC: wm8978: Adjust clock indices so that simple card works
Using simple-card with the wm8978 doesn't work because simple card calls
set_sysclk on the clock index 0, which is not the MCLK in the WM8978.

Adjust the clock definition so that the clock 0 is the MCLK.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 14:01:39 +00:00
Maxime Ripard
b2b7b56f71 ASoC: sunxi: i2s: Implement set_sysclk
In our i2s driver, we were previously trying to guess which oversample the
user wanted to use by looking at the rate and trying to max it.

However, the cards, and especially simple-card with its mclk-fs property
will already provide the expected oversample ratio by using the set_sysclk
callback.

We can thus implement it and remove the logic to deal with the runtime
guess.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 14:01:08 +00:00
James Schulman
2c394ca796 ASoC: Add support for CS42L42 codec
Add support for Cirrus Logic CS42L42 codec. SoundWire support
is not enabled. Features support for I2C control and I2S audio.

Signed-off-by: James Schulman <james.schulman@cirrus.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 13:50:14 +00:00
Arnd Bergmann
3b89e4b77e ASoC: lpass-platform: initialize dma channel number
A bugfix accidentally removed the implicit initialization of the
dma channel number, causing undefined behavior when
v->alloc_dma_channel is NULL:

sound/soc/qcom/lpass-platform.c: In function ‘lpass_platform_pcmops_open’:
sound/soc/qcom/lpass-platform.c:83:29: error: ‘dma_ch’ may be used uninitialized in this function [-Werror=maybe-uninitialized]

This adds back an explicit initialization to zero, restoring the
previous behavior for that case.

Fixes: 022d00ee0b ("ASoC: lpass-platform: Fix broken pcm data usage")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kenneth Westfield <kwestfie@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-09 13:24:57 +00:00
Lars-Peter Clausen
4ce8e6a51a ALSA: hda - Fix typo
EPAD -> EAPD

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-08 15:51:43 +01:00
Takashi Iwai
6809cd682b ALSA: info: Return error for invalid read/write
Currently the ALSA proc handler allows read or write even if the proc
file were write-only or read-only.  It's mostly harmless, does thing
but allocating memory and ignores the input/output.  But it doesn't
tell user about the invalid use, and it's confusing and inconsistent
in comparison with other proc files.

This patch adds some sanity checks and let the proc handler returning
an -EIO error when the invalid read/write is performed.

Cc: <stable@vger.kernel.org> # v4.2+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-08 14:37:26 +01:00
Takashi Iwai
027a9fe683 ALSA: info: Limit the proc text input size
The ALSA proc handler allows currently the write in the unlimited size
until kmalloc() fails.  But basically the write is supposed to be only
for small inputs, mostly for one line inputs, and we don't have to
handle too large sizes at all.  Since the kmalloc error results in the
kernel warning, it's better to limit the size beforehand.

This patch adds the limit of 16kB, which must be large enough for the
currently existing code.

Cc: stable@vger.kernel.org # v4.2+
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-11-08 13:16:40 +01:00
Dave Airlie
7b624ad8fe Linux 4.9-rc4
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYHmoCAAoJEHm+PkMAQRiG7RMIAI2i7Y5hpL5yCxK5AFaL4u/G
 KxXfp1B1UanUTgjOmd7zGqtDYcFX9t7GTTUFixQ7/9Opr4PD9qbnatoDGSc3xjbT
 msDgA1B78F1/Q3kHWfeGq32MihQ4mj5NwUCo+igUcUvvWG7mHgzErj/Nh5RoobQX
 p/izdpTbrw3GX6xXB8olbG7XWHaVye/+TT3q6+gmgm8I/QEujcLeGoycE0zlhPN8
 FG/JX76At/+ZM2Py7Oxo3k+oKL9CHrtOQYDp/wN0uslV5eYvvkZz0/M1HMOGZt+c
 gZU5jzM17K7C4Nzo06WAuBU9wUBGc25m+cPicLlOmljnzfU+f50SKaDjZq3p7QI=
 =2KUF
 -----END PGP SIGNATURE-----

Backmerge tag 'v4.9-rc4' into drm-next

Linux 4.9-rc4

This is needed for nouveau development.
2016-11-07 09:37:09 +10:00
Chen-Yu Tsai
300a18d13f ASoC: sun4i-codec: Add support for A31 board level audio routing
The A31 SoC's codec has various inputs, outputs and microphone bias
supplies. These can be routed on the board in different ways, such as:

  - HPCOM may be connected to have the headphone DC coupled.

  - Microphones all use the MBIAS main microphone supply or one mic may
    use the HBIAS supply, which supports headset detection and buttons.

  - Line Out may be routed to an audio jack, or an onboard speaker amp
    with power controls.

Add support for specifying the audio routes in the device tree.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 14:38:35 -06:00
Chen-Yu Tsai
ecd5cdb4fd ASoC: sun4i-codec: Add support for A31 analog microphone inputs
The A31 internal codec has 3 microphone outputs, of which MIC2 and MIC3
are muxed internally. The resulting two microphone inputs have separate
gain controls and mixer inputs.

The codec also has 2 microphone bias pins. HBIAS is specifically for the
headphone jack, which also supports headphone detection and control
buttons. These extra functions are not supported yet. The other, MBIAS,
is for all other analog microphones.

There is also mention of digital microphone support, but documentation
is scarce, and no hardware with it is available.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 14:37:14 -06:00
Chen-Yu Tsai
0f909f98d7 ASoC: sun4i-codec: Add support for A31 Line Out playback
The A31 integrated codec has a second "Line Out" output which does not
include an integrated amplifier in its path. This path does have a
separate volume control.

This patch adds support for the playback path from the DAC to the Line
Out pins.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 14:35:57 -06:00
Mark Brown
3dfd2b682b Merge remote-tracking branches 'asoc/fix/rt5663', 'asoc/fix/samsung', 'asoc/fix/sti', 'asoc/fix/sti-codec', 'asoc/fix/sunxi' and 'asoc/fix/tas571x' into asoc-linus 2016-11-04 12:33:56 -06:00
Mark Brown
74d01b140f Merge remote-tracking branches 'asoc/fix/cs4270', 'asoc/fix/da7219', 'asoc/fix/hdmi-codec', 'asoc/fix/pxa', 'asoc/fix/qcom' and 'asoc/fix/rt298' into asoc-linus 2016-11-04 12:33:48 -06:00
Mark Brown
56eba7a15b Merge remote-tracking branch 'asoc/fix/intel' into asoc-linus 2016-11-04 12:33:45 -06:00
Mark Brown
a1ca97ba44 Merge branch 'topic/dapm' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sunxi 2016-11-04 11:45:33 -06:00
Lars-Peter Clausen
7aacbc7ff7 ASoC: stac9766: Remove ac97_read/ac97_write wrappers
Since the regmap conversion ac97_read/ac97_write are just simple wrappers
around snd_soc_read/snd_soc_write. Use those instead directly and remove
the wrappers.

Also use snd_soc_update_bits() where appropriate.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:43:08 -06:00
Lars-Peter Clausen
6bbf787bb7 ASoC: stac9766: Convert to regmap
Currently the stac9766 driver still uses custom snd_soc_codec_driver IO
callbacks. This has been deprecated for a while, so convert the stac9766
driver to use regmap for its IO.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:43:08 -06:00
Lars-Peter Clausen
dccb395c26 ASoC: stac9766: Move register defines to main source file
The stac9766 driver has a header file that defines 3 register locations.
Move these to the main source file since it is not really worth it having a
separate file for them. The header file is now empty and can be removed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:43:05 -06:00
Lars-Peter Clausen
2bea8f97d4 ASoC: stac9766: Remove register paging support
The AC'97 standard defines paging support for the register range 0x60-0x6f.
Meaning registers in this window are mapped to different physical registers
depending on the setting of the page select register (0x24).

The stac9766 implements support for switching between page 0 and page 1
depending on the addressed register. But the driver never accesses any
registers from page 1, in addition page 0 is the page selected by default.

Considering the development history it is unlikely that the driver will see
any new features that require paging support. Removing the paging support
makes transitioning the driver to regmap a bit more straight forward.

The default register value table is update to contain the values from page
0, rather than page 1.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:42:58 -06:00
Lars-Peter Clausen
355602eb5a ASoC: stac9766: Remove unused DAI ID defines
The DAI ID defines are back from the time when DAIs were referenced by a
numerical ID. These days a string is used instead and the defines are
unused.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:41:53 -06:00
Mengdong Lin
6ff67ccafd ASoC: topology: ABI - Add voice wake up flag for DAI links
Add a new flag bit SND_SOC_TPLG_LNK_FLGBIT_VOICE_WAKEUP to link flags.
If a link is used for voice wake up, users can set this flag bit and
topology will set the link's 'ignore_suspend' to true.

This ABI update is backward compatible.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:36:39 -06:00
Mengdong Lin
9aa3f03473 ASoC: topology: Rename functions & variables for physical DAIs
Code refactoring. These functions and variables are for configuring
physical DAIs, not only backend DAIs since users may not need DPCM.
So remove 'be' from the function names, and rename variables 'be'
to 'd' or 'dai'.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:26:46 -06:00
Mengdong Lin
3fbf793510 ASoC: topology: ABI - Rename struct and type for physical DAIs
Rename the ABI struct and type because they are for configuring physical
DAIs, not only backend DAIs since users may not need DPCM:
- Rename struct snd_soc_tplg_be_dai to snd_soc_tplg_dai.
- Rename type SND_SOC_TPLG_TYPE_BE_DAI to SND_SOC_TPLG_TYPE_DAI.

This code refactoring is backward compatible because:
- Both layout of the struct and type value has no change. Kernel can
  find the same type value and map to same data layout.
- This struct is not in ABI v4 at all. Now the user space uses ABI v4.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:26:42 -06:00
Mengdong Lin
ab4bc5eed8 ASoC: topology: Rename the function to create a FE link
Just code refactoring. The function soc_tplg_link_create() will
create a front end link, not a physical link. So rename it to
soc_tplg_fe_link_create().

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:25:31 -06:00
Mengdong Lin
593d9e52f9 ASoC: topology: Add support to configure existing physical DAI links
Topology will find an existing physical link (including BE link for
DPCM) by checking its ID, name and stream name, and configure its physical
audio format and flags.

This support is backward compatible for old ABI v4.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:22:34 -06:00
Mengdong Lin
17fb175520 ASoC: Define API to find a dai link
Define the API to find an existing DAI link of the soc card by matching
the ID, name and stream name.

Some cards may use unique ID for each DAI link, so matching ID is enough,
and name or stream name are not necessary. But user need to specify name
or stream name as well if not sure whether link ID is unique since most
cards use 0 as the default link ID.

Topology can use this API to find an existing BE link and configure it.

Signed-off-by: Mengdong Lin <mengdong.lin@linux.intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 11:16:51 -06:00
Srinivas Kandagatla
ba9b8c42cf ASoC: codecs: msm8916-wcd-digital: rename parse_dt to get_clks
This patch renames msm8916_wcd_digital_parse_dt() to
msm8916_wcd_digital_get_clks() as the function is not directly dealing
with dt parsing.

No functional changes done.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 10:19:01 -06:00
Srinivas Kandagatla
4323ec250c ASoC: codecs: msm8916-wcd-analog: clean parse_dt()
Move the code which is not parsing dt from pm8916_wcd_analog_parse_dt()
to make it clear to reader.

No functional changes done.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-04 10:18:49 -06:00
Chen-Yu Tsai
dff5051250 ASoC: sun4i-codec: Add support for A31 Line In playback
The A31 integrated codec has a stereo "Line In" input. Add support for
it to the playback paths.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 14:29:53 -06:00
Chen-Yu Tsai
8d9e4c9e99 ASoC: sun4i-codec: Add support for A31 playback through headphone output
The A31 has a similar codec to the A10/A20. The PCM parts are very
similar, with different register offsets. The analog paths are very
different. There are more inputs and outputs. The ADC mux has been
replaced with a proper mixer.

This patch adds support for the basic playback path of the A31 codec,
from the DAC to the headphones. Headphone detection, microphone,
signaling, other inputs/outputs and capture will be added later.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 14:29:50 -06:00
Chen-Yu Tsai
730e2dd0cb ASoC: sun4i-codec: Increase DMA max burst to 8
According to the DMA engine API documentation, maxburst denotes the
largest possible size of a single transfer, so as not to overflow
destination FIFOs as explained in this excerpt from dmaengine.h

 * @src_maxburst: the maximum number of words (note: words, as in
 * units of the src_addr_width member, not bytes) that can be sent
 * in one burst to the device. Typically something like half the
 * FIFO depth on I/O peripherals so you don't overflow it. This
 * may or may not be applicable on memory sources.
 * @dst_maxburst: same as src_maxburst but for destination target
 * mutatis mutandis.

The TX FIFO is 64 samples deep for stereo, and the RX FIFO is 16
samples deep. So maxburst could be 32 and 8 for TX and RX respectively.

Unfortunately the sunxi DMA controller driver takes maxburst as
the requested burst size, rather than a limit, and returns an error
for unsupported values. The original value was 4, but some later
SoCs do not officially support this burst size.

This patch increases maxburst on the TX side to 8, which is supported
by all variants of the sunxi DMA controller.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 14:29:44 -06:00
Chen-Yu Tsai
bc03f0d576 ASoC: sun4i-codec: Expand quirks to handle register offsets and card creation
The A31 has a similar codec to the A10/A20. The PCM parts are very
similar, with just different register offsets. The analog paths are
very different. There are more inputs and outputs.

The A31s, A23, and H3 have a similar PCM interface, again with register
offsets slightly rearranged. The analog path controls, while very
similar between them and the A31, have been moved a separate bus which
is accessed through a message box like interface in the PRCM address
range. This would be handled by a separate auxiliary device tied in
through the device tree in its supporting create_card function.

The quirks structure is expanded to include different register offsets
and separate callbacks for creating the ASoC card. The regmap_config,
quirks, and of_device_match tables have been moved to facilitate this.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 14:29:27 -06:00
Mark Brown
184f22d9b8 Merge branch 'fix/sunxi' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-sunxi 2016-11-03 14:28:20 -06:00
Chen-Yu Tsai
bd720ecf4e ASoC: sun4i-codec: Revise comments for register definition macros
This revises existing comments in the register definition macros
section, and adds a few more, so that readers can clearly identify
the types of control registers.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 14:26:04 -06:00
Chen-Yu Tsai
2f2a3462bc ASoC: sun4i-codec: Move data structures to add create_card call to quirks
The audio codec on later Allwinner SoCs have a different layout and
audio path compared to the A10/A20. However the PCM parts are still
the same.

The different layout and audio paths mean we need a different
create_card function for different families, so they can create
DAPM endpoint widgets and routes.

This patch moves the regmap configs, quirks and of_device_id
structures to just before the probe function, so we can, among other
things, include a pointer for the create_card function. None of the
lines of code were changed.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 11:25:16 -06:00
Vinod Koul
a83e3b4c44 ASoC: Intel: Skylake: Add D0i3 mode ref counting
For device opened/closed, we check the D0i3 capability for the device
and invoke skl_tplg_d0i3_get/put, which counts the use case based on the
mode supported.

These counters are then used to decide if the device can enter D0i3 mode
of streaming or non-streaming or no D0i3.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 11:14:42 -06:00
Vinod Koul
6bd9dcf339 ASoC: Intel: Skylake: Add support for specifying D0i3 configuration
Not all use cases can support Doi3. Only certain use cases like hot word
detection, deep buffering can support D0i3 based on resource requirement.

So, pass the D0i3 capability for the FE/BE copier using topology. This will
be used to take a decision for D0i3 mode entry/exit.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 11:14:41 -06:00
Vinod Koul
8a0cb2360d ASoC: Intel: Skylake: Add support for LPMode
For D0i3, we need to tell DSP to run the pipelines in LP mode. This
information is kept in topology and passed to driver as an attribute
for pipe.

So add a new tuple for lpmode and program the pipe based on value set.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 11:14:22 -06:00
Jayachandran B
5bb4cd46ac ASoC: Intel: Skylake: Add D0iX callbacks
The driver needs two DSP callback, one to set D0i0 (active) and D0i3
(low-power) states.

Add these callbacks in dsp ops and implement them for broxton platforms.

Signed-off-by: Jayachandran B <jayachandran.b@intel.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
2016-11-03 11:14:22 -06:00