summaryrefslogtreecommitdiff
path: root/sound
AgeCommit message (Collapse)Author
2016-05-10Merge branch 'for-linus' into for-nextTakashi Iwai
2016-05-10ALSA: hda - Fix subwoofer pin on ASUS N751 and N551Yura Pakhuchiy
Subwoofer does not work out of the box on ASUS N751/N551 laptops. This patch fixes it. Patch tested on N751 laptop. N551 part is not tested, but according to [1] and [2] this laptop requires similar changes, so I included them in the patch. 1. https://github.com/honsiorovskyi/asus-n551-hda-fix 2. https://bugs.launchpad.net/ubuntu/+source/alsa-tools/+bug/1405691 Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=117781 Signed-off-by: Yura Pakhuchiy <pakhuchiy@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-10ALSA: hda - Fix broken reconfigTakashi Iwai
The HD-audio reconfig function got broken in the recent kernels, typically resulting in a failure like: snd_hda_intel 0000:00:1b.0: control 3:0:0:Playback Channel Map:0 is already present This is because of the code restructuring to move the PCM and control instantiation into the codec drive probe, by the commit [bcd96557bd0a: ALSA: hda - Build PCMs and controls at codec driver probe]. Although the commit above removed the calls of snd_hda_codec_build_pcms() and *_build_controls() at the controller driver probe, the similar calls in the reconfig were still left forgotten. This caused the conflicting and duplicated PCMs and controls. The fix is trivial: just remove these superfluous calls from reconfig_codec(). Fixes: bcd96557bd0a ('ALSA: hda - Build PCMs and controls at codec driver probe') Reported-by: Jochen Henneberg <jh@henneberg-systemdesign.com> Cc: <stable@vger.kernel.org> # v4.1+ Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09ASoC: davinci-mcasp: Calculate AUXCLK divider when setting up master clocksPeter Ujfalusi
If the McASP is used as clock master and the reference clock is AUXCLK we can have additional level of divider. The BCLK divider is limited to maximum 32, if the desired bclk can not be reached with this, the AUXCLK divider also needs to be used. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-09ASoC: davinci-mcasp: Restructure the davinci_mcasp_calc_clk_div()Peter Ujfalusi
Change the return value to error_pmm instead of the BCLK div and handle the divider configuration to McASP within the function when the set flag is true. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-09ASoC: davinci-mcasp: Change __davinci_mcasp_set_clkdiv() first parameterPeter Ujfalusi
Change the first parameter to struct davinci_mcasp* from struct snd_soc_dai* The function internally does not use or need the DAI information. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-09ASoC: davinci-mcasp: Use defines for clkdiv IDsPeter Ujfalusi
Instead of hardwired IDs add defines for the available dividers. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-09ALSA: hda - Clarify CONFIG_SND_HDA_RECONFIG usagesTakashi Iwai
Since the recent rewrite of HD-audio infrastructure, CONFIG_SND_HDA_RECONFIG has a slightly different meaning. In the earlier versions, it implicitly assumed only the usage via hwdep sysfs entries. Meanwhile, in the recent version, this option is meant to enable the reconfig code in HD-audio driver, which may be used by the patch loader without hwdep interface. This patch tries to clarify the usage pattern a bit better, hopefully avoid the further confusion. Reported-by: Jochen Henneberg <jh@henneberg-systemdesign.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09ALSA: compress: Replace complex if statement with switchCharles Keepax
A switch statement looks a bit cleaner than an if statement spread over 3 lines, as such update this to a switch. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09ALSA: compress: Fix poll error return codesCharles Keepax
We can't return a negative error code from the poll callback the return type is unsigned and is checked against the poll specific flags we need to return POLLERR if we encounter an error. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09ALSA: compress: Remove pointless NULL checkCharles Keepax
stream can't be NULL here as we have just taken the address of it, so no need for the check. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09ALSA: compress: Use snd_compr_get_poll on error pathCharles Keepax
We have a function that returns the appropriate flags for the stream direction, so we should use it. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09ALSA: pcm: Fix poll error return codesCharles Keepax
We can't return a negative error code from the poll callback the return type is unsigned and is checked against the poll specific flags we need to return POLLERR if we encounter an error. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Reviewed-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09ASoC: davinci-mcasp: Do not allow multiple streams in one directionPeter Ujfalusi
Make sure that the user can not start multiple streams with the same direction. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-09ASoC: simple-card: Add pm callbacks to platform driverPeter Ujfalusi
Set snd_soc_pm_ops for the pm ops to make sure that the ASoC level of PM operations are going to happen. This is needed to get suspend/resume working correctly when the audio is using simple-card. Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-09ALSA: firewire-lib: add tracepoints to dump a part of isochronous packet dataTakashi Sakamoto
When audio and music units have some quirks in their sequence of packet, it's really hard for non-owners to identify the quirks. Although developers need dumps for sequence of packets, it's difficult for users who have no knowledges and no equipments for this purpose. This commit adds tracepoints for this situation. When users encounter the issue, they can dump a part of packet data via Linux tracing framework as long as using drivers in ALSA firewire stack. Additionally, tracepoints for outgoing packets will be our help to check and debug packet processing of ALSA firewire stack. This commit newly adds 'snd_firewire_lib' subsystem with 'in_packet' and 'out_packet' events. In the events, some attributes of packets and the index of packet managed by this module are recorded per packet. This is an usage: $ trace-cmd record -e snd_firewire_lib:out_packet \ -e snd_firewire_lib:in_packet /sys/kernel/tracing/events/snd_firewire_lib/out_packet/filter /sys/kernel/tracing/events/snd_firewire_lib/in_packet/filter Hit Ctrl^C to stop recording ^C $ trace-cmd report trace.dat ... 23647.033934: in_packet: 01 4073 ffc0 ffc1 00 000f0040 9001b2d1 122 44 23647.033936: in_packet: 01 4074 ffc0 ffc1 00 000f0048 9001c83b 122 45 23647.033937: in_packet: 01 4075 ffc0 ffc1 00 000f0050 9001ffff 002 46 23647.033938: in_packet: 01 4076 ffc0 ffc1 00 000f0050 9001e1a6 122 47 23647.035426: out_packet: 01 4123 ffc1 ffc0 01 010f00d0 9001fb40 122 17 23647.035428: out_packet: 01 4124 ffc1 ffc0 01 010f00d8 9001ffff 002 18 23647.035429: out_packet: 01 4125 ffc1 ffc0 01 010f00d8 900114aa 122 19 23647.035430: out_packet: 01 4126 ffc1 ffc0 01 010f00e0 90012a15 122 20 (Here, some common fields are omitted so that a line to be within 80 characters.) ... One line represent one packet. The legend for the last nine fields is: - The second of cycle scheduled for the packet - The count of cycle scheduled for the packet - The ID of node as source (hex) - Some devices transfer packets with invalid source node ID in their CIP header. - The ID of node as destination (hex) - The value is not in CIP header of packets. - The value of isochronous channel - The first quadlet of CIP header (hex) - The second quadlet of CIP header (hex) - The number of included quadlets - The index of packet in a buffer maintained by this module This is an example to parse these lines from text file by Python3 script: \#!/usr/bin/env python3 import sys def parse_ts(second, cycle, syt): offset = syt & 0xfff syt >>= 12 if cycle & 0x0f > syt: cycle += 0x10 cycle &= 0x1ff0 cycle |= syt second += cycle // 8000 cycle %= 8000 # In CYCLE_TIMER of 1394 OHCI, second is represented in 8 bit. second %= 128 return (second, cycle, offset) def calc_ts(second, cycle, offset): ts = offset ts += cycle * 3072 # In DMA descriptor of 1394 OHCI, second is represented in 3 bit. ts += (second % 8) * 8000 * 3072 return ts def subtract_ts(minuend, subtrahend): # In DMA descriptor of 1394 OHCI, second is represented in 3 bit. if minuend < subtrahend: minuend += 8 * 8000 * 3072 return minuend - subtrahend if len(sys.argv) != 2: print('At least, one argument is required for packet dump.') sys.exit() filename = sys.argv[1] data = [] prev = 0 with open(filename, 'r') as f: for line in f: pos = line.find('packet:') if pos < 0: continue pos += len('packet:') line = line[pos:].strip() fields = line.split(' ') datum = [] datum.append(fields[8]) syt = int(fields[6][4:], 16) # Empty packet in IEC 61883-1, or NODATA in IEC 61883-6 if syt == 0xffff: data_blocks = 0 else: payload_size = int(fields[7], 10) data_block_size = int(fields[5][2:4], 16) data_blocks = (payload_size - 2) / data_block_size datum.append(data_blocks) second = int(fields[0], 10) cycle = int(fields[1], 10) start = (second << 25) | (cycle << 12) datum.append('0x{0:08x}'.format(start)) start = calc_ts(second, cycle, 0) datum.append("0x" + fields[5]) datum.append("0x" + fields[6]) if syt == 0xffff: second = 0 cycle = 0 tick = 0 else: second, cycle, tick = parse_ts(second, cycle, syt) ts = calc_ts(second, cycle, tick) datum.append(start) datum.append(ts) if ts == 0: datum.append(0) datum.append(0) else: # Usual case, or a case over 8 seconds. if ts > start or start > 7 * 8000 * 3072: datum.append(subtract_ts(ts, start)) if ts > prev or start > 7 * 8000 * 3072: gap = subtract_ts(ts, prev) datum.append(gap) else: datum.append('backward') else: datum.append('invalid') prev = ts data.append(datum) sys.exit() The data variable includes array with these elements: - The index of the packet - The number of data blocks in the packet - The value of cycle count (hex) - The value of CIP header 1 (hex) - The value of CIP header 2 (hex) - The value of cycle count (tick) - The value of calculated presentation timestamp (tick) - The offset between the cycle count and presentation timestamp - The elapsed ticks from the previous presentation timestamp Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09ALSA: firewire-lib: compute the value of second field in cycle count for IR ↵Takashi Sakamoto
context In callback function of isochronous context, modules can queue packets to indicated isochronous cycles. Although the cycle to queue a packet is deterministic by calculation, this module doesn't implement the calculation because it's useless for processing. In future, the cycle count is going to be printed with the other parameters for debugging. This commit is the preparation. The cycle count is computed by cycle unit, and correctly arranged to corresponding packets. The calculated count is used in later commit. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09ALSA: firewire-lib: compute the value of second field in cycle count for IT ↵Takashi Sakamoto
context In callback function of isochronous context, u32 variable is passed for cycle count. The value of this variable comes from DMA descriptors of 1394 Open Host Controller Interface (1394 OHCI). In the specification, DMA descriptors transport lower 3 bits for second field and full cycle field in 16 bits field, therefore 16 bits of the u32 variable are available. The value for second is modulo 8, and the value for cycle is modulo 8,000. Currently, ALSA firewire-lib module don't use the value of the second field, because the value is useless to calculate presentation timestamp in IEC 61883-6. However, the value may be useful for debugging. In later commit, it will be printed with the other parameters for debugging. This commit makes this module to handle the whole cycle count including second. The value is calculated by cycle unit. The existed code is already written with ignoring the value of second, thus this commit causes no issues. Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-09ALSA: hda - Fix white noise on Asus UX501VW headsetKaho Ng
For reducing the noise from the headset output on ASUS UX501VW, call the existing fixup, alc_fixup_headset_mode_alc668(), additionally. Thread: https://bbs.archlinux.org/viewtopic.php?id=209554 Signed-off-by: Kaho Ng <ngkaho1234@gmail.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-08ALSA: hda: fix to wait for RIRB & CORB DMA to setJeeja KP
If the DMAs are not being quiesced properly, it may lead to stability issues, so the recommendation is to wait till DMAs are stopped. After setting the stop bit of RIRB/CORB DMA, we should wait for stop bit to be set. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-08ALSA: hda: fix the missing ptr initializationVinod Koul
ebus is a member of extended device and was never initialized, so do this at device creation. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-08ALSA: usb-midi: correct speed checkingOliver Neukum
Allow for SS+ USB devices Signed-off-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-08ALSA: usb-audio: correct speed checkingOliver Neukum
Allow handling SS+ USB devices correctly. Signed-off-by: Oliver Neukum <oneukum@suse.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-08ALSA: hda/realtek - New codecs support for ALC234/ALC274/ALC294Kailang Yang
Support new codecs for ALC234/ALC274/ALC294. This three codecs was the same IC. But bonding is not the same. Signed-off-by: Kailang Yang <kailang@realtek.com> Cc: <stable@vger.kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-08ALSA: isa/wavefront: prevent some out of bound writesDan Carpenter
"header->number" can be up to USHRT_MAX and it comes from the ioctl so it needs to be capped. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-08ALSA: timer: Fix leak in events via snd_timer_user_tinterruptKangjie Lu
The stack object “r1” has a total size of 32 bytes. Its field “event” and “val” both contain 4 bytes padding. These 8 bytes padding bytes are sent to user without being initialized. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-08ALSA: timer: Fix leak in events via snd_timer_user_ccallbackKangjie Lu
The stack object “r1” has a total size of 32 bytes. Its field “event” and “val” both contain 4 bytes padding. These 8 bytes padding bytes are sent to user without being initialized. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-08ALSA: timer: Fix leak in SNDRV_TIMER_IOCTL_PARAMSKangjie Lu
The stack object “tread” has a total size of 32 bytes. Its field “event” and “val” both contain 4 bytes padding. These 8 bytes padding bytes are sent to user without being initialized. Signed-off-by: Kangjie Lu <kjlu@gatech.edu> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-08ALSA: dice: add support for M-Audio Profire 610 and perhaps 2626Takashi Sakamoto
M-Audio Profire 610 has an unexpected value in version field of its config ROM, thus ALSA dice driver is not assigned to the model due to a mismatch of modalias. This commit adds an entry to support the model. I expect the entry is also for Profire 2626. I note that Profire 610 uses TCD2220 (so-called Dice Jr.), and supports a part of Extended Application Protocol (EAP). $ cd linux-firewire-utils/src $ ./crpp < /sys/bus/firewire/devices/fw1/config_rom ROM header and bus information block ------------------------------------------------------------ 400 04047689 bus_info_length 4, crc_length 4, crc 30345 404 31333934 bus_name "1394" 408 e0ff8112 irmc 1, cmc 1, isc 1, bmc 0, pmc 0, cyc_clk_acc 255, max_rec 8 (512), max_rom 1, gen 1, spd 2 (S400) 40c 000d6c04 company_id 000d6c | 410 04400002 device_id 0404400002 | EUI-64 000d6c0404400002 root directory ------------------------------------------------------------ 414 000695fe directory_length 6, crc 38398 418 03000d6c vendor 41c 8100000a --> descriptor leaf at 444 420 17000011 model 424 8100000d --> descriptor leaf at 458 428 0c0087c0 node capabilities per IEEE 1394 42c d1000001 --> unit directory at 430 unit directory at 430 ------------------------------------------------------------ 430 0004fb14 directory_length 4, crc 64276 434 12000d6c specifier id 438 130100d1 version 43c 17000011 model 440 8100000c --> descriptor leaf at 470 descriptor leaf at 444 ------------------------------------------------------------ 444 0004b8e4 leaf_length 4, crc 47332 448 00000000 textual descriptor 44c 00000000 minimal ASCII 450 4d2d4175 "M-Au" 454 64696f00 "dio" descriptor leaf at 458 ------------------------------------------------------------ 458 00053128 leaf_length 5, crc 12584 45c 00000000 textual descriptor 460 00000000 minimal ASCII 464 50726f46 "ProF" 468 69726520 "ire " 46c 36313000 "610" descriptor leaf at 470 ------------------------------------------------------------ 470 00053128 leaf_length 5, crc 12584 474 00000000 textual descriptor 478 00000000 minimal ASCII 47c 50726f46 "ProF" 480 69726520 "ire " 484 36313000 "610" $ cat /proc/asound/card1/dice sections: global: offset 10, size 90 tx: offset 100, size 142 rx: offset 242, size 282 ext_sync: offset 524, size 4 unused2: offset 0, size 0 global: owner: ffc0:000100000000 notification: 00000040 nick name: FW610 clock select: internal 48000 enable: 1 status: locked 48000 ext status: 00000040 sample rate: 48000 version: 1.0.4.0 clock caps: 32000 44100 48000 88200 96000 176400 192000 aes1 aes4 aes adat tdif wc arx1 arx2 internal clock source names: SPDIF\AES34\AES56\TOS\AES_ANY\ADAT\ADAT_AUX\Word Clock\Unused\Unused\Unused\Unused\Internal\\ ... Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Signed-off-by: Takashi Iwai <tiwai@suse.de>
2016-05-06ASoC: da7129: Add missing include of acpi.hMark Brown
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-06ASoC: pxa: Fix module autoload for platform driversAndrea Adami
These platform drivers are lacking MODULE_ALIAS so module autoloading doesn't work. Tested on corgi and poodle with kernel 4.4. Signed-off-by: Andrea Adami <andrea.adami@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-05ASoC: Intel: Skylake: Fix memory leak in nhlt initJeeja KP
During skl_nhlt_init(), acpi obj pointer is allocated and never freed and remap address is not unmapped. To fix this we should release the ACPI obj and also unmap the nhlt address during cleanup of driver. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-05ASoC: topology: Fix memory leak in widget creationJeeja KP
name and sname allocated in widget create are not freed when creation is successful, so free them. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-05ASoC: fsl_sai: Allow setting the SAI MCLK directionFabio Estevam
On mx6ul the General Purpose Register 1 (GPR1) contains the following bits for configuring the direction of the SAI MCLKs: SAI1_MCLK_DIR, SAI2_MCLK_DIR, SAI3_MCLK_DIR Introduce the "fsl,sai-mclk-direction-output" optional property to allow configuring the SAI_MCLK outputs. Tested on a imx6ul-evk board. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-05ASoC: fsl_sai: Introduce a compatible string for MX6ULFabio Estevam
MX6UL may need to configure the General Purpose Register 1 (GPR1), so it is better to add a new compatible string to differentiate. Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com> Acked-by: Nicolin Chen <nicoleotsuka@gmail.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-05ASoC: da7219: Add initial ACPI id for deviceAdam Thomson
This adds "DLGS7219" ACPI id for the codec. Signed-off-by: Adam Thomson <Adam.Thomson.Opensource@diasemi.com> Tested-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-05ASoC: rt5645: polling jd status in all conditionsBard Liao
We only polling jd status when rt5645->pdata.jd_invert is true. However, it should be done at all time since there will be no interrupt for jd if we press a headset button and remove the headset at the same time. Signed-off-by: Bard Liao <bardliao@realtek.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-04ASoC: rockchip: Revert "ASoC: rockchip: i2s: separate capture and playback"John Keeping
This reverts commit eba65d179c1149cf79e68608d452631f33d7f017. This broke audio on Veyron Jerry Chromebooks and I now cannot reproduce the problem I was trying to fix even with this commit reverted, so it seems that this was completely the wrong thing to do. Reported-by: Enric Balletbo Serra <eballetbo@gmail.com> Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-04ASoC: rockchip: Revert "ASoC: rockchip: i2s: remove unused variables"John Keeping
This reverts commit 5938448b99275cba95167c3f9d39ca9225fdad38. It turns out that the commit that made these variables unused is wrong so we're about to revert it. Bring back the variables in prepration. Signed-off-by: John Keeping <john@metanate.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-04ASoC: wm_adsp: Detach compressed stream on freeCharles Keepax
If someone powers down the DSP core (through routing changes say) whilst a compressed record is in progress we can end up using a freed pointer to the buffer object. When a compressed audio stream is triggered we attach it to a buffer on a physical DSP. This patch adds a detach of the buffer from the stream when the stream is freed or when the DSP is powered down which avoids the situation where we use a buffer when it is no longer valid. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-04ASoC: wm_adsp: Move compr_attach/attached functionsCharles Keepax
Move wm_adsp_compr_attach and wm_adsp_compr_attached functions so they will stay logically grouped with similar functions after some additional changes. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-04Merge branch 'topic/arizona' of ↵Mark Brown
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound into asoc-adsp
2016-05-03ASoC: hdac_hdmi: Potential NULL deref in hdac_hdmi_get_spk_alloc()Dan Carpenter
We intended || here instead of &&. The original code potentially leads to a NULL dereference. Fixes: 2889099eb8cd ('ASoC: hdac_hdmi: Register chmap controls and ops') Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewd-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Vinod Koul <vinod.koul@intel.com> Tested-by: Sachin Mokashi <sachinx.mokashi@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-02ASoC: wm_adsp: Add support for TLV based binary controlsCharles Keepax
This patch adds support for the arbitrary length TLV based binary controls. This allows users to properly access controls that are more than 512 bytes in length. Signed-off-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-02ASoC: Intel: Boards: remove ignore_suspend for WoV streamsJeeja KP
On WoV we can suspend the DMA and keep the DSP pipelines only On, so remove the ignore_suspend for WoV streams but keep them for WoV endpoints. This helps in achieving better power by suspending DMAs Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-02ASoC: Intel: Skylake: Suspend PCMs when marked as active suspendJeeja KP
For 'ignore_suspend' cases we need to keep DSP and pipes On, but can suspend the stream and pause the DMA as we are not rendering data during the suspended time. For this we can check the dai widget ignore_suspend flag in trigger suspend/resume, and start and stop the host DMA and host copier pipelines. Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-02ASoC: Intel: Skylake: Prevent sending Set DMA Control IPC if the widget is "On"Dharageswari.R
If widget of a playback or capture DAI is already On, then no need not send the Set DMA Control IPC message to firmware. Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-02ASoC: Intel: Skylake: Fix memory leak during init instanceMousumi Jana
param_data variable is allocated during set module format of init instance is not getting freed and hence can cause a memory leak. So free it up. Signed-off-by: Mousumi Jana <mousumix.jana@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-02ASoC: Intel: Skylake: Fix the NULL pointer exception in dsp_clean upDharageswari.R
If request firmware fails at init, the code loader DMA allocation can be NULL, so check for boot complete before freeing up these resources Signed-off-by: Dharageswari R <dharageswari.r@intel.com> Signed-off-by: Jeeja KP <jeeja.kp@intel.com> Signed-off-by: Vinod Koul <vinod.koul@intel.com> Signed-off-by: Mark Brown <broonie@kernel.org>
2016-05-02Merge tag 'asoc-fix-v4.6-rc5' into asoc-intelMark Brown
ASoC: Fixes for v4.6 This is a fairly large collection of fixes but almost all driver specific ones, especially to the new Intel drivers which have had a lot of recent development. The one core fix is a change to the debugfs code to avoid crashes in some relatively unusual configurations.