Commit graph

232387 commits

Author SHA1 Message Date
Kirill A. Shutemov 9d4ed9e077 ALSA: ctxfi - use list_move() instead of list_del()/list_add() combination
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-16 07:48:40 +01:00
Przemyslaw Bruski efed5f2666 ALSA: ctxfi - Clear input settings before initialization
Clear input settings before initialization.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:19:43 +01:00
Przemyslaw Bruski f164753a26 ALSA: ctxfi - Fix SPDIF status retrieval
SDPIF status retrieval always returned the default settings instead of
the actual ones.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:19:42 +01:00
Przemyslaw Bruski 4c1847e884 ALSA: ctxfi - Fix incorrect SPDIF status bit mask
SPDIF status mask creation was incorrect.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Cc: <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:19:30 +01:00
Przemyslaw Bruski 19002fd5f1 ALSA: ctxfi - Fix microphone boost codes/comments
microphone boost was set at +12dB, not +20dB (like in Windows driver
and in adc_conf structure declaration), some comments added.

Signed-off-by: Przemyslaw Bruski <pbruskispam@op.pl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-14 11:15:59 +01:00
Takashi Iwai 7e79443ce2 ALSA: atiixp - Fix wrong time-out checks during ac-link reset
The time-out in snd_atiixp_aclink_reset() is wrongly checked, and
it resulted in exiting from the loop at the first iteration.

Reported-by: Amir Shamsuddin <AmirS2+alsa@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:45:32 +01:00
Paul Bolle 966a7f0dc4 ALSA: intel8x0m: append 'm' to "r_intel8x0"
Appending an 'm' will distinguish it from a similar struct in intel8x0.c

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:22:05 +01:00
Paul Bolle a6e8509f21 ALSA: intel8x0m: add 'm' as "suffix" to static functions
Adding an 'm' will distinguish them from identical names in intel8x0.c.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:22:02 +01:00
Paul Bolle 5cd2ad81f9 ALSA: intel8x0m: wait a bit before warm reset check
At every resume a laptop I use prints this message (at KERN_ERR level):
    ALSA sound/pci/intel8x0m.c:904: AC'97 warm reset still in progress? [0x2]

The thing to note here is that 0x2 corresponds to ICH_AC97COLD. Ie, what
seems to be happening is that the register involved indicated a warm
reset for some time (as the ICH_AC97WARM bit was set) but by the time
the warning is printed, and that same register is checked again, that
bit is already cleared and only the ICH_AC97COLD bit is still set.

It turns out a warm reset needs some time to settle, but it is currently
checked right away. The test therefore fails the first time it is done
and schedule_timeout_uninterruptible() will be called. Once we return
from that jiffies is already (far) past end_time on this laptop, so we
exit the loop, print a warning, and exit the function while the warm
reset actually succeeded.

