[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>
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.)
Takashi Iwai [Fri, 14 Mar 2008 16:17:09 +0000 (17:17 +0100)]
[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.
Takashi Iwai [Fri, 14 Mar 2008 14:52:20 +0000 (15:52 +0100)]
[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.
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>
Takashi Iwai [Fri, 14 Mar 2008 08:18:32 +0000 (09:18 +0100)]
[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.
Matthew Ranostay [Fri, 14 Mar 2008 07:46:51 +0000 (08:46 +0100)]
[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>
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.
Atsushi Nemoto [Sat, 8 Mar 2008 10:07:26 +0000 (11:07 +0100)]
[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.
Jiang zhe [Thu, 6 Mar 2008 10:09:09 +0000 (11:09 +0100)]
[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.
Pascal Terjan [Tue, 4 Mar 2008 10:33:28 +0000 (11:33 +0100)]
[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.
Andrew Morton [Tue, 4 Mar 2008 09:08:58 +0000 (10:08 +0100)]
[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>
Harvey Harrison [Fri, 29 Feb 2008 10:59:26 +0000 (11:59 +0100)]
[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>
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>
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>
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>
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>
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>
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>
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>
Harvey Harrison [Fri, 29 Feb 2008 10:44:26 +0000 (11:44 +0100)]
[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>
Ahmet İnan [Thu, 28 Feb 2008 11:46:32 +0000 (12:46 +0100)]
[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>
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>
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>
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>
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>
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>
id was only used as a counter in a for loop, move the declaration
to where it is used and change it to i.
sound/pci/fm801.c:1288:6: warning: symbol 'id' shadows an earlier one
sound/pci/fm801.c:51:13: originally declared here
[tiwai - fixed a coding style issue as well]
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Harvey Harrison [Thu, 28 Feb 2008 10:53:41 +0000 (11:53 +0100)]
[ALSA] sound: es1968.c fox shadowed variable warning
id is used when initializing the mixer elements, use elem_id here
instead.
sound/pci/es1968.c:1963:25: warning: symbol 'id' shadows an earlier one
sound/pci/es1968.c:129:13: originally declared here
Signed-off-by: Harvey Harrison <harvey.harrison@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Clemens Ladisch [Mon, 25 Feb 2008 09:59:52 +0000 (10:59 +0100)]
[ALSA] mpu401: reduce tx loop timeout
Reduce the number of times to check for a non-empty Tx FIFO from 100 to
2 because there is no MPU-401 implementation that needs more than one or
two reads to determine the actual FIFO status.
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Remy Bruno [Fri, 22 Feb 2008 16:57:02 +0000 (17:57 +0100)]
[ALSA] hdsp - RME 9632 fix at 192kHz
The bits indicating SPDIF frequency in the status register are not the same for
the 9632 than for the other cards, because it also supports 192kHz. A specific
bitmask has thus been added (used in hdsp_spdif_sample_rate()).
The 9632 does not seem to report external sample rates greater than 96kHz. In
this case, the best seems to report spdif rate when autosync reference is
spdif. This also required to move function hdsp_spdif_sample_rate().
Signed-off-by: Remy Bruno <remy.bruno@trinnov.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Vladimir Barinov [Mon, 18 Feb 2008 10:40:22 +0000 (11:40 +0100)]
[ALSA] Davinci ASoC support
Add ASoC support for the TI Davinci SoC and the Davicni-EVM reference board.
It includes:
- ASoC Davinci DMA driver
- ASoC Davinci I2S (Davinci McBSP module based) driver
- ASoC Davinci-EVM reference board
Signed-off-by: Vladimir Barinov <vbarinov@ru.mvista.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>