[alsa-cvslog] CVS: alsa-lib/test iecbits.c,NONE,1.1 iecset.c,NONE,1.1 .cvsignore,1.11,1.12 Makefile.am,1.24,1.25
Update of /cvsroot/alsa/alsa-lib/test In directory sc8-pr-cvs1:/tmp/cvs-serv8451 Modified Files: .cvsignore Makefile.am Added Files: iecbits.c iecset.c Log Message: added iecset program (this could be to alsa-utils after more enhancements). --- NEW FILE: iecbits.c --- /* iecdump - dump IEC958 status bits on ALSA Copyright (C) 2003 by Takashi Iwai <[EMAIL PROTECTED]> This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include struct category_str { int val; const char *name; }; static struct category_str con_category[] = { { IEC958_AES1_CON_DAT, "DAT" }, { IEC958_AES1_CON_VCR, "VCR" }, { IEC958_AES1_CON_MICROPHONE, "microphone" }, { IEC958_AES1_CON_SYNTHESIZER, "synthesizer" }, { IEC958_AES1_CON_RATE_CONVERTER, "rate converter" }, { IEC958_AES1_CON_MIXER, "mixer" }, { IEC958_AES1_CON_SAMPLER, "sampler" }, { IEC958_AES1_CON_PCM_CODER, "PCM coder" }, { IEC958_AES1_CON_IEC908_CD, "CD" }, { IEC958_AES1_CON_NON_IEC908_CD, "non-IEC908 CD" }, { IEC958_AES1_CON_GENERAL, "general" }, }; #define ARRAY_SIZE(x) (int)(sizeof(x)/sizeof(x[0])) void dump_iec958(snd_aes_iec958_t *iec) { int i; if (! (iec->status[0] & IEC958_AES0_PROFESSIONAL)) { /* consumer */ printf("Mode: consumer\n"); printf("Data: "); if (!(iec->status[0] & IEC958_AES0_NONAUDIO)) { printf("audio\n"); } else { printf("non-audio\n"); } printf("Rate: "); switch (iec->status[3] & IEC958_AES3_CON_FS) { case IEC958_AES3_CON_FS_44100: printf("44100 Hz\n"); break; case IEC958_AES3_CON_FS_48000: printf("48000 Hz\n"); break; case IEC958_AES3_CON_FS_32000: printf("32000 Hz\n"); break; default: printf("unknown\n"); break; } printf("Copyright: "); if (iec->status[0] & IEC958_AES0_CON_NOT_COPYRIGHT) { printf("permitted\n"); } else { printf("protected\n"); } printf("Emphasis: "); if ((iec->status[0] & IEC958_AES0_CON_EMPHASIS) != IEC958_AES0_CON_EMPHASIS_5015) { printf("none\n"); } else { printf("50/15us\n"); } printf("Category: "); for (i = 0; i < ARRAY_SIZE(con_category); i++) { if ((iec->status[1] & IEC958_AES1_CON_CATEGORY) == con_category[i].val) { printf("%s\n", con_category[i].name); break; } } if (i >= ARRAY_SIZE(con_category)) { printf("unknown 0x%x\n", iec->status[1] & IEC958_AES1_CON_CATEGORY); } printf("Original: "); if (iec->status[1] & IEC958_AES1_CON_ORIGINAL) { printf("original\n"); } else { printf("1st generation\n"); } printf("Clock: "); switch (iec->status[3] & IEC958_AES3_CON_CLOCK) { case IEC958_AES3_CON_CLOCK_1000PPM: printf("1000 ppm\n"); break; case IEC958_AES3_CON_CLOCK_50PPM: printf("50 ppm\n"); break; case IEC958_AES3_CON_CLOCK_VARIABLE: printf("variable pitch\n"); break; default: printf("unknown\n"); break; } } else { printf("Mode: professional\n"); printf("Data: "); if (!(iec->status[0] & IEC958_AES0_NONAUDIO)) { printf("audio\n"); } else {
[alsa-cvslog] CVS: alsa-kernel/pci/ac97 ac97_codec.c,1.103,1.104
Update of /cvsroot/alsa/alsa-kernel/pci/ac97 In directory sc8-pr-cvs1:/tmp/cvs-serv29801 Modified Files: ac97_codec.c Log Message: fixed snd_ac97_set_rate() to accept surround and LFE sample rates, too. Index: ac97_codec.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v retrieving revision 1.103 retrieving revision 1.104 diff -u -r1.103 -r1.104 --- ac97_codec.c28 Aug 2003 15:36:44 - 1.103 +++ ac97_codec.c30 Sep 2003 13:54:33 - 1.104 @@ -2067,6 +2067,8 @@ * * The valid registers are AC97_PMC_MIC_ADC_RATE, * AC97_PCM_FRONT_DAC_RATE, AC97_PCM_LR_ADC_RATE and AC97_SPDIF. + * AC97_PCM_SURR_DAC_RATE and AC97_PCM_LFE_DAC_RATE are accepted + * if the codec supports them. * The SPDIF register is a pseudo-register to change the rate of SPDIF * (only if supported). * @@ -2074,27 +2076,27 @@ */ int snd_ac97_set_rate(ac97_t *ac97, int reg, unsigned short rate) { - unsigned short mask; unsigned int tmp; switch (reg) { case AC97_PCM_MIC_ADC_RATE: - mask = 0x; if ((ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_VRM) == 0) /* MIC VRA */ if (rate != 48000) return -EINVAL; break; case AC97_PCM_FRONT_DAC_RATE: - mask = 0x0200; - if ((ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_VRA) == 0) /* VRA */ - if (rate != 48000) - return -EINVAL; - break; case AC97_PCM_LR_ADC_RATE: - mask = 0x0100; if ((ac97->regs[AC97_EXTENDED_STATUS] & AC97_EA_VRA) == 0) /* VRA */ if (rate != 48000) return -EINVAL; + break; + case AC97_PCM_SURR_DAC_RATE: + if (! (ac97->ext_id & AC97_SCAP_SURROUND_DAC)) + return -EINVAL; + break; + case AC97_PCM_LFE_DAC_RATE: + if (! (ac97->ext_id & AC97_SCAP_CENTER_LFE_DAC)) + return -EINVAL; break; case AC97_SPDIF: return set_spdif_rate(ac97, rate); --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/pci/emu10k1 emufx.c,1.39,1.40
Update of /cvsroot/alsa/alsa-kernel/pci/emu10k1 In directory sc8-pr-cvs1:/tmp/cvs-serv23231/pci/emu10k1 Modified Files: emufx.c Log Message: use the standard control names for RCA and optical spdif on audigy. Index: emufx.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emufx.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- emufx.c 4 Sep 2003 17:46:56 - 1.39 +++ emufx.c 30 Sep 2003 13:27:21 - 1.40 @@ -1359,12 +1359,12 @@ /* Optical SPDIF Playback Volume */ A_ADD_VOLUME_IN(playback, gpr, A_EXTIN_OPT_SPDIF_L); A_ADD_VOLUME_IN(playback+1, gpr+1, A_EXTIN_OPT_SPDIF_R); - snd_emu10k1_init_stereo_control(&controls[nctl++], "Optical IEC958 Playback Volume", gpr, 0); + snd_emu10k1_init_stereo_control(&controls[nctl++], "IEC958 Optical Playback Volume", gpr, 0); gpr += 2; /* Optical SPDIF Capture Volume */ A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_OPT_SPDIF_L); A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_OPT_SPDIF_R); - snd_emu10k1_init_stereo_control(&controls[nctl++], "Optical IEC958 Capture Volume", gpr, 0); + snd_emu10k1_init_stereo_control(&controls[nctl++], "IEC958 Optical Capture Volume", gpr, 0); gpr += 2; /* Line2 Playback Volume */ @@ -1381,12 +1381,12 @@ /* RCA SPDIF Playback Volume */ A_ADD_VOLUME_IN(playback, gpr, A_EXTIN_RCA_SPDIF_L); A_ADD_VOLUME_IN(playback+1, gpr+1, A_EXTIN_RCA_SPDIF_R); - snd_emu10k1_init_stereo_control(&controls[nctl++], "RCA SPDIF Playback Volume", gpr, 0); + snd_emu10k1_init_stereo_control(&controls[nctl++], "IEC958 Coaxial Playback Volume", gpr, 0); gpr += 2; /* RCA SPDIF Capture Volume */ A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_RCA_SPDIF_L); A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_RCA_SPDIF_R); - snd_emu10k1_init_stereo_control(&controls[nctl++], "RCA SPDIF Capture Volume", gpr, 0); + snd_emu10k1_init_stereo_control(&controls[nctl++], "IEC958 Coaxial Capture Volume", gpr, 0); gpr += 2; /* Aux2 Playback Volume */ --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/pci/ice1712 ice1712.c,1.34,1.35
Update of /cvsroot/alsa/alsa-kernel/pci/ice1712 In directory sc8-pr-cvs1:/tmp/cvs-serv998 Modified Files: ice1712.c Log Message: Moved spdif.setup_rate to snd_ice1712_set_pro_rate() function Index: ice1712.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/ice1712/ice1712.c,v retrieving revision 1.34 retrieving revision 1.35 diff -u -r1.34 -r1.35 --- ice1712.c 16 Aug 2003 09:58:29 - 1.34 +++ ice1712.c 30 Sep 2003 11:30:35 - 1.35 @@ -1040,6 +1040,7 @@ default: snd_BUG(); val = 0; + rate = 48000; break; } outb(val, ICEMT(ice, RATE)); @@ -1050,6 +1051,8 @@ if (ice->akm[i].ops.set_rate_val) ice->akm[i].ops.set_rate_val(&ice->akm[i], rate); } + if (ice->spdif.ops.setup_rate) + ice->spdif.ops.setup_rate(ice, rate); } static int snd_ice1712_playback_pro_prepare(snd_pcm_substream_t * substream) @@ -1072,8 +1075,6 @@ ice1712_t *ice = snd_pcm_substream_chip(substream); snd_ice1712_set_pro_rate(ice, params_rate(hw_params), 0); - if (ice->spdif.ops.setup_rate) - ice->spdif.ops.setup_rate(ice, params_rate(hw_params)); return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); } --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/core rawmidi.c,1.38,1.39
Update of /cvsroot/alsa/alsa-kernel/core In directory sc8-pr-cvs1:/tmp/cvs-serv20801 Modified Files: rawmidi.c Log Message: fixed typos (open_lock -> open_mutex). Index: rawmidi.c === RCS file: /cvsroot/alsa/alsa-kernel/core/rawmidi.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- rawmidi.c 30 Sep 2003 09:28:26 - 1.38 +++ rawmidi.c 30 Sep 2003 10:15:44 - 1.39 @@ -403,7 +403,7 @@ } init_waitqueue_entry(&wait, current); add_wait_queue(&rmidi->open_wait, &wait); - down(&rmidi->open_lock); + down(&rmidi->open_mutex); while (1) { subdevice = -1; down_read(&card->controls_rwsem); @@ -426,9 +426,9 @@ } else break; set_current_state(TASK_INTERRUPTIBLE); - up(&rmidi->open_lock); + up(&rmidi->open_mutex); schedule(); - down(&rmidi->open_lock); + down(&rmidi->open_mutex); if (signal_pending(current)) { err = -ERESTARTSYS; break; @@ -447,7 +447,7 @@ snd_card_file_remove(card, file); snd_magic_kfree(rawmidi_file); } - up(&rmidi->open_lock); + up(&rmidi->open_mutex); return err; } --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/pci via82xx.c,1.52,1.53
Update of /cvsroot/alsa/alsa-kernel/pci In directory sc8-pr-cvs1:/tmp/cvs-serv20110 Modified Files: via82xx.c Log Message: - fixed the detection of VIA8233A (it was overridden by dxs_support option). Index: via82xx.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/via82xx.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- via82xx.c 23 Sep 2003 14:31:44 - 1.52 +++ via82xx.c 30 Sep 2003 10:12:09 - 1.53 @@ -2038,16 +2038,17 @@ break; } } - if (dxs_support[dev] == VIA_DXS_AUTO) - dxs_support[dev] = check_dxs_list(pci); - /* force to use VIA8233 or 8233A model according to -* dxs_support module option -*/ - if (dxs_support[dev] == VIA_DXS_DISABLE) - chip_type = TYPE_VIA8233A; - else - chip_type = TYPE_VIA8233; - + if (chip_type != TYPE_VIA8233A) { + if (dxs_support[dev] == VIA_DXS_AUTO) + dxs_support[dev] = check_dxs_list(pci); + /* force to use VIA8233 or 8233A model according to +* dxs_support module option +*/ + if (dxs_support[dev] == VIA_DXS_DISABLE) + chip_type = TYPE_VIA8233A; + else + chip_type = TYPE_VIA8233; + } if (chip_type == TYPE_VIA8233A) strcpy(card->driver, "VIA8233A"); else --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/core/oss pcm_oss.c,1.52,1.53
Update of /cvsroot/alsa/alsa-kernel/core/oss In directory sc8-pr-cvs1:/tmp/cvs-serv13340/core/oss Modified Files: pcm_oss.c Log Message: Revised schedule() and set_current_state() calls. Replaced need_resched() with cond_resched() call. Index: pcm_oss.c === RCS file: /cvsroot/alsa/alsa-kernel/core/oss/pcm_oss.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -r1.52 -r1.53 --- pcm_oss.c 30 Sep 2003 07:54:19 - 1.52 +++ pcm_oss.c 30 Sep 2003 09:28:26 - 1.53 @@ -1814,7 +1814,6 @@ break; } } - set_current_state(TASK_RUNNING); remove_wait_queue(&pcm->open_wait, &wait); up(&pcm->open_mutex); if (err < 0) --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/isa/sb emu8000_patch.c,1.6,1.7 emu8000_pcm.c,1.10,1.11
Update of /cvsroot/alsa/alsa-kernel/isa/sb In directory sc8-pr-cvs1:/tmp/cvs-serv13340/isa/sb Modified Files: emu8000_patch.c emu8000_pcm.c Log Message: Revised schedule() and set_current_state() calls. Replaced need_resched() with cond_resched() call. Index: emu8000_patch.c === RCS file: /cvsroot/alsa/alsa-kernel/isa/sb/emu8000_patch.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- emu8000_patch.c 12 Aug 2002 08:43:46 - 1.6 +++ emu8000_patch.c 30 Sep 2003 09:28:27 - 1.7 @@ -233,11 +233,7 @@ /* we may take too long time in this loop. * so give controls back to kernel if needed. */ - if (need_resched()) { - if (current->state != TASK_RUNNING) - set_current_state(TASK_RUNNING); - schedule(); - } + cond_resched(); if (i == sp->v.loopend && (sp->v.mode_flags & (SNDRV_SFNT_SAMPLE_BIDIR_LOOP|SNDRV_SFNT_SAMPLE_REVERSE_LOOP))) Index: emu8000_pcm.c === RCS file: /cvsroot/alsa/alsa-kernel/isa/sb/emu8000_pcm.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- emu8000_pcm.c 10 Feb 2003 11:53:49 - 1.10 +++ emu8000_pcm.c 30 Sep 2003 09:28:27 - 1.11 @@ -424,13 +424,9 @@ */ #define CHECK_SCHEDULER() \ do { \ - if (need_resched()) {\ - if (current->state != TASK_RUNNING)\ - set_current_state(TASK_RUNNING);\ - schedule();\ - if (signal_pending(current))\ - return -EAGAIN;\ - }\ + cond_resched();\ + if (signal_pending(current))\ + return -EAGAIN;\ } while (0) --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/core/seq seq_lock.c,1.7,1.8
Update of /cvsroot/alsa/alsa-kernel/core/seq In directory sc8-pr-cvs1:/tmp/cvs-serv13340/core/seq Modified Files: seq_lock.c Log Message: Revised schedule() and set_current_state() calls. Replaced need_resched() with cond_resched() call. Index: seq_lock.c === RCS file: /cvsroot/alsa/alsa-kernel/core/seq/seq_lock.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- seq_lock.c 2 Dec 2002 15:11:45 - 1.7 +++ seq_lock.c 30 Sep 2003 09:28:26 - 1.8 @@ -25,44 +25,6 @@ #if defined(CONFIG_SMP) || defined(CONFIG_SND_DEBUG) -#if 0 /* NOT USED */ -/* (interruptible) sleep_on during the specified spinlock */ -void snd_seq_sleep_in_lock(wait_queue_head_t *p, spinlock_t *lock) -{ - wait_queue_t wait; - - set_current_state(TASK_INTERRUPTIBLE); - init_waitqueue_entry(&wait, current); - - add_wait_queue(p, &wait); - - spin_unlock(lock); - schedule(); - spin_lock_irq(lock); - - remove_wait_queue(p, &wait); -} - -/* (interruptible) sleep_on with timeout during the specified spinlock */ -long snd_seq_sleep_timeout_in_lock(wait_queue_head_t *p, spinlock_t *lock, long timeout) -{ - wait_queue_t wait; - - set_current_state(TASK_INTERRUPTIBLE); - init_waitqueue_entry(&wait, current); - - add_wait_queue(p, &wait); - - spin_unlock(lock); - timeout = schedule_timeout(timeout); - spin_lock_irq(lock); - - remove_wait_queue(p, &wait); - - return timeout; -} -#endif /* NOT USED */ - /* wait until all locks are released */ void snd_use_lock_sync_helper(snd_use_lock_t *lockp, const char *file, int line) { --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/core control.c,1.37,1.38 hwdep.c,1.21,1.22 init.c,1.38,1.39 pcm_lib.c,1.43,1.44 pcm_native.c,1.81,1.82 rawmidi.c,1.37,1.38 timer.c,1.46,1.47
Update of /cvsroot/alsa/alsa-kernel/core In directory sc8-pr-cvs1:/tmp/cvs-serv13340/core Modified Files: control.c hwdep.c init.c pcm_lib.c pcm_native.c rawmidi.c timer.c Log Message: Revised schedule() and set_current_state() calls. Replaced need_resched() with cond_resched() call. Index: control.c === RCS file: /cvsroot/alsa/alsa-kernel/core/control.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- control.c 25 Sep 2003 18:55:42 - 1.37 +++ control.c 30 Sep 2003 09:28:26 - 1.38 @@ -822,10 +822,9 @@ } init_waitqueue_entry(&wait, current); add_wait_queue(&ctl->change_sleep, &wait); - spin_unlock_irq(&ctl->read_lock); set_current_state(TASK_INTERRUPTIBLE); + spin_unlock_irq(&ctl->read_lock); schedule(); - set_current_state(TASK_RUNNING); remove_wait_queue(&ctl->change_sleep, &wait); if (signal_pending(current)) return result > 0 ? result : -ERESTARTSYS; Index: hwdep.c === RCS file: /cvsroot/alsa/alsa-kernel/core/hwdep.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -r1.21 -r1.22 --- hwdep.c 25 Sep 2003 18:55:42 - 1.21 +++ hwdep.c 30 Sep 2003 09:28:26 - 1.22 @@ -129,13 +129,14 @@ } else break; set_current_state(TASK_INTERRUPTIBLE); + up(&hw->open_mutex); schedule(); + down(&hw->open_mutex); if (signal_pending(current)) { err = -ERESTARTSYS; break; } } - set_current_state(TASK_RUNNING); remove_wait_queue(&hw->open_wait, &wait); if (err >= 0) { err = snd_card_file_add(hw->card, file); Index: init.c === RCS file: /cvsroot/alsa/alsa-kernel/core/init.c,v retrieving revision 1.38 retrieving revision 1.39 diff -u -r1.38 -r1.39 --- init.c 6 Jun 2003 09:21:49 - 1.38 +++ init.c 30 Sep 2003 09:28:26 - 1.39 @@ -697,8 +697,8 @@ } if (file && (file->f_flags & O_NONBLOCK)) return -EAGAIN; - snd_power_unlock(card); set_current_state(TASK_UNINTERRUPTIBLE); + snd_power_unlock(card); schedule_timeout(30 * HZ); snd_power_lock(card); } Index: pcm_lib.c === RCS file: /cvsroot/alsa/alsa-kernel/core/pcm_lib.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- pcm_lib.c 22 Jul 2003 18:43:18 - 1.43 +++ pcm_lib.c 30 Sep 2003 09:28:26 - 1.44 @@ -2106,11 +2106,11 @@ init_waitqueue_entry(&wait, current); add_wait_queue(&runtime->sleep, &wait); while (1) { - set_current_state(TASK_INTERRUPTIBLE); if (signal_pending(current)) { state = SIGNALED; break; } + set_current_state(TASK_INTERRUPTIBLE); snd_pcm_stream_unlock_irq(substream); tout = schedule_timeout(10 * HZ); snd_pcm_stream_lock_irq(substream); @@ -2139,7 +2139,6 @@ } } _end_loop: - set_current_state(TASK_RUNNING); remove_wait_queue(&runtime->sleep, &wait); switch (state) { @@ -2401,11 +2400,11 @@ init_waitqueue_entry(&wait, current); add_wait_queue(&runtime->sleep, &wait); while (1) { - set_current_state(TASK_INTERRUPTIBLE); if (signal_pending(current)) { state = SIGNALED; break; } + set_current_state(TASK_INTERRUPTIBLE); snd_pcm_stream_unlock_irq(substream); tout = schedule_timeout(10 * HZ); snd_pcm_stream_lock_irq(substream); @@ -2435,7 +2434,6 @@ } } _end_loop: -
[alsa-cvslog] CVS: alsa-kernel/include rawmidi.h,1.10,1.11
Update of /cvsroot/alsa/alsa-kernel/include In directory sc8-pr-cvs1:/tmp/cvs-serv13340/include Modified Files: rawmidi.h Log Message: Revised schedule() and set_current_state() calls. Replaced need_resched() with cond_resched() call. Index: rawmidi.h === RCS file: /cvsroot/alsa/alsa-kernel/include/rawmidi.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- rawmidi.h 29 Nov 2002 21:22:24 - 1.10 +++ rawmidi.h 30 Sep 2003 09:28:27 - 1.11 @@ -46,6 +46,7 @@ #define SNDRV_RAWMIDI_LFLG_INPUT (1<<1) #define SNDRV_RAWMIDI_LFLG_OPEN(3<<0) #define SNDRV_RAWMIDI_LFLG_APPEND (1<<2) +#defineSNDRV_RAWMIDI_LFLG_NOOPENLOCK (1<<3) typedef struct _snd_rawmidi_runtime snd_rawmidi_runtime_t; typedef struct _snd_rawmidi_substream snd_rawmidi_substream_t; --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/usb usbaudio.c,1.65,1.66
Update of /cvsroot/alsa/alsa-kernel/usb In directory sc8-pr-cvs1:/tmp/cvs-serv13340/usb Modified Files: usbaudio.c Log Message: Revised schedule() and set_current_state() calls. Replaced need_resched() with cond_resched() call. Index: usbaudio.c === RCS file: /cvsroot/alsa/alsa-kernel/usb/usbaudio.c,v retrieving revision 1.65 retrieving revision 1.66 diff -u -r1.65 -r1.66 --- usbaudio.c 24 Sep 2003 13:12:50 - 1.65 +++ usbaudio.c 30 Sep 2003 09:28:27 - 1.66 @@ -732,7 +732,6 @@ break; set_current_state(TASK_UNINTERRUPTIBLE); schedule_timeout(1); - set_current_state(TASK_RUNNING); } while (--timeout > 0); if (alive) snd_printk(KERN_ERR "timeout: still %d active urbs..\n", alive); --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/pci/vx222 vx222_ops.c,1.2,1.3
Update of /cvsroot/alsa/alsa-kernel/pci/vx222 In directory sc8-pr-cvs1:/tmp/cvs-serv13340/pci/vx222 Modified Files: vx222_ops.c Log Message: Revised schedule() and set_current_state() calls. Replaced need_resched() with cond_resched() call. Index: vx222_ops.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/vx222/vx222_ops.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- vx222_ops.c 23 May 2003 16:21:13 - 1.2 +++ vx222_ops.c 30 Sep 2003 09:28:27 - 1.3 @@ -378,11 +378,7 @@ if (put_xilinx_data(chip, port, 8, data) < 0) return -EINVAL; /* don't take too much time in this loop... */ - if (need_resched()) { - if (current->state != TASK_RUNNING) - set_current_state(TASK_RUNNING); - schedule(); - } + cond_resched(); } put_xilinx_data(chip, port, 4, 0xff); /* end signature */ --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/drivers dummy.c,1.25,1.26
Update of /cvsroot/alsa/alsa-kernel/drivers In directory sc8-pr-cvs1:/tmp/cvs-serv8583 Modified Files: dummy.c Log Message: Added emu10k1 emulation by Takashi Index: dummy.c === RCS file: /cvsroot/alsa/alsa-kernel/drivers/dummy.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -r1.25 -r1.26 --- dummy.c 3 Sep 2003 13:43:41 - 1.25 +++ dummy.c 30 Sep 2003 08:58:53 - 1.26 @@ -41,6 +41,20 @@ #define MAX_PCM_SUBSTREAMS 16 #define MAX_MIDI_DEVICES 2 +#if 0 /* emu10k1 emulation */ +#define MAX_BUFFER_SIZE(128 * 1024) +static int emu10k1_playback_constraints(snd_pcm_runtime_t *runtime) +{ + int err; + if ((err = snd_pcm_hw_constraint_integer(runtime, SNDRV_PCM_HW_PARAM_PERIODS)) < 0) + return err; + if ((err = snd_pcm_hw_constraint_minmax(runtime, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 256, UINT_MAX)) < 0) + return err; + return 0; +} +#define add_playback_constraints emu10k1_playback_constraints +#endif + #if 0 /* RME9652 emulation */ #define MAX_BUFFER_SIZE(26 * 64 * 1024) #define USE_FORMATSSNDRV_PCM_FMTBIT_S32_LE @@ -102,6 +116,12 @@ #ifndef USE_PERIODS_MAX #define USE_PERIODS_MAX1024 #endif +#ifndef add_playback_constraints +#define add_playback_constraints(x) 0 +#endif +#ifndef add_capture_constraints +#define add_capture_constraints(x) 0 +#endif static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX; /* Index 0-MAX */ static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR; /* ID for this card */ @@ -325,6 +345,7 @@ { snd_pcm_runtime_t *runtime = substream->runtime; snd_card_dummy_pcm_t *dpcm; + int err; dpcm = snd_magic_kcalloc(snd_card_dummy_pcm_t, 0, GFP_KERNEL); if (dpcm == NULL) @@ -347,6 +368,11 @@ } if (substream->pcm->device & 2) runtime->hw.info &= ~(SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID); + if ((err = add_playback_constraints(runtime)) < 0) { + snd_magic_kfree(dpcm); + return err; + } + return 0; } @@ -354,6 +380,7 @@ { snd_pcm_runtime_t *runtime = substream->runtime; snd_card_dummy_pcm_t *dpcm; + int err; dpcm = snd_magic_kcalloc(snd_card_dummy_pcm_t, 0, GFP_KERNEL); if (dpcm == NULL) @@ -377,6 +404,11 @@ } if (substream->pcm->device & 2) runtime->hw.info &= ~(SNDRV_PCM_INFO_MMAP|SNDRV_PCM_INFO_MMAP_VALID); + if ((err = add_capture_constraints(runtime)) < 0) { + snd_magic_kfree(dpcm); + return err; + } + return 0; } --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-driver/usb/us428 usbus428audio.c,1.2,1.3
Update of /cvsroot/alsa/alsa-driver/usb/us428 In directory sc8-pr-cvs1:/tmp/cvs-serv7711/usb/us428 Modified Files: usbus428audio.c Log Message: Added cond_resched() macro Index: usbus428audio.c === RCS file: /cvsroot/alsa/alsa-driver/usb/us428/usbus428audio.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- usbus428audio.c 24 Sep 2003 16:45:10 - 1.2 +++ usbus428audio.c 30 Sep 2003 08:54:47 - 1.3 @@ -616,7 +616,6 @@ set_current_state(TASK_UNINTERRUPTIBLE); snd_printd("snd_us428_urbs_wait_clear waiting\n"); schedule_timeout(1); - set_current_state(TASK_RUNNING); } while (--timeout > 0); if (alive) snd_printk(KERN_ERR "timeout: still %d active urbs..\n", alive); @@ -931,7 +930,7 @@ break; add_wait_queue(&us428_stream->us428->In04WaitQueue, &wait); - current->state =TASK_INTERRUPTIBLE; + set_current_state(TASK_INTERRUPTIBLE); us->submitted = 0; us->len = NOOF_SETRATE_URBS; us428_stream->us428->US04 = us; @@ -951,7 +950,7 @@ us428_stream->us428->refframes = rate == 48000 ? 47 : 44; } while (0); - current->state = TASK_RUNNING; + set_current_state(TASK_RUNNING); remove_wait_queue(&us428_stream->us428->In04WaitQueue, &wait); } while (0); --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-driver/pci/mixart mixart_hwdep.c,1.1,1.2
Update of /cvsroot/alsa/alsa-driver/pci/mixart In directory sc8-pr-cvs1:/tmp/cvs-serv7711/pci/mixart Modified Files: mixart_hwdep.c Log Message: Added cond_resched() macro Index: mixart_hwdep.c === RCS file: /cvsroot/alsa/alsa-driver/pci/mixart/mixart_hwdep.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mixart_hwdep.c 22 Jul 2003 13:39:10 - 1.1 +++ mixart_hwdep.c 30 Sep 2003 08:54:47 - 1.2 @@ -59,11 +59,7 @@ do {/* we may take too long time in this loop. * so give controls back to kernel if needed. */ - if (need_resched()) { - if (current->state != TASK_RUNNING) - set_current_state(TASK_RUNNING); - schedule(); - } + cond_resched(); read = readl_be( MIXART_MEM( mgr, offset )); if(is_egal) { --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-driver/include adriver.h,1.57,1.58
Update of /cvsroot/alsa/alsa-driver/include In directory sc8-pr-cvs1:/tmp/cvs-serv7711/include Modified Files: adriver.h Log Message: Added cond_resched() macro Index: adriver.h === RCS file: /cvsroot/alsa/alsa-driver/include/adriver.h,v retrieving revision 1.57 retrieving revision 1.58 diff -u -r1.57 -r1.58 --- adriver.h 25 Sep 2003 18:55:42 - 1.57 +++ adriver.h 30 Sep 2003 08:54:47 - 1.58 @@ -134,6 +134,15 @@ return (struct proc_dir_entry *) inode->u.generic_ip; } #endif +#ifndef cond_resched +#define cond_resched() \ + do { \ + if (need_resched()) { \ + set_current_state(TASK_RUNNING); \ + schedule(); \ + } \ + } while (0) +#endif #include #if !defined(isa_virt_to_bus) #if defined(virt_to_bus) || defined(__alpha__) --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/core/oss pcm_oss.c,1.51,1.52
Update of /cvsroot/alsa/alsa-kernel/core/oss In directory sc8-pr-cvs1:/tmp/cvs-serv28848 Modified Files: pcm_oss.c Log Message: Fixed compilation for the sync code commited by mistake. Fixed possible race in sync1 code (schedule call) and used schedule_timeout. Index: pcm_oss.c === RCS file: /cvsroot/alsa/alsa-kernel/core/oss/pcm_oss.c,v retrieving revision 1.51 retrieving revision 1.52 diff -u -r1.51 -r1.52 --- pcm_oss.c 29 Sep 2003 18:16:18 - 1.51 +++ pcm_oss.c 30 Sep 2003 07:54:19 - 1.52 @@ -944,6 +944,7 @@ { snd_pcm_runtime_t *runtime; ssize_t result = 0; + long res; wait_queue_t wait; runtime = substream->runtime; @@ -960,12 +961,23 @@ break; result = 0; set_current_state(TASK_INTERRUPTIBLE); - schedule(); + snd_pcm_stream_lock_irq(substream); + res = runtime->status->state; + snd_pcm_stream_unlock_irq(substream); + if (res != SNDRV_PCM_STATE_RUNNING) { + set_current_state(TASK_RUNNING); + break; + } + res = schedule_timeout(10 * HZ); if (signal_pending(current)) { result = -ERESTARTSYS; break; } - set_current_state(TASK_RUNNING); + if (res == 0) { + snd_printk(KERN_ERR "OSS sync error - DMA timeout\n"); + result = -EIO; + break; + } } remove_wait_queue(&runtime->sleep, &wait); return result; @@ -979,14 +991,14 @@ snd_pcm_runtime_t *runtime; snd_pcm_format_t format; unsigned long width; - size_t size; + size_t size, size1; substream = pcm_oss_file->streams[SNDRV_PCM_STREAM_PLAYBACK]; if (substream != NULL) { if ((err = snd_pcm_oss_make_ready(substream)) < 0) return err; runtime = substream->runtime; - format = snd_pcm_oss_format_from(runtime->oss.format)); + format = snd_pcm_oss_format_from(runtime->oss.format); width = snd_pcm_format_physical_width(format); if (runtime->oss.buffer_used > 0) { size = (8 * (runtime->oss.period_bytes - runtime->oss.buffer_used) + 7) / width; @@ -1010,7 +1022,7 @@ while (size < size1) { snd_pcm_format_set_silence(format, runtime->oss.buffer, - (8 * runtime->oss.period_size + 7) / width); + (8 * runtime->oss.period_bytes + 7) / width); err = snd_pcm_oss_sync1(substream, runtime->oss.period_bytes); if (err < 0) return err; --- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog