06 Nov, 2009

1 commit

  • The cs4236 was two step detection with call to the snd_wss_free()
    between two steps. The snd_wss_free() did not free a sound device
    created in the snd_wss_create(). This caused an OOPS during module
    removal as the same sound device was released twice. The same OOPS
    happened if the cs4236 module loading failed.

    Fix this by adapting the snd_cs4236_create() to correctly work with
    chips less capable then cs4236. The snd_cs4236_create() behaves the
    same as the snd_wss_create() if the chip is less capable than the cs4236.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Takashi Iwai

    Krzysztof Helt
     

04 Nov, 2009

1 commit

  • This is a port of the sound/oss/sh_dac_audio.c driver.
    The driver uses an on-chip 8-bit D/A converter, which has a speaker connected
    to one of its channels, found in several ancient HP machines.
    For interrupts it uses a high-resolution timer (hrtimer).
    Tested on SH7709 based hp6xx (HP Jornada 680/690 and HP Palmtop 620lx/660lx).

    Also, since OSS Emulation works, the old OSS sound/oss/sh_dac_audio.c driver
    would be obsolete soon, and it could be removed.

    Signed-off-by: Rafael Ignacio Zurita
    Acked-by: Paul Mundt
    Signed-off-by: Takashi Iwai

    Rafael Ignacio Zurita
     

01 Nov, 2009

2 commits


30 Oct, 2009