A way to fix this is to call usleep_range() after writing to the
register involved. A handful of tests suggest 500 usecs is a safe value.
(This might punish the "finish cold reset" case, but on this laptop such
a cold reset apparently never happens, so I can't say for sure.)

While we're at it drop the extra single tick from end_time, as it looks
rather silly.

Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 15:22:00 +01:00
Oliver Neukum 88a8516a21 ALSA: usbaudio: implement USB autosuspend
Devices are autosuspended if no pcm nor midi channel is open
Mixer devices may be opened. This way they are active when
in use to play or record sound, but can be suspended while
users have a mixer application running.

[Small clean-ups using static inline by tiwai]

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 14:59:29 +01:00
Oliver Neukum edf7de31c2 ALSA: usbaudio: fix suspend/resume
- ESHUTDOWN must be correctly handled
- the optional interrupt endpoint's URB must be stopped and restarted

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-11 14:51:51 +01:00
Takashi Iwai cc99a0861f Merge branch 'fix/misc' into topic/misc 2011-03-11 14:48:09 +01:00
Alexey Fisher bc3a8a01de ALSA: usb-audio - Add "cval->res = 384" quirk for Logitech Webcam C600
One more affected devices: Logitech Webcam C600 (046d:0808)

Volume range before quirk is 6400, after (also real) is 16.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 16:48:21 +01:00
Alexey Fisher 80acefff3b ALSA: usb-audio - Add volume range check and warn if it too big
Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-10 16:47:56 +01:00
Takashi Iwai 848669da3a sound: Use sound_register_*() for additional OSS minor devices
Since OSS driver creates the device entries for /dev/audio* and
/dev/dspW* by itself without coping with sound_core, it leads to
conflicts with others and let sysfs spewing warnings.

This patch rewrites the registration part of OSS driver to use
the standard method also for additional minor devices.

Reported-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)
Tested-by: Steven Rostedt <rostedt@goodmis.org> (with ktest.pl)
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-09 20:10:37 +01:00
Takashi Iwai a2800300f2 ALSA: asihpi - Use %zd for size_t argument in error message
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 18:20:46 +01:00
Clemens Ladisch 0e82e5fa97 ALSA: control: clean up snd_ctl_hole_check()
The return value of snd_ctl_hole_check() is used only to detect whether
to continue the loop in snd_ctl_find_hole() or not, so we can simplify
the code by changing this return type to a boolean.  Also rename this
function to better show what it actually does.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 13:00:09 +01:00
Clemens Ladisch 7c73358771 ALSA: control: fix numid conflict check for new controls
The purpose of the snd_ctl_hole_check() function is to find conflicts
between the numerical IDs of the new control and those of any existing
controls.  However, it would fail to detect an existing control whose
count is smaller than the new control's count and whose interval of IDs
is entirely contained in the interval of the new control's IDs.

To fix this, use the correct formula to detect overlapping intervals,
which happens to simplify the condition.

This problem was not encountered so far because ALSA does not yet allow
drivers to allocate specific control IDs.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 12:59:48 +01:00
Adrian Knoth bdd3255d3a ALSA: hdspm - Add firmware ID for older AES32 cards.
The current AES32 firmware revision ID is 234, however, a user confirmed
that everything works fine with the previous revision, too.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-03-08 12:59:16 +01:00
Adrian Knoth 7c7102b7af ALSA: hdspm - Fix midi port initialization
Depending on the model and the presence of a TCO module, the number of
midi ports varies. Some have 1 port (MADIface), some have 2 (default),
with TCO, there are 3.

Don't hardcode the number of midi ports to initialize.

This patch also fixes a boot lockup on MADIface.

[Coding-style fixes by tiwai]

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:58:19 +01:00
Adrian Knoth 5027f347ff ALSA: hdspm - Abort on unknown firmware revision
Don't continue if we cannot detect the real card type, otherwise, all
subsequent functions, especially strcpy(), would fail, leaving the whole
driver in an unusable state.

Without such a protection, dmesg would look like this:

