Commit Graph

200239 Commits

Author SHA1 Message Date
Takashi Iwai 8d011cc7a9 Merge branch 'devel' of git.alsa-project.org:alsa-kernel into topic/misc 2010-07-19 17:42:09 +02:00
Jaroslav Kysela 9e216e8a40 ALSA: pcm core - add a safe check to the silence filling function
In situation when appl_ptr is far greater then hw_ptr, the hw_avail value
can be greater than buffer_size. Check for this.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-07-19 16:47:01 +02:00
Jaroslav Kysela 79c944ad13 ALSA: hda-intel - do not mix audio and modem function IDs
The function IDs are different for audio and modem. Do not mix them.
Also, show the unsolicited bit in the function_id register.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-07-19 16:46:56 +02:00
Eliot Blennerhassett e2768c0c22 ALSA: asihpi - Avoid useless assignment of returned index values.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-16 11:34:23 +02:00
Eliot Blennerhassett 604a440a9d ALSA: asihpi - Avoid using c99 uintX types.
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-16 11:33:47 +02:00
Eliot Blennerhassett 8d4bbee77e ALSA: asihpi - HPI version 4.04.01
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-16 11:31:37 +02:00
Kulikov Vasiliy 315e8f7501 ALSA: asihpi: fix sign bug
bytes_per_sec is unsigned, so if snd_pcm_format_width() return error we
would not see it.

Signed-off-by: Kulikov Vasiliy <segooon@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-16 08:30:08 +02:00
Michael Witten 1d8c1100fb ALSA: Kconfig: SND_AC97_POWER_SAVE description improvement
The description has been expanded to explain the time-out
value provided by the power_save module parameter.

Signed-off-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-15 13:43:44 +02:00
Arnd Bergmann 992cbf7438 sound/oss-msnd-pinnacle: ioctl needs the inode
This broke in sound/oss: convert to unlocked_ioctl, when I missed one
of the ioctl functions still using the inode pointer.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-14 15:14:02 +02:00
Arnd Bergmann d209974cdc sound/oss: convert to unlocked_ioctl
These are the final conversions for the ioctl file operation so we can remove
it in the next merge window.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-12 22:36:47 +02:00
Arnd Bergmann 90dc763fef sound: push BKL into open functions
This moves the lock_kernel() call from soundcore_open
to the individual OSS device drivers, where we can deal
with it one driver at a time if needed, or just kill
off the drivers.

All core components in ALSA already provide
adequate locking in their open()-functions
and do not require the big kernel lock, so
there is no need to add the BKL there.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-12 17:41:05 +02:00
Clemens Ladisch 395c61d196 ALSA: via82xx: allow changing the initial DXS volume
As per-stream volume controls, the DXS controls are not intended to
adjust the overall sound level and so are initialized every time
a stream is opened.  However, there are special situations where one
wants to reduce the overall volume in the digital domain, i.e., before
the AC'97 codec's PCM volume control.  To allow this, add a module
parameter that sets the initial DXS volume.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Tested-by: Soeren D. Schulze <soeren.d.schulze@gmx.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-12 17:25:27 +02:00
Clemens Ladisch d32d552e66 ALSA: usb-audio: silence a superfluous warning
It is not advisable to print a warning when a device does not support
setting the sample rate because this is perfectly valid for devices with
a single rate or where rates are implicitly changed by selecting another
alternate setting.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-09 15:08:12 +02:00
Takashi Iwai 54a3b8dc38 ALSA: Update documents about new bits of xrun_debug proc file
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-08 09:01:17 +02:00
Eliot Blennerhassett f978d36da4 ALSA: asihpi - Remove unneeded ;
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-06 08:20:43 +02:00
Eliot Blennerhassett 36ed8bdd86 ALSA: asihpi - Minor HPI error handling fixes
Handle errors in tuner level caching,
Ccorrect error code for aesebu rx status.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-06 08:20:21 +02:00
Eliot Blennerhassett 108ccb3f0f ALSA: asihpi - Change compander API and tidy
Compander API changed to one function per parameter.
Factor out some common code for stereo log value reading.
Make some more entity functions static.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-06 08:19:56 +02:00
Eliot Blennerhassett 3843914635 ALSA: asihpi - Add ASI5200 family
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-06 08:19:35 +02:00
Eliot Blennerhassett 1dd6aaaafc ALSA: asihpi - Use version string instead of printf formatting
Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-06 08:19:06 +02:00
Eliot Blennerhassett 168f1b07cc ALSA: asihpi - HPI API updates
Remove some deprecated items.
Change compander api to one function per parameter.
Add a version string define.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-06 08:18:27 +02:00
John Kacur 171d9f7d78 soundcore_open: Reduce the area BKL coverage
Most of this function is protected by the sound_loader_lock.
We can push down the BKL to this call out err = file->f_op->open(inode,file);

