Commit Graph

3057 Commits

Author SHA1 Message Date
Clemens Ladisch 11864b4b84 [ALSA] virtuoso: correctly switch input jack on Xonar DX
When selecting the capture source on the Xonar DX, the input jack must
be routed to either the line input or the microphone input by setting a
GPIO pin.  This requires an additional callback so that the model driver
can hook into the toggling of AC97 switches.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch a9d3cc485e [ALSA] virtuoso: add Xonar DX support
Add support for the Asus Xonar DX.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch 80647ee26e [ALSA] virtuoso: fix typo
Fix a (fortunately harmless) typo.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch aef1a535c4 [ALSA] virtuoso: change card short name
Change the card short name to show to show the card name instead of the
chip name.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:32 +02:00
Clemens Ladisch d08267a9df [ALSA] virtuoso: set PCM1796 oversampling rate
When playing data at 96 kHz or higher, reduce the DAC oversampling rate
to 32.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch af9af1741f [ALSA] virtuoso: move some code to xonar_common_init()
Move the code that is common to all Xonar models to a separate function,
and make it more generic in preparation for another model.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch a694a6a0e4 [ALSA] virtuoso: allow both CS5381 and CS5361
Rename all CS5381 symbols to CS53x1 because they can also be used for
Xonar models with a CS5361.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch 271ebfca58 [ALSA] virtuoso: separate D2/D2X init functions
Use separate model structures for the D2 and D2X so that the init
function does not have to check for the model again.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch 10e6d5f9b6 [ALSA] oxygen: add I2C support
Add a function to write I2C registers.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch 7a43567472 [ALSA] aw2: remove duplicate MODULE_LICENSE
"GPL 2" does not mean that there have to be two MODULE_LICENSE("GPL")
entries.  ;-)

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:31 +02:00
Clemens Ladisch e97f79994a [ALSA] oxygen: fix line-in recording selection (now for real)
On C-Media cards, the GPIO pin 0 of the CM9780 must be handled exactly
like on Xonar cards, so move the Xonar code to the common mixer code.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:30 +02:00
Herton Ronaldo Krzesinski 0c4cc4430f [ALSA] hda-codec - Support mic automute for Clevo M720R/SR
Add support for mic automute in clevo-m720r ALC883 model, and rename it
to more generic clevo-m720. Also change model entry in ALSA-Configuration.txt
accordingly.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:30 +02:00
Herton Ronaldo Krzesinski 213f0bfe90 [ALSA] hda-codec - Map clevo-m720r ALC883 model for Clevo M720SR
Map clevo-m720r ALC883 model for Clevo M720SR.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:30 +02:00
Stas Sergeev c81d80cbf6 [ALSA] pcsp: remove downsampling
pcsp: remove S16->U8 downsampling as dmix now supports U8 natively.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:30 +02:00
Takashi Iwai 95866d3802 [ALSA] ymfpci - Fix race at removal
free_irq() must be called first to avoid races at removal.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:30 +02:00
Herton Ronaldo Krzesinski eea6419ea1 [ALSA] hda-codec - Use common 3stack-6ch mixer for 3stack-hp model
Forgot one more: 3stack-hp model also have now the same mixer as
3stack-6ch (after DAC assignment fix in ALC883), so use it avoiding
duplicating the same mixer definition.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Herton Ronaldo Krzesinski f24dbdc61d [ALSA] hda-codec - Use base ALC883 mixer for 6stack-dell model
After DAC assignment fix in ALC883, alc888_6st_dell_mixer is now the
same as alc883_base_mixer. Avoid duplicated code and use
alc883_base_mixer in 6stack-dell model, removing alc888_6st_dell_mixer
definition.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Herton Ronaldo Krzesinski 5d85f8d02a [ALSA] hda-codec - Remove now uneeded 6stack-hp model from ALC883
After DAC assignment fix in ALC883, the 6stack-hp model is now the same
as 6stack-dig. So just remove 6stack-hp model and replace its use with
6stack-dig.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Jiang zhe 0e31daf7d6 [ALSA] hda-codec - model for alc262 to support Lenovo 3000
This model is to support the Lenovo 3000 y410.
ALSA bug#3856:
	https://bugtrack.alsa-project.org/alsa-bug/view.php?id=3856

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Matthew Ranostay 07bcb316cf [ALSA] hda: 92hd71bxxx DMIC nid
Added missing DMIC verb to dell_4_1_pin_configs[].

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Pavel Hofman d16be8ed69 [ALSA] ice1724 - Improved the Juli rate setting
* moving most of clock-specific code to card-specific routines
* support for ESI Juli
* to-be-researched - monitoring of analog/digital inputs