Pid: 1525, comm: modprobe Not tainted 2.6.38-rc6 #1 MSI MS-7250/MS-7250
EIP: 0060:[<c114e700>] EFLAGS: 00010296 CPU: 1
EIP is at strcpy+0x10/0x30
EAX: f4d33e58 EBX: f5990800 ECX: f4d33e58 EDX: 00000000
ESI: 00000000 EDI: f4d33e58 EBP: f5990930 ESP: f3dd3e0c
DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
f53d4204 00000000 f90bfc03 00000001 00000001 f3dd3e64 c10fedff f3dd3e7c
f3d854e4 f53d4000 c10307b8 00000001 c10307b8 f5990860 c10307b8 00000001
c10332e5 f59908bc c12f4339 f59908bc f5990860 c11ef207 f4d33e00 f53d4000
[<f90bfc03>] ? snd_hdspm_probe+0x7e7/0x1166 [snd_hdspm]
[<c10fedff>] ? __sysfs_add_one+0x1f/0xf0
[<c10307b8>] ? get_parent_ip+0x8/0x20
[<c10307b8>] ? get_parent_ip+0x8/0x20
[<c10307b8>] ? get_parent_ip+0x8/0x20
[<c10332e5>] ? add_preempt_count+0xa5/0xd0
[<c12f4339>] ? _raw_spin_lock_irqsave+0x19/0x40
[<c11ef207>] ? pm_runtime_enable+0x17/0x80
[<c1160172>] ? local_pci_probe+0x42/0xb0
[<c1161091>] ? pci_device_probe+0x61/0x80
[<c11e9587>] ? driver_probe_device+0x77/0x180
[<c11600f0>] ? pci_match_device+0xa0/0xc0
[<c11e9709>] ? __driver_attach+0x79/0x80
[<c11e9690>] ? __driver_attach+0x0/0x80
[<c11e8e32>] ? bus_for_each_dev+0x52/0x80
[<c11e9416>] ? driver_attach+0x16/0x20
[<c11e9690>] ? __driver_attach+0x0/0x80
[<c11e8771>] ? bus_add_driver+0xa1/0x220
[<c1160f20>] ? pci_device_remove+0x0/0xf0
[<c11e99a3>] ? driver_register+0x63/0x120
[<c11612bd>] ? __pci_register_driver+0x3d/0xb0
[<c1001132>] ? do_one_initcall+0x32/0x160
[<f90d6000>] ? alsa_card_hdspm_init+0x0/0x14 [snd_hdspm]
[<c10676a9>] ? sys_init_module+0x99/0x1e0
[<c10ade3d>] ? sys_close+0x6d/0xc0
[<c1002c90>] ? sysenter_do_call+0x12/0x26
---[ end trace 239f0661c558378b ]---

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:57:21 +01:00
Adrian Knoth 526ea86778 ALSA: hdspm - Add updated firmware revision for AES32
In contrast to the PCIe version (RME AES), the PCI version (RME AES32)
has a different firmware revision.

This patch adds the missing PCI revision.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:56:50 +01:00
Adrian Knoth d2d10a2132 ALSA: hdspm - AES32: Use define instead of hardcoded channel count
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 15:56:29 +01:00
Risto Suominen 8460ae70bb ALSA: powermac - Allow input from microphone on Tumbler
Allow input from microphone on remaining PowerBooks and iBooks with Tumbler.
Tested only with PowerBook G4 Gigabit Ethernet (PowerBook3,3).

[Fixed to use of_machine_is_compatible by tiwai]

Signed-off-by: Risto Suominen <Risto.Suominen@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-28 11:19:17 +01:00
Justin P. Mattock b6aa63eeb3 sound:core:seq:seq_ports.c Remove one to many n's in a word.
The Patch below removes one to many "n's" in a word..

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-27 10:05:53 +01:00
Justin P. Mattock fb9b5a0eb6 ALSA: emu10k1 - emu10k1_main.c remove one to many l's in the word.
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-25 08:52:22 +01:00
Justin P. Mattock a2e2bc2874 ALSA: hda - patch_realtek.c remove one to many l's in the word.
The patch below removes an extra "l" in the word.

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-25 08:51:59 +01:00
Adrian Knoth a7edbd5bf9 ALSA: hdspm - Fix lock/sync reporting on MADI and AES32
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:46:44 +01:00
Adrian Knoth 4ab69a2b3b ALSA: hdspm - prevent reading unitialized stack memory
Original patch by Dan Rosenberg <drosenberg@vsecurity.com> under commit
e68d3b316a. I'm copying his text here:

The SNDRV_HDSPM_IOCTL_GET_CONFIG_INFO ioctl in hdspm.c allow unprivileged
users to read uninitialized kernel stack memory, because several fields
of the hdspm_config struct declared on the stack are not altered
or zeroed before being copied back to the user.  This patch takes care
of it.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:46:29 +01:00
Adrian Knoth 7c4a95b5ec ALSA: hdspm - fix sync check on AES32
Fredrik Lingvall <fredrik.lingvall@gmail.com> has discovered wrong
frequency and sync detection on AES32. According to him, the provided
patch fixes these issues.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:44:42 +01:00
Adrian Knoth f6ea805f52 ALSA: hdspm - Remove input selector on MADIface
In contrast to the RME MADI card, coax/optical selection on the MADIface
is done via a physical switch located at the breakout box. Obviously,
the driver cannot switch ports in software.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:44:06 +01:00
Adrian Knoth 01e9607815 ALSA: hdspm - Fix DS/QS output channel mappings on RME MADI/MADIface
Caused by two typos, no output channel mappings were assigned for
MADI/MADIface at double/quad speed.