In order to build the sound core without the BKL, we
will need to push the lock_kernel() call into the ~20
device drivers that register their file operations.

Signed-off-by: John Kacur <jkacur@redhat.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-07-05 18:07:30 +02:00
Takashi Iwai 65ee2ba310 Merge branch 'devel' of git://git.alsa-project.org/alsa-kernel into topic/misc 2010-07-05 15:37:27 +02:00
David Dillow 08b4509889 sis7019: increase reset delays
A few boards using this controller are reported to need a little extra
time during their reset cycle.

Reported-by: Michael Goeke <michael.goeke@icachip.de>
Signed-off-by: Dave Dillow <dave@thedillows.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-06-28 09:42:22 +02:00
David Dillow 3a3d5fd125 sis7019: fix capture issues with multiple periods per buffer
When using a timing voice to clock out periods during capture, the
driver would slowly loose synchronization and never catch up, eventually
reaching a point where it no longer generated interrupts. To avoid
this situation, the virtual period clocking was changed to shorten the
next timing period when our timing voice falls too far behind the
capture voice. In addition, the first virtual period for the timing
voice was slightly too short, causing the timing voice to initially be
ahead of the capture voice.

While tracking down this problem, I noticed that the expected sample
offset was being incorrectly initialized, causing an overrun to be
incorrectly reported when the timing voice happened to be perfectly
synchronized.

Reported-by: Hans Schou <linux@schou.dk>
Signed-off-by: Dave Dillow <dave@thedillows.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-06-28 09:42:18 +02:00
David Dillow 5daeba34d2 ALSA: pcm_lib: avoid timing jitter in snd_pcm_read/write()
When using poll() to wait for the next period -- or avail_min samples --
one gets a consistent delay for each system call that is usually just a
little short of the selected period time. However, When using
snd_pcm_read/write(), one gets a jittery delay that alternates between
less than a millisecond and approximately two period times. This is
caused by snd_pcm_lib_{read,write}1() transferring any available samples
to the user's buffer and adjusting the application pointer prior to
sleeping to the end of the current period. When the next period
interrupt occurs, there is then less than avail_min samples remaining to
be transferred in the period, so we end up sleeping until a second
period occurs.

This is solved by using runtime->twake as the number of samples needed
for a wakeup in addition to selecting the proper wait queue to wake in
snd_pcm_update_state(). This requires twake to be non-zero when used
by snd_pcm_lib_{read,write}1() even if avail_min is zero.

Signed-off-by: Dave Dillow <dave@thedillows.org>
Signed-off-by: Jaroslav Kysela <perex@perex.cz>
2010-06-28 09:42:09 +02:00
Takashi Iwai b415ec7041 ALSA: usb - Fix compile error with CONFIG_SND_DEBUG_VERBOSE=y
Replaced the forgotten cval->mixer->ctrlif.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-24 08:07:28 +02:00
Daniel Mack 3d8d4dcfd4 ALSA: usb-audio: simplify control interface access
As the control interface is now carried in struct snd_usb_audio, we can
simplify the API a little and also drop the private ctrlif field from
struct usb_mixer_interface.

Also remove a left-over function prototype in pcm.h.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23 16:10:23 +02:00
Daniel Mack 157a57b6fa ALSA: usb-audio: move and add some comments
Also add a list of open topics.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23 16:09:50 +02:00
Daniel Mack 21af7d8c0c ALSA: usb-midi: whitespace fixes
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23 16:09:38 +02:00
Daniel Mack 69da9bcb98 ALSA: usb-audio: unify UAC macros and struct names
Get rid of the last occurances of _v1 suffixes, and move the version
number right after the "uac" string. Now things are consitent again.

