Save a little extra power by enabling the DC servo offset correction
for the output channels only when the relevant channels are enabled.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Modify the default startup sequence in the chip to set the DC servo
dither level for optimal performance.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
CLK_DSP provides a master clock for the DAC and ADC related functionality
on the device.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Many modern CODECs have shared resources on chip which must be enabled
for portions of the chip to work but which can be disabled at other times
in order to achieve power savings. Examples of such resources include
power supplies and some internal clocks.
Since these widgets are dependencies for the audio path but do not carry
audio signals they require slightly different handling to most widgets -
they do not contribute to the audio path and so should not be counted as
either inputs or outputs during path walks.
Cases where one supply provides a supply for another will require
additional work. There is also room for more optimisation of the graph
walking to avoid repeated checks for the same thing.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Add checking in hw_params and prepare to detect bufferless pcms(i.e. BT
<--> codec).
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Appearently, a big delay ~300ms is required before hw is settled and ready
to transfer samples on some hardware variants. Also, return back
"clocking to 48000Hz" message when something fails.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
- Support ASUS F81Se F5Q P80 U20A U80 U50 UX50 for ALC269
- Support ASUS F70SL UX20 X58LE F50Z N80Vc N81Te N505Tp Vx3V N5051A
for ALC663
- Support DELL ZM1 for ALC272
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Don't unmute unneeded amps for input mixers of ALC662 & co.
It caused possible recording noises.
Signed-off-by: Kailang Yang <kailang@realtek.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The legacy i2c binding model is going away soon, so convert the ppc
keywest sound driver to the new model or it will break.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The legacy i2c binding model is going away soon, so convert the AOA
codec drivers to the new model or they'll break.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Tested-by: Johannes Berg <johannes@sipsolutions.net>
Tested-by: Andreas Schwab <schwab@linux-m68k.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Rather than having switch statements at point of use make the DAPM
power check a member of the widget structure and set it when we
instantiate the widget.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This also switches us to using a switch statement for the widget type
in dapm_power_widget().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This will form a basis for further power check refactoring: the overall
goal of these changes is to allow us to check power separately to
applying it, allowing improvements in the power sequencing algorithms.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Add Voice DAI to support the PCM voice interface of the twl4030 codec.
The PCM voice interface can be used with 8-kHz(voice narrowband) or
16-kHz(voice wideband) sampling rates, and 16bits, and mono RX and mono
TX or stereo TX.
The PCM voice interface has two modes
- PCM mode1 : This uses the normal FS polarity and the rising edge of
the clock signal.
- PCM mode2 : This uses the FS polarity inverted and the falling edge
of the clock signal.
If the system master clock is not 26MHz or the twl4030 codec mode is not
option2, the voice PCM interface is not available.
Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Use it to clean up snd_us122l_card_used[].
Without patch unplugging of an US122L soundcard didn't reset the
corresponding element of snd_us122l_card_used[] to 0.
The (SNDRV_CARDS + 1)th plugging in did not result in creating the soundcard
device anymore.
Index values supplied with the modprobe command line were not used correctly
anymore after the first unplugging of an US122L.
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Cc: stable@kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Firstly, this patch makes the palm27x asoc driver a little more sane. Also,
since all affected devices use GPIO95 as AC97_nRESET, this patch sets that
properly. Affected are PalmT5, TX and LifeDrive.
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
* fix/hda:
ALSA: hda - Set function_id only on FG nodes
ALSA: hda - Add upper-limit of mixer amp for AD1884A-laptop model, too
ALSA: hda - Fix headphone-detection on some machines with STAC/IDT codecs
ALSA: hda_intel.c - Consolidate bitfields
I notice that the fixes were merged, minus one:
sound/soc/codecs/wm9705.c: At top level:
sound/soc/codecs/wm9705.c:445: warning: initialization from incompatible pointer type
so you might find this trivial patch useful.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
(Re)set function_id only from the value on FG nodes.
The current code overrides the value with the last widget.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The original implementation of the constraints were good against sane
applications.
If the opening sequence is:
stream1_open, stream1_hw_params, stream2_open, stream2_hw_params -> the
constraints are set correctly for stream2.
But if the sequence is:
stream1_open, stream2_open, stream2_hw_params, stream1_hw_params -> than stream2
would receive constraint rate = 0, sample_bits = 0, since the stream1 has not
yet called hw_params...
The command to trigger this event:
gst-launch-0.10 alsasrc device=hw:0 ! alsasink device=hw:0 sync=false
This patch does some 'black magic' in order to always set the correct
constraints and sets it only when it is needed for the other stream.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
My email address is going to expire soon so update it. Adding also
Peter Ujfalusi <peter.ujfalusi@nokia.com> as a second contact to OMAP core
drivers since I won't have anymore access to non-public OMAP documentation
in the future and Peter is working with these drivers as well.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Cc: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Those macros are just screwed as soon as CONFIG_PXA25x is enabled.
This patch
- changes ssp_set_scr to take an ssp_dev pointer instead of ssp_device
- adds a corresponding ssp_get_scr function.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Within 2.6.30's mergewindow, struct urb's transfer_buffer_length has become
unsigned. This changed an "int > int" comparision to an "unsigned > int" one
in snd_usb_122l.
Fix this by using a local int variable instead of urb->transfer_buffer_length
in comparisions.
Shorten playback_prep_freqn() a bit and tweak error-paths in
usb_stream_prepare_playback().
Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
DSP_A mode is similar to the DSP_B, but the MSB is delayed with
one bclk (appears after the FS pulse and not under it).
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Use single-phase mode for the DSP mode and keep the dual phase
mode for the I2S mode.
The mono (1 channel) mode already used single phase mode,
now it is more cleaner. There is no need to configure the
second phase, when the single phase is used.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Acked-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Using inverted FS polarity in OSK5912 must be an error since TLV320AIC23
do not have support for inverted polarities. This is mostly due the hassle
with the DSP formats in OMAP McBSP DAI and inversion on OMAP side probably
just made this configuration working at some point.
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Arun KS <arunks@mistralsolutions.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The DSP format wasn't still correct in OMAP McBSP DAI even after the commit
bd25867a6c.
Thanks to Peter Ujfalusi <peter.ujfalusi@nokia.com> for noticing and being
part of the fix. Now the FS length definition is more clear by defining
it with FWID(0).
Signed-off-by: Jarkko Nikula <jarkko.nikula@nokia.com>
Acked-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix accidental change of <mach/regs-gpio.h> to
<plat/regs-gpio.h> in s3c2412-i2s.c
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix the build error in s3c-i2s-v2.c caused by
a change to the snd_soc_dai ops field.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The definition of s3c_i2sv2_iis_calc_rate was never
renamed from s3c2412_iis_calc_rate, so rename this
to allow the build to work.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Fix build errors in sound/soc/s3c24xx/jive_wm8750.c
from changes to ASoC.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
pxa_ssp_set_dai_fmt() currently has an early exit if the desired format
equals the current configuration. This is correct behaviour unless this
function is called with a zero value parameter for the first time.
Zero is a valid value for this function, but the early exit is bogus in
this case.
Hence, set priv->dai_fmt to -1 in the beginning so we can configure the
port.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Cc: pHilipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
When the headphone can have no unique DAC, the current code doesn't
check the HP-detection although it should. Put the hp-detection check
before the DAC check to fix this bug.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Some limited volume controls (mostly simple attenuations) have only two
settings so the ASoC info functions misreport them as booleans. Since
we currently have no better information check for " Volume" in the
control name and always report any controls matching as being integer.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Subject says it all. Briefly, use hp_only for another Dell Inspiron 8600.
Reference: Ubuntu #41015 (https://launchpad.net/bugs/41015)
Signed-off-by: Daniel T Chen <seven.steps@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
While cleaning up quirks, I noticed that there is a duplicated quirk for
the SSID 0x103c0934. Looking back through the bug reports, I've concluded
that there is only one necessary quirk (hp_mute_led), so this patch
removes the conflicting one.
Reference: Ubuntu #44066 (https://launchpad.net/bugs/44066)
Signed-off-by: Daniel T Chen <seven.steps@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Commit fa00e046b4
added a new bitfield not adjacent to other
bitfields in the same struct. Moved the new one.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Fix the key value generation for get/set amp verbs. The upper bits of
the parameter have to be combined with the verb value to be unique for
each direction/index of amp access.
This fixes the resume problem on some hardwares like Macbook after
the channel mode is changed.
Tested-by: Johannes Berg <johannes@sipsolutions.net>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
* topic/memdup_user:
ALSA: sound/pci: use memdup_user()
ALSA: sound/usb: use memdup_user()
ALSA: sound/isa: use memdup_user()
ALSA: sound/core: use memdup_user()
* 'master' of git://git.alsa-project.org/alsa-kernel:
[ALSA] intel8x0: add one retry to the ac97_clock measurement routine
[ALSA] intel8x0: fix wrong conditions in ac97_clock measure routine
[ALSA] intel8x0: do not use zero value from PICB register
[ALSA] intel8x0: an attempt to make ac97_clock measurement more reliable
[ALSA] pcm-midlevel: Add more strict buffer position checks based on jiffies
[ALSA] hda_intel: fix unexpected ring buffer positions
Added the models for quirk bitmask 1734:110x and 1734:113x of
Fujitsu laptops.
This will fix the model detection for Amilo Xa3540.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
It seems that on some hardware platforms, the first measurement is wrong.
This patch adds second measurement to this case.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Currently there are two possible platform datas for the PXA AC97 driver:
one supported by the generic AC97 driver only which provides callbacks
to allow board-specific configuration at stream startup and teardown,
and another for pxa2xx-ac97-lib which allows configuration of the reset
GPIO for PXA2xx CPUs.
Obviously this won't actually work when using the generic AC97 driver
since the drivers will attempt to parse the platform data in both
formats. Fix this by merging the two structures.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Don't call snd_jack_report at release of sigmatel and conexnat codecs
which results in Oops at unloading the module.
The Oops is triggered by the power-up sequence during the free due to
the pincfg restoration. Since the power-up sequence is involved with
the unsol handling, the jack reporting may be issued during that.
The Oops occurs with this jack reporting because the jack instances
have been already released but the codec doesn't do the proper
book-keeping.
This patch adds the book-keeping of jack instances to avoid the access
to bogus pointers.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added private_data and private_free fields to struct snd_jack so that
the caller can assign the data. It'll be helpful for avoiding the
double-free of the jack instance.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This is the second go through of the old DMA_nBIT_MASK macro,and there're not
so many of them left,so I put them into one patch.I hope this is the last round.
After this the definition of the old DMA_nBIT_MASK macro could be removed.
Signed-off-by: Yang Hongyang <yanghy@cn.fujitsu.com>
Cc: Russell King <rmk@arm.linux.org.uk>
Cc: Tony Lindgren <tony@atomide.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Greg KH <greg@kroah.com>
Cc: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
It seems that the zero value from the PICB (position in current buffer)
register is not reliable. Use jiffies to correct returned value
from the ring buffer pointer callback.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
- use monotonic posix clock to measure time
- try to avoid reading zero from PICB (position in current buffer) register
- show also measured samples
- when clock is near 41000 or 44100, use exactly these values
(they appears to be reference clocks for hardware manufacturers)
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
The WM8960 is a low power, high quality stereo codec designed for
portable digital audio applications.
Stereo class D speaker drivers provide 1W per channel into 8W loads.
Guaranteed low leakage, excellent PSRR and pop/click suppression
mechanisms enable direct battery connection for the speaker supply.
The device also integrates a complete microphone interface and a stereo
headphone driver. External component requirements are drastically
reduced as no separate microphone, speaker or headphone amplifiers are
required. Advanced on-chip digital signal processing performs automatic
level control for the microphone or line input.
Stereo 24-bit sigma-delta ADCs and DACs are used with low power
over-sampling digital interpolation and decimation filters and a
flexible digital audio interface.
The master clock can be input directly or generated internally by an
onboard PLL, supporting most commonly-used clocking schemes.
This driver was originally written by Liam Girdwood, with substantial
subsequent additions and updates for feature completeness and changes in
the ASoC framework from me.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
SCMODE(0): Data Driven (Falling), Data Sampled (Rising), Idle State (Low)
SCMODE(1): Data Driven (Rising), Data Sampled (Falling), Idle State (Low)
SCMODE(2): Data Driven (Rising), Data Sampled (Falling), Idle State (High)
SCMODE(3): Data Driven (Falling), Data Sampled (Rising), Idle State (High)
SCMODE(3) does not invert the clock polarity compared to the default SCMODE(0).
This patch also adds all possible NF/IF, NB/IB combinations to the DSP_A and
DSP_B modes.
Signed-off-by: Daniel Ribeiro <drwyrm@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This ensures that we sync with the DAPM powerdown sequencing properly
and don't need to bounce the power on the voice DAC so often.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This is simple code motion, intended to support future refactoring of
the DAPM algorithms and (more immediately) the additon of events for
DACs and ADCs.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Some drivers like Intel8x0 or Intel HDA are broken for some hardware variants.
This patch adds more strict buffer position checks based on jiffies when
internal hw_ptr is updated. Enable xrun_debug to see mangling of wrong
positions.
As a side effect, the hw_ptr interrupt update routine might do slightly better
job when many interrupts are lost.
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
I found two issues with ICH7-M (it should be related to other HDA chipsets
as well):
- the ring buffer position is not reset when stream restarts (after xrun) -
solved by moving azx_stream_reset() call from open() to prepare() callback
and reset posbuf to zero (it might be filled with hw later than position()
callback is called)
- irq_ignore flag should be set also when ring buffer memory area is not
changed in prepare() callback - this patch replaces irq_ignore with
more universal check based on jiffies clock
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Due to the process and communications issues with the 2.6.30 S3C
platform merges none of the underlying arch/arm code for S3C64xx audio
support made it into mainline, rendering the drivers useless. Disable
them in Kconfig to avoid user confusion - users patching in the required
support can always reenable this too.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Add DSP_A interface format support by setting the LRP bit in
DSP mode.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Eric Miao <eric.miao@marvell.com>
Cc: Philipp Zabel <philipp.zabel@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
The WM8988 is a low power, high quality stereo CODEC designed for
portable digital audio applications.
The device integrates complete interfaces to 2 stereo headphone or line
out ports. External component requirements are drastically reduced as no
separate headphone amplifiers are required. Advanced on-chip digital
signal processing performs graphic equaliser, 3-D sound enhancement and
automatic level control for the microphone or line input.
The WM8988 can operate as a master or a slave, with various master clock
frequencies including 12 or 24MHz for USB devices, or standard 256fs
rates like 12.288MHz and 24.576MHz. Different audio sample rates such as
96kHz, 48kHz, 44.1kHz are generated directly from the master clock
without the need for an external PLL.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Many devices require symmetric configurations of capture and playback
data formats, often due to shared clocking but sometimes also due to
other shared playback and record configuration in the device. Start
providing core support for this by allowing the DAIs or the machine
to specify that the sample rates used should be kept symmetric.
A flag symmetric_rates is provided in the snd_soc_dai and
snd_soc_dai_link structures. If this is set in either of the DAIs or in
the machine then a constraint will be applied when a stream is already
open preventing any changes in sample rate.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound-2.6: (36 commits)
ALSA: hda - Add VREF powerdown sequence for another board
ALSA: oss - volume control for CSWITCH and CROUTE
ALSA: hda - add missing comma in ad1884_slave_vols
sound: usb-audio: allow period sizes less than 1 ms
sound: usb-audio: save data packet interval in audioformat structure
sound: usb-audio: remove check_hw_params_convention()
sound: usb-audio: show sample format width in proc file
ASoC: fsl_dma: Pass the proper device for dma mapping routines
ASoC: Fix null dereference in ak4535_remove()
ALSA: hda - enable SPDIF output for Intel DX58SO board
ALSA: snd-atmel-abdac: increase periods_min to 6 instead of 4
ALSA: snd-atmel-abdac: replace bus_id with dev_name()
ALSA: snd-atmel-ac97c: replace bus_id with dev_name()
ALSA: snd-atmel-ac97c: cleanup registers when removing driver
ALSA: snd-atmel-ac97c: do a proper reset of the external codec
ALSA: snd-atmel-ac97c: enable interrupts to catch events for error reporting
ALSA: snd-atmel-ac97c: set correct size for buffer hardware parameter
ALSA: snd-atmel-ac97c: do not overwrite OCA and ICA when assigning channels
ALSA: snd-atmel-ac97c: remove dead break statements after return in switch case
ALSA: snd-atmel-ac97c: cleanup register definitions
...
Replace all DMA_24BIT_MASK macro with DMA_BIT_MASK(24)
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Replace all DMA_28BIT_MASK macro with DMA_BIT_MASK(28)
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Replace all DMA_30BIT_MASK macro with DMA_BIT_MASK(30)
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Replace all DMA_31BIT_MASK macro with DMA_BIT_MASK(31)
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Replace all DMA_32BIT_MASK macro with DMA_BIT_MASK(32)
Signed-off-by: Yang Hongyang<yanghy@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Fix for compillation error introduced by the constrain patch.
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@nokia.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Add powerdown sequence for VREF using a shared jack when the headphone
is present and the microphone isn't on.
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added an else part to check
SNDRV_MIXER_OSS_PRESENT_CVOLUME for MIC (slot 7)
in commit 36c7b833e5
Similarly, checks and volume control is required for
SNDRV_MIXER_OSS_PRESENT_CSWITCH and SNDRV_MIXER_OSS_PRESENT_CROUTE
as well.
Signed-off-by: Deepika Makhija <deepika.makhija@einfochips.com>
Signed-off-by: Viral Mehta <viral.mehta@einfochips.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
To enable periods shorter than 1 ms, we have to make sure that short
periods are only available for alternate settings that have a small
enough data packet interval. Furthermore, the code that aligns URBs to
USB frames is now superfluous.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The data packet interval needs to be available in the audioformat
structure, together with the other audio format parameters, so that it
can be used to influence ALSA hardware parameters.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This removes the check_hw_params_convention() function because
1) it is not necessary, as the hw_rule_* functions also work correctly
(i.e., as no-ops) when the device supports all combinations of the
audio format parameters; and
2) it would become too complex when adding a fourth altsetting-dependent
hardware parameter, as this would require another three loops to
check dependecies with rate/channels/format.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
When listing the device's sample formats in the stream? proc file, the
sample format number itself is rather obscure, so we better show the
format width, too.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
The driver should pass a device that specifies internal DMA ops, but
substream->pcm is just a logical device, and thus doesn't have arch-
specific dma callbacks, therefore following bug appears:
Freescale Synchronous Serial Interface (SSI) ASoC Driver
------------[ cut here ]------------
kernel BUG at arch/powerpc/include/asm/dma-mapping.h:237!
Oops: Exception in kernel mode, sig: 5 [#1]
...
NIP [c02259c4] snd_malloc_dev_pages+0x58/0xac
LR [c0225c74] snd_dma_alloc_pages+0xf8/0x108
Call Trace:
[df02bde0] [df02be2c] 0xdf02be2c (unreliable)
[df02bdf0] [c0225c74] snd_dma_alloc_pages+0xf8/0x108
[df02be10] [c023a100] fsl_dma_new+0x68/0x124
[df02be20] [c02342ac] soc_new_pcm+0x1bc/0x234
[df02bea0] [c02343dc] snd_soc_new_pcms+0xb8/0x148
[df02bed0] [c023824c] cs4270_probe+0x34/0x124
[df02bef0] [c0232fe8] snd_soc_instantiate_card+0x1a4/0x2f4
[df02bf20] [c0233164] snd_soc_instantiate_cards+0x2c/0x68
[df02bf30] [c0234704] snd_soc_register_platform+0x60/0x80
[df02bf50] [c03d5664] fsl_soc_platform_init+0x18/0x28
...
This patch fixes the issue by using card's device instead.
Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Always use request_firmware() for loading yss225_registers image.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
According to the data sheet data is clocked out on the falling edge
and latched on the rising edge of the bit clock. While the left sample
is transmitted the word clock line is low.
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ak4535_remove() from sound/soc/codecs/ak4535.c calls
i2c_unregister_device() with a possibly null pointer.
This bug was found by smatch (http://repo.or.cz/w/smatch.git/).
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
ALC889 has two SPDIF outputs: 0x06, 0x10. Board vendors can use either or both.
DX58SO uses 0x10, but the driver assumes 0x06. The safe solution is to add
0x10 as slave output to the existing 0x06.
Reported-by: Jeroen Van Breedam <jeroen.vanbreedam@sgr5.be>
Tested-by: Jeroen Van Breedam <jeroen.vanbreedam@sgr5.be>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch increases periods_min to 6 from 4, this will remove any
hickups where the buffer is not filled fast enough from user space.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch replaces the references to bus_id to the new dev_name() API.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch replaces the references to bus_id to the new dev_name() API.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch will set the channel A and control channel mode register to
zero before disabling the AC97C peripheral.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch will enable the AC97C before resetting the external codec,
leaving the AC97C disabled will result in floating I/O lines that can
affect the reset procedure.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch will enable interrupts from AC97C and report about error
conditions that occurs.
On channel A both overrun and underrun will be enabled depending if
playback and/or capture are enabled. On the control channel the overrun
interrupt is enabled.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch will set a proper maximum bytes for the buffer, which is:
channels * bytes per sample * maximum periods * maximum bytes per period.
It also sets the minimum periods to 6, a value chosen from testing, with
a minimum of 6 periods the system has good time to fill in new audio
data without skipping.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch will take care not to overwrite OCA and ICA registers when
assigning input and output channels. It will also make sure the
registers are at a known state when enabling a channel and clean up
properly in case of an error.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch will remove traces of channel B registers, since they are not
used by the AC97C driver. Channel B might be used for other purposes.
The driver also adds channel status bits TXEMPTY and OVRUN and a
AC97C_CH_MASK macro to ease clearing a channel settings.
Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Added device id in struct for codec 92HD81B1C (0x111d76d5).
Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
A pointer to snd_pmac_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (when having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Johannes Berg <johannes@sipsolutions.net>
Cc: Rene Herman <rene.herman@keyaccess.nl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Add ZV port control switch.
This patch is done after solution
given in the ALSA bug #2872 report.
The patch resolves the issue.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This patch adds machine specific code for the audio part of the Stretch
s6105 IP camera reference design.
The device uses the tlv320aic31(01) codec to generate the clock for
both I2S ports of the soc. While the master clock is generated by a
configurable PLL chip, the code assumes the factory default settings.
An additional kcontrol has been added to handle the special routing of
the board, connecting both HPLCOM and HPROUT to the same pin of the audio
jack. One of these should always be switched off.
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This patch adds a driver for the I2S interface found on Stretch s6000
family processors.
Signed-off-by: Daniel Glöckner <dg@emlix.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>