The channel mapping is indeed identical to the single speed mapping, the
cards will simply use the first N channels.

Signed-off-by: Florian Faber <faber@faberman.de>
Signed-off-by: Fredrik Lingvall <fredrik.lingvall@gmail.com>
Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:43:30 +01:00
Adrian Knoth 88fabbfcc6 ALSA: hdspm - Restrict channel count on RME AES/AES32
Without calling an appropriate rule, AES/AES32 cards would announce a
theoretical channel count of 64 (HDSPM_MAX_CHANNELS), leading to the
already known bug:

[37422.640481] ------------[ cut here ]------------
[37422.640487] WARNING: at sound/pci/rme9652/hdspm.c:5449
snd_hdspm_ioctl+0x18f/0x202 [snd_hdspm]()
[37422.640489] Hardware name: PRIMERGY RX100 S6
[37422.640490] BUG? (info->channel >= hdspm->max_channels_in)
[37422.640492] Modules linked in: snd_hdspm snd_seq_midi ipmi_watchdog
ipmi_poweroff ipmi_si ipmi_devintf ipmi_msghandler i2c_i801 e1000e
snd_rawmidi power_meter [last unloaded: snd_hdspm]
[37422.640501] Pid: 22231, comm: jackd Tainted: G      D W
2.6.36-gentoo-r5 #5
[37422.640502] Call Trace:
[37422.640508]  [<ffffffff8103db3a>] warn_slowpath_common+0x80/0x98
[37422.640511]  [<ffffffff8103dbe6>] warn_slowpath_fmt+0x41/0x43
[37422.640514]  [<ffffffff81034306>] ? get_parent_ip+0x11/0x42
[37422.640518]  [<ffffffffa0055763>] snd_hdspm_ioctl+0x18f/0x202
[snd_hdspm]
[37422.640522]  [<ffffffff813fd626>] snd_pcm_channel_info+0x73/0x7c
[37422.640525]  [<ffffffff814001e9>] snd_pcm_common_ioctl1+0x326/0xb01
[37422.640527]  [<ffffffff81034306>] ? get_parent_ip+0x11/0x42
[37422.640531]  [<ffffffff8105be6c>] ? __srcu_read_unlock+0x3b/0x59
[37422.640533]  [<ffffffff81400bce>] snd_pcm_capture_ioctl1+0x20a/0x227
[37422.640537]  [<ffffffff811e599c>] ? file_has_perm+0x90/0x9e
[37422.640540]  [<ffffffff81400c15>] snd_pcm_capture_ioctl+0x2a/0x2e
[37422.640543]  [<ffffffff810f2c69>] do_vfs_ioctl+0x404/0x453
[37422.640546]  [<ffffffff810f2d09>] sys_ioctl+0x51/0x74
[37422.640549]  [<ffffffff81002aab>] system_call_fastpath+0x16/0x1b
[37422.640552] ---[ end trace 0cd919cd68118082 ]---

We already have all the right values in place, we simply have to inform
the upper layers about this restriction.

Note that snd_hdspm_hw_rule_rate_out_channels and
snd_hdspm_hw_rule_rate_in_channels must not be called on AES32, because
the channel count is always 16, no matter of the samplerate in use.

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:43:05 +01:00
Adrian Knoth 483cee77d2 ALSA: hdspm - Fix buffer handling on RME MADI/MADIface/AES(32)
Only RayDAT and AIO provide sane buffer pointers that can be used with
HDSPM_BufferPositionMask, on all other cards, this would result in a
wrong HW pointer leading to xruns and these messages:

[260808.916788] BUG: pcmC0D0p:0, pos = 2976, buffer size = 1024, period size = 512
[260808.961124] BUG: pcmC0D0c:0, pos = 4944, buffer size = 1024, period size = 512

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:42:28 +01:00
Adrian Knoth 432d2500ac ALSA: hpdsm - RME AES(32): Fix missing channel mappings
On RME AES and AES(32), none of the required information
(max_channels_in, max_channels_out, channel mappings, port names) was
set, leading to the BUG below.

This patch adds the missing bits, thus fixing the bug.