Sorry for the forth and back, but it just looks much nicer this way.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23 16:09:26 +02:00
Daniel Mack f22aa94908 ALSA: usb-audio: clean up includes in clock.c
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23 16:09:14 +02:00
Takashi Iwai 1240e6b553 Merge branch 'fix/misc' into topic/misc 2010-06-23 16:07:34 +02:00
Alexey Fisher a5c7d797dc ALSA: usb-audio - Add volume resolution quirk for some Logitech webcams
Some programs like Skype trying to set capture volume automatically.
Normally it will tray, carefully step by step lover or higher, set the volume.
In real word it work not really well, because devises and vendors lie about
real audio settings.
For example most Logitech webcams have 6400 or 3500 steps for capture volume.
They do not tell that actual resolution is 384. So we have only 7 or 18 real
steps. In this patch I set real resolution only for tested devices.

Signed-off-by: Alexey Fisher <bug-track@fisher-privat.net>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-23 16:02:07 +02:00
Jiri Slaby 272cbc98cf ALSA: usb/endpoint, fix dangling pointer use
Stanse found that in snd_usb_parse_audio_endpoints, there is a
dangling pointer dereference. When snd_usb_parse_audio_format fails,
fp is freed, and continue invoked. On the next loop, there is
"fp && fp->altsetting == 1 && fp->channels == 1" test, but fp is set
from the last iteration (but is bogus) and thus ilegally dereferenced.

Set fp to NULL before "continue".

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Acked-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-21 17:07:58 +02:00
Andy Shevchenko c9ff921abe ALSA: alsa: riptide: don't use own hex_to_bin() method
Signed-off-by: Andy Shevchenko <ext-andriy.shevchenko@nokia.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-17 09:34:58 +02:00
Eliot Blennerhassett 2a383cb3f1 ALSA: asihpi - Get rid of incorrect "long" types and casts.
These give incorrect results for index wrap on 64 bit.

Signed-off-by: Eliot Blennerhassett <eblennerhassett@audioscience.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-17 09:33:59 +02:00
Daniel Mack e8bdb6bbab ALSA: usb-audio: fix UAC2 control value queries
For RANGE requests, we should only query as much bytes as we're in fact
interested in.

For CUR requests, we shouldn't confuse the firmware with an overlong
request but just ask for 2 bytes.

This might need fixing in the future as it's not entirely clear when to
dispatch 1-byte, 2-byte and 4-byte request blocks. For now, we assume
everything is coded in 16bit - this works for all firmware
implementations I've seen.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Alex Lee <alexlee188@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-11 18:06:35 +02:00
Daniel Mack 67c103664a ALSA: usb-audio: parse UAC2 sample rate ranges correctly
A device may report its supported sample rates in ranges rather than in
discrete triplets. The code used to only parse the MIN field instead of
properly paying attention to the MAX and RES values.

Also, handle RES values of 1 correctly and announce a continous sample
rate range in this case.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Alex Lee <alexlee188@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-11 18:06:12 +02:00
Daniel Mack 11bcbc443a ALSA: usb-audio: fix control messages for USB_RECIP_INTERFACE
Control messages directed to an interface must have the interface number
set in the lower 8 bits of wIndex. This wasn't done correctly for some
clock and mixer messages.

Signed-off-by: Daniel Mack <daniel@caiaq.de>
Reported-by: Alex Lee <alexlee188@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-11 18:05:38 +02:00
Daniel Mack d07140ba7f ALSA: usb-audio: add check for faulty clock in parse_audio_format_rates_v2()
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-11 18:05:05 +02:00
Wan ZongShun ff8bd64eaf ALSA: sound/spi: patch for the unuseful variable removal
The '*bitclk' of structure 'snd_at73c213' seems no use,
so I make a patch to remove the unnecessary variable.

Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-08 16:51:27 +02:00
Yegor Yefremov f534116308 ALSA: atmel: set "channel A event" output to debug
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-08 16:42:02 +02:00
Randy Dunlap bcfde3347c sound: move driver parameters to their own files
Move sound (OSS & ALSA) kernel parameters to their own files.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2010-06-08 16:40:35 +02:00
Linus Torvalds e44a21b726 Linux 2.6.35-rc2 2010-06-05 20:43:24 -07:00
Chris Wilson e7b526bb85 drm/i915: Move non-phys cursors into the GTT
Cursors need to be in the GTT domain when being accessed by the GPU.
Previously this was a fortuitous byproduct of userspace using pwrite()
to upload the image data into the cursor. The redundant clflush was
removed in commit 9b8c4a and so the image was no longer being flushed
out of the caches into main memory. One could also devise a scenario
where the cursor was rendered by the GPU, prior to being attached as the
cursor, resulting in similar corruption due to the missing MI_FLUSH.

