* 'fix/asoc' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ASoC: Select wm_hubs automatically for WM8994
ASoC: Remove duplicate AUX definition from WM8776
ASoC:: remove a redundant snd_soc_unregister_codec call in wm8988_register
ASoC: wm8727: add a missing return in wm8727_platform_probe
ASoC: fsi: fixup wrong value setting order of TDM
ASoC: fsi: fixup clock inversion operation
Otherwise all machine drivers need to do so.
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
snd_soc_unregister_codec is called twice if snd_soc_register_dai fail.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
otherwise the error path will always be executed.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
channel size should be set before setting register value
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Clock inversion should be specified by each flags bit.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Many codecs now clear the pin controls at suspend via snd_hda_shutup_pins()
for reducing the click noise at power-off. But this leaves some pins
uninitialized, and they'll be never recovered after resume.
This patch adds the proper recovery of cleared pin controls on resume.
Also it adds a check of bus->shutdown so that pins won't be cleared at
module unloading.
Reference: Kernel bug 16339
http://bugzilla.kernel.org/show_bug.cgi?id=16339
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When the PCI SSID gives an overriding SKU assno, PC-beep bit isn't
detected (since it's located over 16bit), resulting in no PC beep.
Also, many devices seem ignoring the requirement by Realtek's spec
for SSID numbers, and it also confuses the PC beep detection.
This patch assumes the PC beep is available on every machine with
PCI SSID override. It's a regression fix from 2.6.34.
Reference: Kernel bug 16251
http://bugzilla.kernel.org/show_bug.cgi?id=16251
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: usb/endpoint, fix dangling pointer use
ALSA: asihpi - Get rid of incorrect "long" types and casts.
ASoC: DaVinci: Fix McASP hardware FIFO configuration
ALSA: hda - Fix line-in for mb5 model MacBook (Pro) 5,1 / 5,2
ALSA: usb-audio: fix UAC2 control value queries
ALSA: usb-audio: parse UAC2 sample rate ranges correctly
ALSA: usb-audio: fix control messages for USB_RECIP_INTERFACE
ALSA: usb-audio: add check for faulty clock in parse_audio_format_rates_v2()
ALSA: hda - Don't check capture source mixer if no ADC is available
Some programs like Skype trying to set capture volume automatically.
Normally it will tray, carefully step by step lover or higher, set the volume.
In real word it work not really well, because devises and vendors lie about
real audio settings.
For example most Logitech webcams have 6400 or 3500 steps for capture volume.
They do not tell that actual resolution is 384. So we have only 7 or 18 real
steps. In this patch I set real resolution only for tested devices.
Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
BugLink: https://bugs.launchpad.net/bugs/463178
Set Macbook 5,2 (106b:4a00) hardware to use ALC885_MB5
Cc: <stable@kernel.org>
Signed-off-by: Luke Yelavich <luke.yelavich@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix the following compile warning. kctl should be NULL-initialized.
sound/pci/hda/patch_realtek.c: In function ‘alc_build_controls’:
sound/pci/hda/patch_realtek.c:2550:23: warning: ‘kctl’ may be used uninitialized in this function
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Stanse found that in snd_usb_parse_audio_endpoints, there is a
dangling pointer dereference. When snd_usb_parse_audio_format fails,
fp is freed, and continue invoked. On the next loop, there is
"fp && fp->altsetting == 1 && fp->channels == 1" test, but fp is set
from the last iteration (but is bogus) and thus ilegally dereferenced.
Set fp to NULL before "continue".
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
These give incorrect results for index wrap on 64 bit.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Compiling in the MPC5200 sound drivers results in the following build error:
sound/soc/fsl/mpc5200_psc_ac97.o: In function `to_psc_dma_stream':
mpc5200_psc_ac97.c:(.text+0x0): multiple definition of `to_psc_dma_stream'
sound/soc/fsl/mpc5200_dma.o:mpc5200_dma.c:(.text+0x0): first defined here
sound/soc/fsl/efika-audio-fabric.o: In function `to_psc_dma_stream':
efika-audio-fabric.c:(.text+0x0): multiple definition of `to_psc_dma_stream'
sound/soc/fsl/mpc5200_dma.o:mpc5200_dma.c:(.text+0x0): first defined here
make[3]: *** [sound/soc/fsl/built-in.o] Error 1
make[2]: *** [sound/soc/fsl] Error 2
make[1]: *** [sound/soc] Error 2
make: *** [sound] Error 2
This patch fixes it by declaring the inline function in the header file to
also be a static.
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Cc: Jon Smirl <jonsmirl@gmail.com>
Tested-by: John Hilmar Linkhorst <John.Linkhorst@rwth-aachen.de>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
On DA830/OMAP-L137 and DA850/OMAP-L138 SoCs, the McASP peripheral
has FIFO support. This FIFO provides additional data buffering. It
also provides tolerance to variation in host/DMA controller response
times. More details of the FIFO operation can be found at
http://focus.ti.com/general/docs/lit/getliterature.tsp?literatureNumber=sprufm1&fileType=pdf
Existing sequence of steps for audio playback/capture are:
a. DMA configuration
b. McASP configuration (configures and enables FIFO)
c. Start DMA
d. Start McASP (enables FIFO)
During McASP configuration, while FIFO was being configured, FIFO
was being enabled in davinci_hw_common_param() function of
sound/soc/davinci/davinci-mcasp.c file. This generated a transmit
DMA event, which gets serviced when DMA is started.
https://patchwork.kernel.org/patch/84611/ patch clears the DMA
events before starting DMA, which is the right thing to do. But
this resulted in a state where DMA was waiting for an event from
McASP (after step c above), but the event which was already there,
has got cleared (because of step b above).
The fix is not to enable the FIFO during McASP configuration as
FIFO was being enabled as part of McASP start.
Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The line-in input is 0x7 not 0x2 for MacBook (Pro) 5,1 / 5,2 models
Signed-off-by: Alex Murray <murray.alex@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
For RANGE requests, we should only query as much bytes as we're in fact
interested in.
For CUR requests, we shouldn't confuse the firmware with an overlong
request but just ask for 2 bytes.
This might need fixing in the future as it's not entirely clear when to
dispatch 1-byte, 2-byte and 4-byte request blocks. For now, we assume
everything is coded in 16bit - this works for all firmware
implementations I've seen.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Alex Lee <alexlee188@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A device may report its supported sample rates in ranges rather than in
discrete triplets. The code used to only parse the MIN field instead of
properly paying attention to the MAX and RES values.
Also, handle RES values of 1 correctly and announce a continous sample
rate range in this case.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Alex Lee <alexlee188@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Control messages directed to an interface must have the interface number
set in the lower 8 bits of wIndex. This wasn't done correctly for some
clock and mixer messages.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Alex Lee <alexlee188@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
With multiple codec configurations, some codec might have no ADC, thus
it keeps spec->adc_nids = NULL. This causes an Oops in alc_build_controls().
Reference: kernel bug #16156https://bugzilla.kernel.org/show_bug.cgi?id=16156
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: sound/spi: patch for the unuseful variable removal
ALSA: hda - Add SSID table for iMac7,1.
ALSA: hda - Add SSID table for MacBookAir1,1
ALSA: hda - Add SSID table for MacBookAir2,1
ALSA: atmel: set "channel A event" output to debug
* master.kernel.org:/home/rmk/linux-2.6-arm:
ARM: 6164/1: Add kto and kfrom to input operands list.
ARM: 6166/1: Proper prefetch abort handling on pre-ARMv6
ARM: 6165/1: trap overflows on highmem pages from kmap_atomic when debugging
ARM: 6152/1: ux500 make it possible to disable localtimers
[ARM] pxa/spitz: Correctly register WM8750
[ARM] pxa/palmtc: storage class should be before const qualifier
ARM: 6146/1: sa1111: Prevent deadlock in resume path
ARM: 6145/1: ux500 MTU clockrate correction
ARM: 6144/1: TCM memory bug freeing bug
ARM: VFP: Fix vfp_put_double() for d16-d31
The '*bitclk' of structure 'snd_at73c213' seems no use,
so I make a patch to remove the unnecessary variable.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch add's the iMac7,1 SSID entry to
patch_realtek.c which adds sound support.
bug entry:
https://bugs.launchpad.net/mactel-support/+bug/360866
Note:I do not have this machine on hand only
codec#0 file for the machine so please
test if you have the appropriate equipment.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch add's the MacBookAir1,1 SSID entry to
patch_realtek.c which adds sound support.
bug entry:
https://bugs.launchpad.net/mactel-support/+bug/268301
Note:I do not have this machine on hand only
codec#0 file for the machine so please
test if you have the appropriate equipment.
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This adds the SSID number to snd_pci_quirk for the
MacBookAir2,1 taken from codec#0 at:
http://launchpadlibrarian.net/49455483/Card0.Codecs.codec.0.txt
keep in mind I do not have one of these machines on hand
so please if you do have this machine please test for me..
Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6:
ALSA: hda-intel - fix wallclk variable update and condition
ALSA: asihpi - Fix uninitialized variable
ALSA: hda: Use LPIB for ASUS M2V
usb/gadget: Replace the old USB audio FU definitions in f_audio.c
ASoC: MX31ads sound support should depend on MACH_MX31ADS_WM1133_EV1
ASoC: Add missing Kconfig entry for Phytec boards
ALSA: usb-audio: export UAC2 clock selectors as mixer controls
ALSA: usb-audio: clean up find_audio_control_unit()
ALSA: usb-audio: add UAC2 sepecific Feature Unit controls
ALSA: usb-audio: unify constants from specification
ALSA: usb-audio: parse clock topology of UAC2 devices
ALSA: usb-audio: fix selector unit string index accessor
include/linux/usb/audio-v2.h: add more UAC2 details
ALSA: usb-audio: support partially write-protected UAC2 controls
ALSA: usb-audio: UAC2: clean up parsing of bmaControls
ALSA: hda: Use LPIB for another mainboard
ALSA: hda: Use mb31 quirk for an iMac model
ALSA: hda: Use LPIB for an ASUS device
This patch fixes thinko introduced in "last minutes" before commiting
of the last wallclk patch.
It also fixes the condition checking if the first period after last
wallclk update is processed. There is a little rounding error in
period_wallclk.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Initialize prev_ctl properly before reference:
sound/pci/asihpi/asihpi.c: In function ‘snd_card_asihpi_mixer_new’:
sound/pci/asihpi/asihpi.c:2568:30: warning: ‘prev_ctl.dst_node_index’ may be used uninitialized in this function
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Grant patches added an of mach table to struct device_driver. However,
while he changed the macio device code to use that, he left the match
table pointer in struct macio_driver and didn't update drivers to use
the "new" one, thus breaking the probing.
This completes the change by moving all drivers to setup the "new"
one, removing all traces of the old one, and while at it (since it
changes the exact same locations), I also remove two other duplicates
from struct driver which are the name and owner fields.
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
BugLink: https://launchpad.net/bugs/587546
Symptom: On the reporter's ASUS M2V, using PulseAudio in Ubuntu 10.04 LTS
results in the PA daemon crashing shortly after attempting playback of an
audio file.
Test case: Using Ubuntu 10.04 LTS (Linux 2.6.32.12), Linux 2.6.33, or
Linux 2.6.34, attempt playback of an audio file while PulseAudio is
active.
Resolution: add SSID for this machine to the position_fix quirk table,
explicitly specifying the LPIB method.
Reported-and-Tested-By: D Tangman
Cc: <stable@kernel.org>
Signed-off-by: Daniel T Chen <crimsun@ubuntu.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>