125.058768] ------------[ cut here ]------------
[  125.058773] WARNING: at sound/pci/rme9652/hdspm.c:5389
snd_hdspm_ioctl+0x10c/0x1d8 [snd_hdspm]()
[  125.058775] Hardware name: PRIMERGY RX100 S6
[  125.058777] BUG? (info->channel >= hdspm->max_channels_out)
[  125.058778] Modules linked in: ipmi_watchdog ipmi_poweroff ipmi_si
ipmi_devintf ipmi_msghandler snd_hdspm power_meter e1000e snd_rawmidi
i2c_i801
[  125.058787] Pid: 3652, comm: audacity Tainted: G        W
2.6.36-gentoo-r5 #5
[  125.058788] Call Trace:
[  125.058792]  [<ffffffff8103db3a>] warn_slowpath_common+0x80/0x98
[  125.058796]  [<ffffffff8103dbe6>] warn_slowpath_fmt+0x41/0x43
[  125.058800]  [<ffffffffa006761a>] snd_hdspm_ioctl+0x10c/0x1d8
[snd_hdspm]
[  125.058803]  [<ffffffff813fd626>] snd_pcm_channel_info+0x73/0x7c
[  125.058806]  [<ffffffff814001e9>] snd_pcm_common_ioctl1+0x326/0xb01
[  125.058809]  [<ffffffff810c604c>] ? __do_fault+0x361/0x3a6
[  125.058812]  [<ffffffff81400e23>] snd_pcm_playback_ioctl1+0x20a/0x227
[  125.058815]  [<ffffffff811e599c>] ? file_has_perm+0x90/0x9e
[  125.058818]  [<ffffffff81400e6a>] snd_pcm_playback_ioctl+0x2a/0x2e
[  125.058821]  [<ffffffff810f2c69>] do_vfs_ioctl+0x404/0x453
[  125.058824]  [<ffffffff810f2d09>] sys_ioctl+0x51/0x74
[  125.058827]  [<ffffffff81002aab>] system_call_fastpath+0x16/0x1b
[  125.058830] ---[ end trace 5bddb08e5d4cbeb1 ]---

Signed-off-by: Adrian Knoth <adi@drcomp.erfurt.thur.de>
Signed-off-by: Florian Faber <faber@faberman.de>
Signed-off-by: Fredrik Lingvall <fredrik.lingvall@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 15:42:15 +01:00
Takashi Iwai 382225e62b ALSA: usb-audio: fix oops due to cleanup race when disconnecting
When a USB audio device is disconnected, snd_usb_audio_disconnect()
kills all audio URBs.  At the same time, the application, after being
notified of the disconnection, might close the device, in which case
ALSA calls the .hw_free callback, which should free the URBs too.

Commit de1b8b93a0 "[ALSA] Fix hang-up at disconnection of usb-audio"
prevented snd_usb_hw_free() from freeing the URBs to avoid a hang that
resulted from this race, but this introduced another race because the
URB callbacks could now be executed after snd_usb_hw_free() has
returned, and try to access already freed data.

Fix the first race by introducing a mutex to serialize the disconnect
callback and all PCM callbacks that manage URBs (hw_free and hw_params).

Reported-and-tested-by: Pierre-Louis Bossart <pierre-louis.bossart@intel.com>
Cc: <stable@kernel.org>
[CL: also serialize hw_params callback]
Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-23 08:15:43 +01:00
David Henningsson 3064967617 ALSA: HDA: Fix mic initialization in VIA auto parser
This typo caused some microphone inputs not to be correctly
initialized on VIA codecs.

Reported-By: Mark Goldstein <goldstein.mark@gmail.com>
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-22 14:02:09 +01:00
Lu Guanqun eeda276bef ALSA: fix one memory leak in sound jack
Signed-off-by: Lu Guanqun <guanqun.lu@intel.com>
Reviewed-by: Wu Fengguang <fengguang.wu@intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-21 09:33:49 +01:00
Raymond Yau 01cb702158 ALSA - au88x0 - add Playback Volume to 10 bands Equalizer Controls
Add " Playback Volume" to 10 bands Equalizer Controls of au88x0 so that
alsa-lib won't regard them as "Capture Volume".

Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-20 10:05:29 +01:00
David Henningsson 89724958e5 ALSA: HDA: Do not announce false surround in Conexant auto
Without this patch, one line-out and one speaker and
Conexant's auto parser would announce (non-working) surround
capabilities.