Fixes:

  Bug 28335 - Cursor corruption caused by commit 9b8c4a0b21
  https://bugs.freedesktop.org/show_bug.cgi?id=28335

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reported-and-tested-by: Jeff Chua <jeff.chua.linux@gmail.com>
Tested-by: Linus Torvalds <torvalds@linux-foundation.org>
Reported-by: Andy Isaacson <adi@hexapodia.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2010-06-05 20:37:37 -07:00
Linus Torvalds 78b36558b7 Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
* 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4:
  ext4: Fix remaining racy updates of EXT4_I(inode)->i_flags
  ext4: Make sure the MOVE_EXT ioctl can't overwrite append-only files
2010-06-05 10:07:25 -07:00
Dmitry Monakhov 84a8dce271 ext4: Fix remaining racy updates of EXT4_I(inode)->i_flags
A few functions were still modifying i_flags in a racy manner.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
2010-06-05 11:51:27 -04:00
Linus Torvalds 6c5de280b6 Merge branch 'for-linus' of git://oss.sgi.com/xfs/xfs
* 'for-linus' of git://oss.sgi.com/xfs/xfs:
  xfs: improve xfs_isilocked
  xfs: skip writeback from reclaim context
  xfs: remove done roadmap item from xfs-delayed-logging-design.txt
  xfs: fix race in inode cluster freeing failing to stale inodes
  xfs: fix access to upper inodes without inode64
  xfs: fix might_sleep() warning when initialising per-ag tree
  fs/xfs/quota: Add missing mutex_unlock
  xfs: remove duplicated #include
  xfs: convert more trace events to DEFINE_EVENT
  xfs: xfs_trace.c: remove duplicated #include
  xfs: Check new inode size is OK before preallocating
  xfs: clean up xlog_align
  xfs: cleanup log reservation calculactions
  xfs: be more explicit if RT mount fails due to config
  xfs: replace E2BIG with EFBIG where appropriate
2010-06-05 07:33:05 -07:00
Linus Torvalds ed7dc1dfbc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (30 commits)
  X25: remove duplicated #include
  tcp: use correct net ns in cookie_v4_check()
  rps: tcp: fix rps_sock_flow_table table updates
  ppp_generic: fix multilink fragment sizes
  syncookies: remove Kconfig text line about disabled-by-default
  ixgbe: only check pfc bits in hang logic if pfc is enabled
  net: check for refcount if pop a stacked dst_entry
  ixgbe: return IXGBE_ERR_RAR_INDEX when out of range
  act_pedit: access skb->data safely
  sfc: Store port number in net_device::dev_id
  epic100: Test __BIG_ENDIAN instead of (non-existent) CONFIG_BIG_ENDIAN
  tehuti: return -EFAULT on copy_to_user errors
  isdn/kcapi: return -EFAULT on copy_from_user errors
  e1000e: change logical negate to bitwise
  sfc: Get port number from CS_PORT_NUM, not PCI function number
  cls_u32: use skb_header_pointer() to dereference data safely
  TCP: tcp_hybla: Fix integer overflow in slow start increment
  act_nat: fix the wrong checksum when addr isn't in old_addr/mask
  net/fec: fix pm to survive to suspend/resume
  korina: count RX DMA OVR as rx_fifo_error
  ...
2010-06-05 07:32:21 -07:00
Linus Torvalds 7926e0bfbb Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2:
  nilfs2: remove obsolete declarations of cache constructor and destructor
  nilfs2: fix style issue in nilfs_destroy_cachep
2010-06-05 07:31:13 -07:00