12 commits

  • Remove intermediate snd_audiodrive structure between
    snd_card structure and snd_es18xx. This reduces size of
    source code and binary driver.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Takashi Iwai

    Krzysztof Helt
     
  • The snd_card pointer is redundant and code can be easily
    changed to work without it.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Takashi Iwai

    Krzysztof Helt
     
  • The OSS driver for Ensoniq SoundScape cards is broken after conversion
    to mutexes and a new ALSA snd-sscape driver handles all devices handled
    by the OSS one.

    The ALSA driver was tested with these cards:
    Spea V7 MediaFX
    Ensoniq Soundscape Elite
    Ensoniq Soundscape VIVO (this card is not handled by the OSS driver)

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Takashi Iwai

    Krzysztof Helt
     
  • Activate the DXS volume controls only when the corresponding stream is
    being used. This makes the behaviour consistent with the other drivers
    that have per-stream volume controls.

    Signed-off-by: Clemens Ladisch
    Signed-off-by: Takashi Iwai

    Clemens Ladisch
     
  • Signed-off-by: Mark Hills
    Acked-by: Daniel Mack
    Signed-off-by: Takashi Iwai

    Mark Hills
     
  • Fix a bug which can result in white noise from the driver after stream
    start or unpause.

    Signed-off-by: Mark Hills
    Acked-by: Daniel Mack
    Signed-off-by: Takashi Iwai

    Mark Hills
     
  • Fix a race which causes snd_pcm_update_hw_ptr_pos() to report a bug.

    Signed-off-by: Mark Hills
    Acked-by: Daniel Mack
    Signed-off-by: Takashi Iwai

    Mark Hills
     
  • The variables are unsigned so the test `>= 0' is always true,
    the `< 0' test always fails. In these cases the other part of
    the test catches wrapped values.

    In dac_audio_write() there does not occur a test for wrapped
    values, but the test appears redundant.

    Signed-off-by: Roel Kluin
    Signed-off-by: Takashi Iwai

    Roel Kluin
     
  • If the NULL test on h is needed in snd_harmony_mixer_init, then the
    dereference should be after the NULL test.

    Actually, there is a sequence of calls: snd_harmony_create, then
    snd_harmony_pcm_init, and then snd_harmony_mixer_init. snd_harmony_create
    initializes h, but may indeed leave it as NULL. There was no NULL test at
    the beginning of snd_harmony_pcm_init, so I have added one. The NULL test
    in snd_harmony_mixer_init is then not necessary, but in case the ordering
    of the calls changes, I have left it, and moved the dereference after it.

    A simplified version of the semantic match that detects this problem is as
    follows (http://coccinelle.lip6.fr/):

    //
    @match exists@
    expression x, E;
    identifier fld;
    @@

    * x->fld
    ... when != \(x = E\|&x\)
    * x == NULL
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Takashi Iwai

    Julia Lawall
     
  • In pcm.c, if the NULL test on pcm is needed, then the dereference should be
    after the NULL test.

    In dummy.c and ali5451.c, the context of the calls to
    snd_card_dummy_new_mixer and snd_ali_free_voice show that dummy and pvoice,
    respectively cannot be NULL.

    A simplified version of the semantic match that detects this problem is as
    follows (http://coccinelle.lip6.fr/):

    //
    @match exists@
    expression x, E;
    identifier fld;
    @@

    * x->fld
    ... when != \(x = E\|&x\)
    * x == NULL
    //

    Signed-off-by: Julia Lawall
    Signed-off-by: Takashi Iwai

    Julia Lawall
     
  • The attached patch fixes the problems introduced in this commit:
    http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=eea0579fc85e64e9f05361d5aacf496fe7a151aa

    - Fix nForce workaround by honouring the pointer_update var
    - Revert "ns" to u64, as per the hrtimer API
    - Revert to the zero-delay timer startup, since I can't reproduce any
    problem with it (please, give me the hint!)

    Signed-off-by: Stas Sergeev
    Signed-off-by: Takashi Iwai

    Stas Sergeev
     
  • SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
    machines, and checked it with ARCH=x86_64, no relative compiling
    warnings & errors, so, remove the platform dependency directly.

    Reported-by: rixed@happyleptic.org
    Acked-by: Andres Salomon
    Signed-off-by: Wu Zhangjin
    Signed-off-by: Takashi Iwai

    Wu Zhangjin
     

13 Oct, 2009

8 commits


12 Oct, 2009

4 commits

  • SND_CS5535AUDIO is available on Loongson(MIPS compatible) family
    machines, and checked it with ARCH=x86_64, no relative compiling
    warnings & errors, so, remove the platform dependency directly.

    Reported-by: rixed@happyleptic.org
    Acked-by: Andres Salomon
    Signed-off-by: Wu Zhangjin
    Signed-off-by: Takashi Iwai

    Wu Zhangjin
     
  • If two streams are started immediately after one another (such as a
    playback and a recording stream), the call to set hw params fails with
    EBUSY. This patch makes the call succeed, so playback and recording will
    work properly.

    Signed-off-by: David Henningsson
    Signed-off-by: Takashi Iwai

    David Henningsson
     
  • The chipsets with the isa_dma_bridge_buggy set do not stop DMA during
    DMA counter reads. The DMA counter is read in two 8-bit read steps
    on x86 platform. Sometimes, such reads happen during higher byte
    change so the lower byte is already decremented (rolled over) but
    the higher byte is not. It introduces an error that position is
    moved 256 bytes ahead of the true position. Thus, the next DMA
    position read can return a lower value then the previous read.
    If the DMA position is decreased (reversed) the ALSA subsystem is
    tricked into the playback underrun error and resets the playback.
    It results in a "pop" during a playback.

    Work around the issue by reading the counter twice and choosing a higher
    value.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Takashi Iwai

    Krzysztof Helt
     
  • The C4231 control set is a superset of the AD1848 control
    set so reuse the CS4231 controls definitions for the AD1848.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Takashi Iwai

    Krzysztof Helt
     

10 Oct, 2009

3 commits

  • Convert CS4231 mixer to dB scale after AD1848 mixer.

    Also, add missing microphone boost control for the AD1848
    and correct wrong bits for loopback volume on the AD1848.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Takashi Iwai

    Krzysztof Helt
     
  • Fix coding style errors in the driver.

    Also, add missing argument for CMD_XXX_MIDI_VOL command.

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Takashi Iwai

    Krzysztof Helt
     
  • Fix the num_total_dacs setting for Chaintech AV710. The existing comment
    that only PSDOUT0 is connected is correct, but since the card is using
    packed AC97 mode to send 6 channels to the codec, num_total_dacs should be
    set to 6 and not 2. This allows 6-channel surround to work. Also clarify
    a comment regarding the additional WM8728 codec on this card (it's connected
    to the SPDIF output and always receives the same data).

    Signed-off-by: Robert Hancock
    Signed-off-by: Takashi Iwai

    Robert Hancock
     

09 Oct, 2009

1 commit

  • Allow Nvidia HDMI to support more possible sample rates and formats.
    At best, the really supported rates and formats should be determined
    together with the negotiation with the HDMI receiver, but it's currently
    not implemented yet (Nvidia stuff seems incompatible with HDMI 1.3
    standard in this regard). As a compromise, we enable all bits, assuming
    that all recent devices do support such rates/formats.

    Tested-by: Alan Alan
    Signed-off-by: Takashi Iwai

    Takashi Iwai
     

08 Oct, 2009

5 commits

  • Takashi Iwai
     
  • Takashi Iwai
     
  • Increase the default and maximum PCM buffer prellocation size for ice1724's
    SPDIF and independent stereo pair outputs to 256K, which is the hardware's
    maximum supported size. This allows a reduction in interrupt rate and
    potentially power usage when an application is not latency-critical.

    Signed-off-by: Robert Hancock
    Signed-off-by: Takashi Iwai

    Robert Hancock
     
  • Fix following circular locking in the opl3 driver.

    =======================================================
    [ INFO: possible circular locking dependency detected ]
    2.6.32-rc3 #87
    -------------------------------------------------------
    swapper/0 is trying to acquire lock:
    (&opl3->voice_lock){..-...}, at: [] snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]

    but task is already holding lock:
    (&opl3->sys_timer_lock){..-...}, at: [] snd_opl3_timer_func+0x19/0xc0 [snd_opl3_synth]

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -> #1 (&opl3->sys_timer_lock){..-...}:
    [] validate_chain+0xa25/0x1040
    [] __lock_acquire+0x2da/0xab0
    [] lock_acquire+0x7a/0xa0
    [] _spin_lock_irqsave+0x40/0x60
    [] snd_opl3_note_on+0x686/0x790 [snd_opl3_synth]
    [] snd_midi_process_event+0x322/0x590 [snd_seq_midi_emul]
    [] snd_opl3_synth_event_input+0x15/0x20 [snd_opl3_synth]
    [] snd_seq_deliver_single_event+0x100/0x200 [snd_seq]
    [] snd_seq_deliver_event+0x47/0x1f0 [snd_seq]
    [] snd_seq_dispatch_event+0x3b/0x140 [snd_seq]
    [] snd_seq_check_queue+0x10c/0x120 [snd_seq]
    [] snd_seq_enqueue_event+0x6b/0xe0 [snd_seq]
    [] snd_seq_client_enqueue_event+0xdd/0x100 [snd_seq]
    [] snd_seq_write+0xea/0x190 [snd_seq]
    [] vfs_write+0x96/0x160
    [] sys_write+0x3d/0x70
    [] syscall_call+0x7/0xb

    -> #0 (&opl3->voice_lock){..-...}:
    [] validate_chain+0x1036/0x1040
    [] __lock_acquire+0x2da/0xab0
    [] lock_acquire+0x7a/0xa0
    [] _spin_lock_irqsave+0x40/0x60
    [] snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
    [] snd_opl3_timer_func+0xa0/0xc0 [snd_opl3_synth]
    [] run_timer_softirq+0x166/0x1e0
    [] __do_softirq+0x78/0x110
    [] do_softirq+0x46/0x50
    [] irq_exit+0x36/0x40
    [] do_IRQ+0x42/0xb0
    [] common_interrupt+0x2e/0x40
    [] apm_cpu_idle+0x10f/0x290
    [] cpu_idle+0x21/0x40
    [] rest_init+0x4d/0x60
    [] start_kernel+0x235/0x280
    [] i386_start_kernel+0x66/0x70

    other info that might help us debug this:

    2 locks held by swapper/0:
    #0: (&opl3->tlist){+.-...}, at: [] run_timer_softirq+0xf0/0x1e0
    #1: (&opl3->sys_timer_lock){..-...}, at: [] snd_opl3_timer_func+0x19/0xc0 [snd_opl3_synth]

    stack backtrace:
    Pid: 0, comm: swapper Not tainted 2.6.32-rc3 #87
    Call Trace:
    [] print_circular_bug+0xc8/0xd0
    [] validate_chain+0x1036/0x1040
    [] ? check_usage_forwards+0x54/0xd0
    [] __lock_acquire+0x2da/0xab0
    [] lock_acquire+0x7a/0xa0
    [] ? snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
    [] _spin_lock_irqsave+0x40/0x60
    [] ? snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
    [] snd_opl3_note_off+0x1e/0xe0 [snd_opl3_synth]
    [] ? _spin_lock_irqsave+0x47/0x60
    [] snd_opl3_timer_func+0xa0/0xc0 [snd_opl3_synth]
    [] run_timer_softirq+0x166/0x1e0
    [] ? run_timer_softirq+0xf0/0x1e0
    [] ? snd_opl3_timer_func+0x0/0xc0 [snd_opl3_synth]
    [] __do_softirq+0x78/0x110
    [] ? _spin_unlock+0x1d/0x20
    [] ? handle_level_irq+0xaf/0xe0
    [] do_softirq+0x46/0x50
    [] irq_exit+0x36/0x40
    [] do_IRQ+0x42/0xb0
    [] ? trace_hardirqs_on_caller+0x12c/0x180
    [] common_interrupt+0x2e/0x40
    [] ? default_idle+0x38/0x50
    [] apm_cpu_idle+0x10f/0x290
    [] cpu_idle+0x21/0x40
    [] rest_init+0x4d/0x60
    [] start_kernel+0x235/0x280
    [] ? unknown_bootoption+0x0/0x210
    [] i386_start_kernel+0x66/0x70

    Signed-off-by: Krzysztof Helt
    Signed-off-by: Takashi Iwai

    Krzysztof Helt
     
  • * PLEASE NOTE - this change requires the corresponding update of
    envy24control for ice1712 - kind of an ABI change.
    * The "Multi Track Peak" control is read-only level meters indicator.
    * The control is VERY confusing to most users since it is currently displayed
    in regular mixers. E.g. alsamixer ignores its read-only status
    and allows changing the levels with keys which makes no sense.

    Signed-off-by: Pavel Hofman
    Acked-by: Jaroslav Kysela
    Signed-off-by: Takashi Iwai

    Pavel Hofman
     

07 Oct, 2009

3 commits