BugLink: http://bugs.launchpad.net/bugs/721126
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:14:37 +01:00
David Henningsson 983345e51e ALSA: HDA: Conexant auto: Handle multiple connections to ADC node
Conexant 20641 has several inputs to its ADC node, with one selector
and individual amps for all inputs. This patch adds support in the
Conexant auto parser to handle that case.

It also means that the pin node's volume is being renamed to "Boost"
to avoid name clash with the new volume controls on the ADC node.

BugLink: http://bugs.launchpad.net/bugs/719524
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:14:14 +01:00
Andreas Mohr 6ba9256c09 ALSA: azt3328: hook up new emulated AC97 on AC97 patch side
Make newly created AC97 emulation of azt3328 known to the AC97 layer
side.
- relocate common functions to the top (due to definition after use)
- rename control names
- adjust 3D settings to the card's custom layout of this register

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:03:08 +01:00
Andreas Mohr b5dc20cd21 ALSA: azt3328: add custom AC97 semi-emulation use standard ALSA AC97 layer
Make use of the very flexible ALSA ac97 layer (hooks for custom I/O!)
on this weird AC97 copycat hardware,
via semi-extended I/O translation/emulation.

Some 5kB binary/loaded size saved (well... additional huge AC97 module
penalty not factored in, of course ;-P).
Given that the driver previously had 20kB that's not bad,
but the much more important thing is to have AC97 layer stress-tested
with a thoroughly weird AC97 copycat (or, simply put, if it were not for
this AC97 test aspect, this effort would merely have been a nut job ;).

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-19 16:02:24 +01:00
Andreas Mohr 03c2d87a21 ALSA: ac97: replace open-coded, error-prone stuff with AC97 bit defines
Use AC97 macros (sometimes already existing, or newly added)
instead of error-prone repetition of open-coded values.

Signed-off-by: Andreas Mohr <andi@lisas.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-17 18:39:25 +01:00
David Henningsson b540afc2b3 ALSA: HDA: Add position_fix quirk for an Asus device
The bug reporter claims that position_fix=1 is needed for his
microphone to work. The controller PCI vendor-id is [1002:4383] (rev 40).

Reported-by: Kjell L.
BugLink: http://bugs.launchpad.net/bugs/718402
Cc: stable@kernel.org
Signed-off-by: David Henningsson <david.henningsson@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 22:52:24 +01:00
Takashi Iwai eaae55dac6 ALSA: caiaq - Fix possible string-buffer overflow
Use strlcpy() to assure not to overflow the string array sizes by
too long USB device name string.

Reported-by: Rafa <rafa@mwrinfosecurity.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 22:50:46 +01:00
Raymond Yau 5e5677f239 ALSA: au88x0 - Modify pointer callback to give accurate playback position
Signed-off-by: Raymond Yau <superquad.vortex2@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:13:20 +01:00
Daniel Mack 3347b26cab ALSA: usb-audio: reconstruct some dispatcher functions to use switch-case
The number of cases has increased so use switch-case rather than
if-statements.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:11:12 +01:00
Daniel Mack 54a8c500d5 ALSA: usb-audio: add support for Native Instruments MK2 devices
The MK2 generation of Native Instruments' sound cards are in fact
compliant to the USB audio standard of version 2 and other approved USB
standards. However, they come up as vendor-specific device when first
connected but can be told to come up with a new set of descriptors
upon their next enumeration. The interfaces announced by the new
descriptors will be handled by the kernel's class drivers. This is done
by issuing a vendor specific device request and sending the device to
reset.

There are also some vendor-specific USB requests for some mixer elements
that can't be exported in a standard compliant way. The driver now
supports them with quirks handling mechanisms.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:10:57 +01:00
Daniel Mack df8d81a32f ALSA: snd-usb-caiaq: Add support for Traktor Audio 2
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2011-02-14 17:10:45 +01:00