Signed-off-by: Pavel Hofman <dustin@seznam.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Andrew Morton ff73317ea7 [ALSA] sound/pci/pcxhr/pcxhr.c: fix warnings
sparc64:

sound/pci/pcxhr/pcxhr.c: In function `pcxhr_update_r_buffer':
sound/pci/pcxhr/pcxhr.c:459: warning: cast to pointer from integer of different size
sound/pci/pcxhr/pcxhr.c: In function `pcxhr_trigger_tasklet':
sound/pci/pcxhr/pcxhr.c:628: warning: long int format, different type arg (arg 4)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:29 +02:00
Andrew Morton ee0abefde5 [ALSA] sound/pci/pcxhr/pcxhr_core.c: fix printk warning
sound/pci/pcxhr/pcxhr_core.c: In function `pcxhr_set_pipe_state':
sound/pci/pcxhr/pcxhr_core.c:899: warning: long int format, different type arg (arg 4)

suseconds_t is int on sparc64.

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Andrew Morton 91e24faa55 [ALSA] sound/pci/aw2/aw2-alsa.c needs dma-mapping.h
sparc32:

sound/pci/aw2/aw2-alsa.c: In function 'snd_aw2_create':
sound/pci/aw2/aw2-alsa.c:282: error: 'DMA_32BIT_MASK' undeclared (first use in this function)
sound/pci/aw2/aw2-alsa.c:282: error: (Each undeclared identifier is reported only once
sound/pci/aw2/aw2-alsa.c:282: error: for each function it appears in.)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Clemens Ladisch 43dd89c7e7 [ALSA] oxygen: disable clock of unused I2S inputs
Disable the master clock outputs of any unused I2S inputs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Clemens Ladisch db12b8e301 [ALSA] oxygen: move MIDI flag to model struct
Put the flag that enables the MIDI port into the model structure instead
of passing it as a separate parameter to oxygen_pci_probe().

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Clemens Ladisch 87eedd2fd4 [ALSA] oxygen: make SPI/2-wire configuration model-specific
Allow the model drivers to specify if the codec communication goes over
SPI or a 2-wire bus.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Clemens Ladisch f009ad9b39 [ALSA] oxygen: change model-specific PCM device configuration
When specifying which PCM devices to use, model drivers now use flags
that also specify the routing between PCM devices and DMA channels
instead of just DMA channel bits.  This simplifies some code that checks
for these flags.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:28 +02:00
Clemens Ladisch fa5d8106cb [ALSA] oxygen: add monitor controls
Add controls to enable monitoring of the analog and digital inputs.

To allow monitoring after loading the driver when nothing has been
played back or recorded yet, the I2S input and outputs are initialized
to a valid configuration.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Clemens Ladisch 33fa724e29 [ALSA] virtuoso: move PCM1796 symbols to a header file
Move the PCM1796 register symbol definitions to their own header file.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Clemens Ladisch f5b2368ba8 [ALSA] oxygen: move WM8785 symbols to a header file
Move the WM8786 register symbol definitions to their own header file.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Timur Tabi acf5850ea7 [ALSA] Removed deprecated sound/driver.h from Freescale MPC8610 drivers
With commit 9004acc70e, include/sound/driver.h
is deprecated.  This patch removes the #include from fsl_ssi.c and fsl_dma.c.

Signed-off-by: Timur Tabi <timur@freescale.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Takashi Iwai 850f0e5212 [ALSA] hda-intel - Add sync support
Addded the support of sync streams to hda-intel driver.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Takashi Iwai f081374b60 [ALSA] hda-codec - Support of Lenovo Thinkpad X300
Added the model thinkpad for Lenovo Thinkpad X300 with AD1984A codec.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Robert Jarzmik c0bbf48db3 [ALSA] soc - Add missing audio path between Mono Mixer and Mic PGAs
Signed-off-by: Robert Jarzmik <rjarzmik@free.fr>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:27 +02:00
Takashi Iwai 888afa1541 [ALSA] hda-codec - keep the format verb at closing PCM streams
Keep the format verb at closing PCM streams.
Introduced snd_hda_codec_cleanup_stream() for the parcicular purpose.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Takashi Iwai 117f257d7a [ALSA] hda-codec - Fix spekaer output of Panasonic CF-74
Add a new model "panasonic" for Panasonic CF-74 with STAC9200 codec
to fix the speaker output.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Takashi Iwai 2add9b9253 [ALSA] hda-intel - Add barrier
Add proper barriers in the RIRB communication code.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Herton Ronaldo Krzesinski 86d34b7ec8 [ALSA] hda-codec - Map 3stack-6ch-dig ALC883 model for MSI 945GCM5 V2 (MSI-7267)
Map 3stack-6ch-dig ALC883 model for MSI 945GCM5 V2 (MSI-7267).

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Herton Ronaldo Krzesinski f32a19e3e7 [ALSA] hda-codec - Fix DAC assignment order in ALC883
Actually clfe and surround DACs are inverted in alc883_dac_nids array
(see ALC883 datasheet). I discovered this while testing multi-channel
setup (using 3stack-6ch-dig model) on MSI 945GCM5 V2 motherboard that
has an ALC883 codec. Simply Rear Left/Right and Center/LFE were swapped
in 6 channel mode (also in 4 channel mode you didn't get rear left/right
output). Other models also were affected by this bug, as can be seen by
the mixer layouts that "workaround" this (the real bug was not noticed,
and some other models simply played with mixer and initial verbs). Thus
along with fixing the order of dac nids, also change the models that
relied on previous dac ordering properly.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Mariusz Kozlowski 9ecaedae0d [ALSA] sound/drivers/pcsp/pcsp.c build fix
sound/drivers/pcsp/pcsp.c: In function 'snd_pcsp_create':
sound/drivers/pcsp/pcsp.c:54: error: 'loops_per_jiffy' undeclared (first use in\ this function)
sound/drivers/pcsp/pcsp.c:54: error: (Each undeclared identifier is reported on\ ly once
sound/drivers/pcsp/pcsp.c:54: error: for each function it appears in.)

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Atsushi Nemoto f5e09ef098 [ALSA] at73c213: Add constraints for periods value
The interrupt handler always provide runtime->period_size data, so it
works correctly only if buffer_size was a multiple of period_size.

This patch fixes periodic click noise.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:26 +02:00
Julia Lawall b32300a4ce [ALSA] sound/pci: remove unused variable
The variable is_capture is initialized but never used otherwise.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@@
type T;
identifier i;
constant C;
@@

(
extern T i;
|
- T i;
  <+... when != i
- i = C;
  ...+>
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Takashi Iwai 43337ac0de [ALSA] ice1724 - Fix return codes in some pointis callbacks
Fixed the return codes (1 for changed values) in put callbacks of
pontis.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Takashi Iwai 5a220c868e [ALSA] usb-audio - Add a proper error check
The error in check_hw_params_convention() has to be checked and
handled properly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Pavel Hofman 841b23d4d7 [ALSA] some fixes and cleanup for ICE1724 cards
* removing the hack with NON_AKM ak4xxx type
* support for card-specific flags in ak4114_stats
* definition of the flags for corresponding cards

Signed-off-by: Pavel Hofman <dustin@seznam.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Joachim Foerster 5949d2443d [ALSA] [ML403-AC97CR] Remove duplicate snd_card_set_dev()
We want to have snd_card_set_dev() in _probe(), but not a second one in
snd_ml403_ac97cr_create().

Signed-off-by: Joachim Foerster <JOFT@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Takashi Iwai c93f5a1eca [ALSA] ice1724 - Fix the SPDIF input sample-rate on Juli@
AK4114 on Juli@ has the SPDIF input sample rate detection and
causes errors when an incompatible sample rate is chosen.
The patch adds the open hook to check the current rate and limit
the hw constraints.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:25 +02:00
Tony Vroon 5d9fab2d84 [ALSA] hda-codec - Fujitsu Lifebook port replicator/dock headphone jack sense
The docking station headphone output had no audio and jack sense
was not considered.

Jack information from the laptop itself and the dock are combined, as
the dock does not obscure the connector.

Signed-off-by: Tony Vroon <tony@linx.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Takashi Iwai ee9d6b9a30 [ALSA] hda-intel - Fix power-off hang on ASUS P5AD2
The hda-intel driver has a problem at power-off on ASUS P5AD2.
It's caused when the position-buffer is enabled -- most likely a
hardware-specific problem.

This patch adds a quirk to avoid the unnecessary enablement of
position-buffer.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Herton Ronaldo Krzesinski 3da23cac3d [ALSA] hda-codec - Map 3stack-6ch-dig ALC662 model for Asus P5GC-MX
Map 3stack-6ch-dig ALC662 model for Asus P5GC-MX.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Herton Ronaldo Krzesinski 7055ad8a99 [ALSA] hda-codec - Fix ALC662 DAC mixer mutes
Currently ALC662 doesn't suport amp mute for AmpOut in nids 0x02, 0x03,
0x04 (see block diagram in ALC662 datasheet page 3, does M correspond to
mute?). The result is that currently mute for "Front Playback Switch",
"Surround Playback Switch", "Center Playback Switch" and "LFE Playback
Switch" mixer items doesn't work (tested on Asus P5GC-MX motherboard
with 3stack-6ch model).

The solution I found for this is to mute the proper inputs in 0x0c,
0x0d, 0x0e audio mixers.

Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Takashi Iwai 2626a263ff [ALSA] hda-codec - Fix orphan Headphone controls in STAC codecs
Currently, the headphone controls are created as Master wrongly in
some cases, and this prevents the virtual master controls.
The patch fixes the problem by simply using "Headphone" always for
headphone controls.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Matthew Ranostay d654a66035 [ALSA] hda: 92HD73xxx distortion fix
Fixed issue on some laptops that if the Master mixer and DAC mixers are
turned all the way up that will cause distortion. This is fixed by limiting
the max volume with the volume knob nid.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Stas Sergeev 1bc1f30565 [ALSA] pcsp: locking fix
pcsp: locking fix.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:24 +02:00
Takashi Iwai bb9f76cd59 [ALSA] hda-codec - Improve ALC262 ultra model
Improved ALC262 ultra model for Samsung Q1 Ultra series.

- clean up mixers
- support of input from HP jack as a mic
- add quirk for Q1 EL

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:23 +02:00
Atsushi Nemoto 9f2f0f7c4e [ALSA] at73c213: remove redundant private_free routine
snd_pcm_lib_preallocate_free_for_all() is called from snd_pcm_free() just
after calling the private_free routine.  So there should be no need to call
it in driver's private_free routine.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:23 +02:00
Takashi Iwai 9166257797 [ALSA] aw2 - Rename aw2-tsl.h to aw2-tsl.c
aw2-tsl.h should be rather a C file to be included since it's referred
only in aw2-saa6146.c and includes a table data.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:23 +02:00
Michael Gruber ee7a9c7c2e [ALSA] hda-intel - Fix microphone capture with ALC880 F1734 model
The default capture source should be the mic which is 0x01 on this model.
In addition to that the change to VREF50 allows for higher capture volume.

Signed-off-by: Michael Gruber <lists.mg@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:23 +02:00
Matthew Ranostay 7747ecceb5 [ALSA] hda: Reorganized DAC outputs
Changed so that internal speakers point to the Front mixer instead of Surround.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:23 +02:00
Atsushi Nemoto 4a295ca474 [ALSA] at73c213: monaural support
Add support for monaural playback to at73c213 driver.  The sound will be apear
on L-channel.  Tested on AT91SAM9260-EK.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:22 +02:00
Atsushi Nemoto c67582b195 [ALSA] at73c213: fix error checking for clk API
The clk_round_rate() and clk_set_rate() will return int, so not store thier
return value to unsigned long variable.  This bug hides real error on these
API.

Signed-off-by: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:22 +02:00
Tobin Davis b419f34699 [ALSA] HDA Codecs: add support for Toshiba Equium L30
This patch adds support for the Toshiba Equium L30 laptop and renames the mixer
controls to match Laptop usages.

Signed-off-by: Tobin Davis <tdavis@dsl-only.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:22 +02:00
Julia Lawall 21ac1f9934 sound: Use BUG_ON
if (...) BUG(); should be replaced with BUG_ON(...) when the test has no
side-effects to allow a definition of BUG_ON that drops the code completely.

The semantic patch that makes this change is as follows:
(http://www.emn.fr/x-info/coccinelle/)

// <smpl>
@ disable unlikely @ expression E,f; @@

(
  if (<... f(...) ...>) { BUG(); }
|
- if (unlikely(E)) { BUG(); }
+ BUG_ON(E);
)

@@ expression E,f; @@

(
  if (<... f(...) ...>) { BUG(); }
|
- if (E) { BUG(); }
+ BUG_ON(E);
)
// </smpl>

Signed-off-by: Julia Lawall <julia@diku.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2008-04-24 12:00:22 +02:00
Takashi Iwai 0ccb541c96 [ALSA] hda-codec - Add internal mic item for ALC268 acer model
Added the internal mic as a capture source item for ALC268 acer model.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:22 +02:00
Takashi Iwai 7194cae62e [ALSA] hda-codec - Fix dmics on ALC268 in auto configuration
Fixed the handling of dmics on ALC268 in the auto-configuration mode.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:22 +02:00
Peer Chen 487145a198 [ALSA] hda_intel: Add the DIDs of nvidia MCP79 HD audio controller to hda_intel.c
Add the Device IDs of nvidia MCP79 HD audio controller to hda_intel.c

Signed-off-by: Peer Chen <peerchen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:22 +02:00
Jiang zhe 2de3c232a0 [ALSA] hda-codec - model for cx20549 to support laptop HP530
Currently the model laptop-hpsense use the 0x12 as ExtMic,
and use 0x14 as Internal IntMic.
But the hp530 only have one ExtMic, the Pin widget is 0x14.

In this patch, I changed the mixer item for them.
I still reserved the IntMic item, it will be helpful if
other machine may use this model.

ALSA bug#3821.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:21 +02:00
Jiang zhe fb97dc6739 [ALSA] hda-codec - model for alc883 to support FUJITSU Pi2515
There is no suitable model for Pi2515.
This model is to support it.  ALSA bug#3800.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:21 +02:00
Stas Sergeev 52337310af [ALSA] pcsp: improve "enable" option handling
Simplify init code.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:21 +02:00
Pascal Terjan 8280823668 [ALSA] ALC288 - Add NEC S970 to the quirk table
NEC S970 has no sound in the internal speakers when autodetection is
used.
With targa-dig model, there is sound in the speakers and it gets
correctly muted when pluging headphones.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:21 +02:00
Stas Sergeev a91605b86a [ALSA] pcsp - clean ups
- make pcsp_start_timer_tasklet static
- remove redundant includes. <asm/i8253.h> is not available on all platforms.

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:21 +02:00
Jiang zhe 368c7a95ea [ALSA] hda-codec - model for alc883 to support M720R
There is no suitable model for M720R (ALSA bug#3781).
This patch is to support HP jack-sensing and mixer.

Signed-off-by: Jiang zhe <zhe.jiang@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Takashi Iwai fd2499f0ed [ALSA] aw2 - Remove endian dependency
Removed unnecessary dependency on the little-endianess.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Harvey Harrison 9bf8e7ddea [ALSA] sound: replace remaining __FUNCTION__ occurences
__FUNCTION__ is gcc-specific, use __func__

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Andrew Morton 24982c5f7f [ALSA] hda_intel needs dma-mapping.h
sparc32:

sound/pci/hda/hda_intel.c: In function 'azx_create':
sound/pci/hda/hda_intel.c:1838: error: 'DMA_64BIT_MASK' undeclared (first use in this function)
sound/pci/hda/hda_intel.c:1838: error: (Each undeclared identifier is reported only once
sound/pci/hda/hda_intel.c:1838: error: for each function it appears in.)

Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Graeme Gregory ae092c9ede [ALSA] soc - Add Invert Switch for ROUT2
GTA02 device has a speaker between LOUT2 & ROUT2 and in this mode ROUT2
needs to be inverted. This patch adds a mixer control for this.

Signed-off-by: Graeme Gregory <graeme@openmoko.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Stas Sergeev 9ab4d072ad [ALSA] Add PC-speaker sound driver
Added PC-speaker sound driver (snd-pcsp).

Signed-off-by: Stas Sergeev <stsp@aknet.ru>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Takashi Iwai 40ac8c4f20 [ALSA] hda-codec - Fix the array over-range access with stac92hd71bxx codec
Add the check of the array range for dac_nids to prevent the over-range
access.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:20 +02:00
Matthew Ranostay 52fe0f9d59 [ALSA] hda: add verbs for 92hd73xxx laptops
Added core_init[] for several 92hd73xxx laptops.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:19 +02:00
Matthew Ranostay bce6c2b5b4 [ALSA] hda: disable power management on fixed ports
Power management can't be enabled on fixed ports, since the presence
will always return false and prevent output.

Signed-off-by: Matthew Ranostay <mranostay@embeddedalley.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:19 +02:00
Harvey Harrison 3c9a3203ff [ALSA] sound: hda: missing includes of hda_patch.h
Move the array declaration to hda_codec.c where it is used and add includes
where the individual presets are declared.

Fixes the following sparse warnings:
sound/pci/hda/patch_realtek.c:13744:25: warning: symbol 'snd_hda_preset_realtek' was not declared. Should it be static?
sound/pci/hda/patch_cmedia.c:729:25: warning: symbol 'snd_hda_preset_cmedia' was not declared. Should it be static?
sound/pci/hda/patch_analog.c:3656:25: warning: symbol 'snd_hda_preset_analog' was not declared. Should it be static?
sound/pci/hda/patch_sigmatel.c:3995:25: warning: symbol 'snd_hda_preset_sigmatel' was not declared. Should it be static?
sound/pci/hda/patch_si3054.c:286:25: warning: symbol 'snd_hda_preset_si3054' was not declared. Should it be static?
sound/pci/hda/patch_atihdmi.c:156:25: warning: symbol 'snd_hda_preset_atihdmi' was not declared. Should it be static?
sound/pci/hda/patch_conexant.c:1721:25: warning: symbol 'snd_hda_preset_conexant' was not declared. Should it be static?
sound/pci/hda/patch_via.c:1962:25: warning: symbol 'snd_hda_preset_via' was not declared. Should it be static?

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:19 +02:00
Takashi Iwai 64ed0dfd1f [ALSA] hda-codec - Use int instead of long in patch_sigmatel.c
The HD-audio parameters are at most 32bit int.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:19 +02:00
Harvey Harrison 8b55178515 [ALSA] sound: patch_sigmatel.c fix shadowed variable warning
Temp variable in the loop shadows the second argument (which is otherwise
unused in this function).  Change this to defcfg as it is used to hold
the default config.
sound/pci/hda/patch_sigmatel.c:2759:18: warning: symbol 'cfg' shadows an earlier one
sound/pci/hda/patch_sigmatel.c:2734:26: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:19 +02:00
Harvey Harrison 0b76b51e58 [ALSA] sound: hdspm.c fix returning void expression warnings
Just drop the returns.
sound/pci/rme9652/hdspm.c:1031:3: warning: returning void-valued expression
sound/pci/rme9652/hdspm.c:1033:3: warning: returning void-valued expression

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:18 +02:00
Harvey Harrison 0cd87b10ca [ALSA] sound: riptide.c fix shadowed variable warnings
In both cases we are passing around the substream number, use
sub_num for this.
sound/pci/riptide/riptide.c:1633:6: warning: symbol 'index' shadows an earlier one
sound/pci/riptide/riptide.c:121:12: originally declared here
sound/pci/riptide/riptide.c:1673:6: warning: symbol 'index' shadows an earlier one
sound/pci/riptide/riptide.c:121:12: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:18 +02:00
Harvey Harrison caba7f70fc [ALSA] sound: pcxhr_core.c fix shadowed variable warning
Inner loop redeclares err with u32 rather than int, stupid fix here
is to change the inner err to err2.
sound/pci/pcxhr/pcxhr_core.c:1008:8: warning: symbol 'err' shadows an earlier one
sound/pci/pcxhr/pcxhr_core.c:983:6: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:18 +02:00
Harvey Harrison ff143874d0 [ALSA] sound: virtuoso.c fix shadowed variable warning
Use priv_idx as an identifier.
sound/pci/oxygen/virtuoso.c:277:15: warning: symbol 'index' shadows an earlier one
sound/pci/oxygen/virtuoso.c:56:12: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:18 +02:00
Harvey Harrison c3daa92d60 [ALSA] sound: ice1712.c fix shadowed variable warnings
In all four case, adding a private value to the iooff index,
call it priv_idx.
sound/pci/ice1712/ice1712.c:1300:6: warning: symbol 'index' shadows an earlier one
sound/pci/ice1712/ice1712.c:85:12: originally declared here
sound/pci/ice1712/ice1712.c:1312:6: warning: symbol 'index' shadows an earlier one
sound/pci/ice1712/ice1712.c:85:12: originally declared here
sound/pci/ice1712/ice1712.c:1338:6: warning: symbol 'index' shadows an earlier one
sound/pci/ice1712/ice1712.c:85:12: originally declared here
sound/pci/ice1712/ice1712.c:1350:6: warning: symbol 'index' shadows an earlier one
sound/pci/ice1712/ice1712.c:85:12: originally declared here

[tiwai - fixed coding issues as well]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:18 +02:00
Harvey Harrison f2948fc2f0 [ALSA] sound: emu10k1x.c fix shadowed variable warnings
enable in these contexts refers specifically to intr enable, as
per the two functions it is found in.  Use intr_enable instead.
sound/pci/emu10k1/emu10k1x.c:330:15: warning: symbol 'enable' shadows an earlier one
sound/pci/emu10k1/emu10k1x.c:53:12: originally declared here
sound/pci/emu10k1/emu10k1x.c:341:15: warning: symbol 'enable' shadows an earlier one
sound/pci/emu10k1/emu10k1x.c:53:12: originally declared here

instead of shadowing, use cap_voice as we test for the capture
voice in this statement.
sound/pci/emu10k1/emu10k1x.c:798:25: warning: symbol 'pvoice' shadows an earlier one
sound/pci/emu10k1/emu10k1x.c:787:24: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:18 +02:00
Harvey Harrison 4677df07e5 [ALSA] sound: emuproc.c fix signedness warning
Reading regs from the fpga into an int instead of a u32, trivial
fix.
sound/pci/emu10k1/emuproc.c:422:34: warning: incorrect type in argument 3 (different signedness)
sound/pci/emu10k1/emuproc.c:422:34:    expected unsigned int [usertype] *value
sound/pci/emu10k1/emuproc.c:422:34:    got int *<noident>

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:18 +02:00
Harvey Harrison 3fa4a90738 [ALSA] sound: au88x0_pcm.c fix integer as NULL pointer warning
sound/pci/au88x0/au88x0_pcm.c:508:15: warning: Using plain integer as NULL pointer

Also some small codingstyle fixes.

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:17 +02:00
Ahmet İnan 470f23b873 [ALSA] snd-dummy - better realtime app support
when the time interval for a period is smaller than kernel HZ, then
snd-aloop and snd-dummy cannot call snd_pcm_period_elapsed as fast enough
annymore. this happens for example with games. but the app still needs to
see, that the buffer actually did go further, which is provided by these
patches.

Signed-off-by: Ahmet İnan <ainan <at> mathematik.uni-freiburg.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:17 +02:00
Harvey Harrison bed515b0df [ALSA] sound: ca0106_mixer.c fix shadowed variable warnings
Change the variable err to _err within the ADD_CTLS macro to avoid
shadowing the local variable.

sound/pci/ca0106/ca0106_mixer.c:710:2: warning: symbol 'err' shadows an earlier one
sound/pci/ca0106/ca0106_mixer.c:663:6: originally declared here
sound/pci/ca0106/ca0106_mixer.c:712:3: warning: symbol 'err' shadows an earlier one
sound/pci/ca0106/ca0106_mixer.c:663:6: originally declared here
sound/pci/ca0106/ca0106_mixer.c:721:3: warning: symbol 'err' shadows an earlier one
sound/pci/ca0106/ca0106_mixer.c:663:6: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:17 +02:00
Harvey Harrison d967a02712 [ALSA] sound: ca0106_main.c fix shadowed variable warnings
change to intr_enable as per the two functions it is defined in.
sound/pci/ca0106/ca0106_main.c:438:15: warning: symbol 'enable' shadows an earlier one
sound/pci/ca0106/ca0106_main.c:159:12: originally declared here
sound/pci/ca0106/ca0106_main.c:449:15: warning: symbol 'enable' shadows an earlier one
sound/pci/ca0106/ca0106_main.c:159:12: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:17 +02:00
Harvey Harrison c74056d437 [ALSA] sound: ali5451.c fix shadowed variable warnings
enable is used to test for whether or not spdif should be enabled,
change to spdif_enable.

sound/pci/ali5451/ali5451.c:1812:15: warning: symbol 'enable' shadows an earlier one
sound/pci/ali5451/ali5451.c:63:12: originally declared here
sound/pci/ali5451/ali5451.c:1840:27: warning: symbol 'enable' shadows an earlier one
sound/pci/ali5451/ali5451.c:63:12: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:17 +02:00
Harvey Harrison 608b10bad3 [ALSA] sound: ac97_pcm.c fix shadowed variable warning
err is always assigned before it is used, no need to declare another
inside the if statement.
sound/pci/ac97/ac97_pcm.c:577:7: warning: symbol 'err' shadows an earlier one
sound/pci/ac97/ac97_pcm.c:572:6: originally declared here

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:17 +02:00
Harvey Harrison 44977b719f [ALSA] sound: rme96.c fix integer as NULL pointer warning
kernel style does assignment outside of if() block
sound/pci/rme96.c:1562:71: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:17 +02:00
Harvey Harrison 4db9e4f2b5 [ALSA] sound: rme32.c fix integer as NULL pointer warning
kernel style does assignment outside of if() statements.
sound/pci/rme32.c:1353:71: warning: Using plain integer as NULL pointer

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:16 +02:00
Harvey Harrison e37273d348 [ALSA] sound: maestro3.c fix shadowed variable warnings
change id to elem_id as it is used to initialize each mixer element
sound/pci/maestro3.c:2071:25: warning: symbol 'id' shadows an earlier one
sound/pci/maestro3.c:67:13: originally declared here

index is used in each of these places to count over the dsp's memory,
change to the name dsp_index
sound/pci/maestro3.c:2572:9: warning: symbol 'index' shadows an earlier one
sound/pci/maestro3.c:66:12: originally declared here
sound/pci/maestro3.c:2604:9: warning: symbol 'index' shadows an earlier one
sound/pci/maestro3.c:66:12: originally declared here

[tiwai - fixed coding style issues as well]

Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2008-04-24 12:00:16 +02:00