[alsa-cvslog] CVS: alsa-lib/src/alisp alisp_snd.c,1.2,1.3
Update of /cvsroot/alsa/alsa-lib/src/alisp In directory sc8-pr-cvs1:/tmp/cvs-serv9993/src/alisp Modified Files: alisp_snd.c Log Message: Added some hctl_elem functions to alisp Index: alisp_snd.c === RCS file: /cvsroot/alsa/alsa-lib/src/alisp/alisp_snd.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- alisp_snd.c 29 Jul 2003 13:19:19 - 1.2 +++ alisp_snd.c 30 Jul 2003 19:14:01 - 1.3 @@ -192,6 +192,24 @@ return lexpr; } +static struct alisp_object * new_result4(struct alisp_instance * instance, const char *ptr_id, void *ptr) +{ + struct alisp_object * lexpr; + + if (ptr == NULL) + return &alsa_lisp_nil; + lexpr = new_object(instance, ALISP_OBJ_CONS); + if (lexpr == NULL) + return NULL; + lexpr->value.c.car = new_string(instance, ptr_id); + if (lexpr->value.c.car == NULL) + return NULL; + lexpr->value.c.cdr = new_pointer(instance, ptr); + if (lexpr->value.c.cdr == NULL) + return NULL; + return lexpr; +} + /* * macros */ @@ -200,14 +218,15 @@ * HCTL functions */ -typedef int (*snd_xxx_open_t)(void **rctl, const char *name, int mode); -typedef int (*snd_xxx_open1_t)(void **rctl, void *handle); -typedef int (*snd_xxx_close_t)(void **rctl); +typedef int (*snd_int_pp_strp_int_t)(void **rctl, const char *name, int mode); +typedef int (*snd_int_pp_p_t)(void **rctl, void *handle); +typedef int (*snd_int_p_t)(void *rctl); typedef int (*snd_int_intp_t)(int *val); typedef int (*snd_int_str_t)(const char *str); typedef int (*snd_int_int_strp_t)(int val, char **str); +typedef void *(*snd_p_p_t)(void *handle); -static struct alisp_object * FA_xxx_open(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args) +static struct alisp_object * FA_int_pp_strp_int(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args) { const char *name; int err, mode; @@ -224,33 +243,57 @@ return &alsa_lisp_nil; mode = get_flags(eval(instance, car(cdr(args))), flags, 0); - err = ((snd_xxx_open_t)item->xfunc)(&handle, name, mode); + err = ((snd_int_pp_strp_int_t)item->xfunc)(&handle, name, mode); return new_result1(instance, err, item->prefix, handle); } -static struct alisp_object * FA_xxx_open1(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args) +static struct alisp_object * FA_int_pp_p(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args) { int err; void *handle; - const char *prefix1 = "ctl"; + const char *prefix1; + if (item->xfunc == &snd_hctl_open_ctl) + prefix1 = "ctl"; + else + return &alsa_lisp_nil; args = eval(instance, args); handle = (void *)get_ptr(args, prefix1); if (handle == NULL) return &alsa_lisp_nil; - err = ((snd_xxx_open1_t)item->xfunc)(&handle, handle); + err = ((snd_int_pp_p_t)item->xfunc)(&handle, handle); return new_result1(instance, err, item->prefix, handle); } -static struct alisp_object * FA_xxx_close(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args) +static struct alisp_object * FA_p_p(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args) { void *handle; + const char *prefix1; + if (item->xfunc == &snd_hctl_first_elem || + item->xfunc == &snd_hctl_last_elem || + item->xfunc == &snd_hctl_elem_next || + item->xfunc == &snd_hctl_elem_prev) + prefix1 = "hctl_elem"; + else + return &alsa_lisp_nil; args = eval(instance, args); handle = (void *)get_ptr(args, item->prefix); if (handle == NULL) return &alsa_lisp_nil; - return new_result(instance, ((snd_xxx_close_t)item->xfunc)(handle)); + handle = ((snd_p_p_t)item->xfunc)(handle); + return new_result4(instance, prefix1, handle); +} + +static struct alisp_object * FA_int_p(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args) +{ + void *handle; + + args = eval(instance, args); + handle = (void *)get_ptr(args, item->prefix); + if (handle == NULL) + return &alsa_lisp_nil; + return new_result(instance, ((snd_int_p_t)item->xfunc)(handle)); } static struct alisp_object * FA_int_intp(struct alisp_instance * instance, struct acall_table * item, struct alisp_object * args) @@ -315,6 +358,57 @@ return lexpr; } +static struct alisp_object * create_ctl_elem_id(struct alisp_instance * instance, snd_ctl_elem_id_t * id, struct alisp_object * cons) +{ + cons = add_cons(instance,
[alsa-cvslog] CVS: alsa-lib/alsalisp hctl.lisp,1.2,1.3
Update of /cvsroot/alsa/alsa-lib/alsalisp In directory sc8-pr-cvs1:/tmp/cvs-serv9993/alsalisp Modified Files: hctl.lisp Log Message: Added some hctl_elem functions to alisp Index: hctl.lisp === RCS file: /cvsroot/alsa/alsa-lib/alsalisp/hctl.lisp,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- hctl.lisp 29 Jul 2003 13:19:19 - 1.2 +++ hctl.lisp 30 Jul 2003 19:14:01 - 1.3 @@ -44,6 +44,12 @@ (princ "hctl open success: " hctl "\n") (setq hctl (ahandle hctl)) (princ "open hctl: " hctl "\n") + (princ "load hctl: " (acall 'hctl_load hctl) "\n") + (princ "first: " (acall 'hctl_first_elem hctl) "\n") + (princ "last : " (acall 'hctl_last_elem hctl) "\n") + (princ "next (first): " (acall 'hctl_elem_next (acall 'hctl_first_elem hctl)) "\n") + (princ "prev (last) : " (acall 'hctl_elem_prev (acall 'hctl_last_elem hctl)) "\n") + (princ "first info : " (acall 'hctl_elem_info (acall 'hctl_first_elem hctl)) "\n") (setq hctl (acall 'hctl_close hctl)) (if (= hctl 0) (princ "hctl close success\n") --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/include emu10k1.h,1.29,1.30
Update of /cvsroot/alsa/alsa-kernel/include In directory sc8-pr-cvs1:/tmp/cvs-serv6359 Modified Files: emu10k1.h Log Message: Fixed typos (GRP->GPR) Index: emu10k1.h === RCS file: /cvsroot/alsa/alsa-kernel/include/emu10k1.h,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- emu10k1.h 25 Jul 2003 10:37:39 - 1.29 +++ emu10k1.h 30 Jul 2003 18:54:01 - 1.30 @@ -852,7 +852,7 @@ unsigned int value[32]; unsigned int min; /* minimum range */ unsigned int max; /* maximum range */ - unsigned int translation; /* translation type (EMU10K1_GRP_TRANSLATION*) */ + unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ snd_kcontrol_t *kcontrol; } snd_emu10k1_fx8010_ctl_t; @@ -1282,8 +1282,8 @@ #define EMU10K1_GPR_TRANSLATION_NONE 0 #define EMU10K1_GPR_TRANSLATION_TABLE100 1 -#define EMU10K1_GRP_TRANSLATION_BASS 2 -#define EMU10K1_GRP_TRANSLATION_TREBLE 3 +#define EMU10K1_GPR_TRANSLATION_BASS 2 +#define EMU10K1_GPR_TRANSLATION_TREBLE 3 #define EMU10K1_GPR_TRANSLATION_ONOFF 4 typedef struct { @@ -1294,7 +1294,7 @@ unsigned int value[32]; /* initial values */ unsigned int min; /* minimum range */ unsigned int max; /* maximum range */ - unsigned int translation; /* translation type (EMU10K1_GRP_TRANSLATION*) */ + unsigned int translation; /* translation type (EMU10K1_GPR_TRANSLATION*) */ } emu10k1_fx8010_control_gpr_t; typedef struct { --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-utils/aplay aplay.c,1.167,1.168
Update of /cvsroot/alsa/alsa-utils/aplay In directory sc8-pr-cvs1:/tmp/cvs-serv27224 Modified Files: aplay.c Log Message: Added handling of DRAINING state and extended verbose parts Index: aplay.c === RCS file: /cvsroot/alsa/alsa-utils/aplay/aplay.c,v retrieving revision 1.167 retrieving revision 1.168 diff -u -r1.167 -r1.168 --- aplay.c 29 Jul 2003 14:33:47 - 1.167 +++ aplay.c 30 Jul 2003 17:54:42 - 1.168 @@ -937,7 +937,9 @@ gettimeofday(&now, 0); snd_pcm_status_get_trigger_tstamp(status, &tstamp); timersub(&now, &tstamp, &diff); - fprintf(stderr, "xrun!!! (at least %.3f ms long)\n", diff.tv_sec * 1000 + diff.tv_usec / 1000.0); + fprintf(stderr, "%s!!! (at least %.3f ms long)\n", + stream == SND_PCM_STREAM_PLAYBACK ? "underrun" : "overrun", + diff.tv_sec * 1000 + diff.tv_usec / 1000.0); if (verbose) { fprintf(stderr, "Status:\n"); snd_pcm_status_dump(status, log); @@ -947,6 +949,23 @@ exit(EXIT_FAILURE); } return; /* ok, data should be accepted again */ + } if (snd_pcm_status_get_state(status) == SND_PCM_STATE_DRAINING) { + if (verbose) { + fprintf(stderr, "Status(DRAINING):\n"); + snd_pcm_status_dump(status, log); + } + if (stream == SND_PCM_STREAM_CAPTURE) { + fprintf(stderr, "capture stream format change? attempting recover...\n"); + if ((res = snd_pcm_prepare(handle))<0) { + error("xrun(DRAINING): prepare error: %s", snd_strerror(res)); + exit(EXIT_FAILURE); + } + return; + } + } + if (verbose) { + fprintf(stderr, "Status(R/W):\n"); + snd_pcm_status_dump(status, log); } error("read/write error, state = %s", snd_pcm_state_name(snd_pcm_status_get_state(status))); exit(EXIT_FAILURE); --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/pci es1968.c,1.44,1.45
Update of /cvsroot/alsa/alsa-kernel/pci In directory sc8-pr-cvs1:/tmp/cvs-serv1825 Modified Files: es1968.c Log Message: added use_pm to the kernel boot parameter. Index: es1968.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/es1968.c,v retrieving revision 1.44 retrieving revision 1.45 diff -u -r1.44 -r1.45 --- es1968.c17 Jul 2003 15:21:53 - 1.44 +++ es1968.c30 Jul 2003 15:35:33 - 1.45 @@ -2852,7 +2852,8 @@ total_bufsize, pcm_substreams_p, pcm_substreams_c, -clock +clock, +use_pm */ static int __init alsa_card_es1968_setup(char *str) @@ -2867,7 +2868,8 @@ get_option(&str,&total_bufsize[nr_dev]) == 2 && get_option(&str,&pcm_substreams_p[nr_dev]) == 2 && get_option(&str,&pcm_substreams_c[nr_dev]) == 2 && - get_option(&str,&clock[nr_dev]) == 2); + get_option(&str,&clock[nr_dev]) == 2 && + get_option(&str,&use_pm[nr_dev]) == 2); nr_dev++; return 1; } --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/pci intel8x0.c,1.86,1.87
Update of /cvsroot/alsa/alsa-kernel/pci In directory sc8-pr-cvs1:/tmp/cvs-serv22821 Modified Files: intel8x0.c Log Message: - improved the probe/resume function. check only the valid codec bits in chip_init() during resume. Index: intel8x0.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0.c,v retrieving revision 1.86 retrieving revision 1.87 diff -u -r1.86 -r1.87 --- intel8x0.c 30 Jul 2003 10:54:03 - 1.86 +++ intel8x0.c 30 Jul 2003 14:39:38 - 1.87 @@ -523,6 +523,19 @@ /* * access to AC97 codec via normal i/o (for ICH and SIS7012) */ + +/* return the GLOB_STA bit for the corresponding codec */ +static unsigned int get_ich_codec_bit(intel8x0_t *chip, unsigned int codec) +{ + static unsigned int codec_bit[3] = { + ICH_PCR, ICH_SCR, ICH_TCR + }; + snd_assert(codec < 3, return ICH_PCR); + if (chip->device_type == DEVICE_INTEL_ICH4) + codec = chip->ac97_sdin[codec]; + return codec_bit[codec]; +} + static int snd_intel8x0_codec_semaphore(intel8x0_t *chip, unsigned int codec) { int time; @@ -534,19 +547,7 @@ /* so we check any */ codec = ICH_PCR | ICH_SCR | ICH_TCR; } else { - if (chip->device_type == DEVICE_INTEL_ICH4) { - switch (chip->ac97_sdin[codec]) { - case 0: codec = ICH_PCR; break; - case 1: codec = ICH_SCR; break; - case 2: codec = ICH_TCR; break; - } - } else { - switch (codec) { - case 0: codec = ICH_PCR; break; - case 1: codec = ICH_SCR; break; - case 2: codec = ICH_TCR; break; - } - } + codec = get_ich_codec_bit(chip, codec); } /* codec ready ? */ @@ -1731,9 +1732,14 @@ } } ac97.pci = chip->pci; - if ((err = snd_ac97_mixer(chip->card, &ac97, &x97)) < 0) + if ((err = snd_ac97_mixer(chip->card, &ac97, &x97)) < 0) { + /* clear the cold-reset bit for the next chance */ + if (chip->device_type != DEVICE_ALI) + iputdword(chip, ICHREG(GLOB_CNT), igetdword(chip, ICHREG(GLOB_CNT)) & ~ICH_AC97COLD); return err; + } chip->ac97[0] = x97; + /* tune up the primary codec */ snd_ac97_tune_hardware(chip->ac97[0], ac97_quirks); /* the following three entries are common among all devices */ chip->ichd[ICHD_PCMOUT].ac97 = x97; @@ -1886,7 +1892,7 @@ schedule_timeout(1);\ } while (0) -static int snd_intel8x0_ich_chip_init(intel8x0_t *chip) +static int snd_intel8x0_ich_chip_init(intel8x0_t *chip, int probing) { unsigned long end_time; unsigned int cnt, status, nstatus; @@ -1915,49 +1921,55 @@ return -EIO; __ok: - /* wait for any codec ready status. -* Once it becomes ready it should remain ready -* as long as we do not disable the ac97 link. -*/ - end_time = jiffies + HZ; - do { - status = igetdword(chip, ICHREG(GLOB_STA)) & (ICH_PCR | ICH_SCR | ICH_TCR); - if (status) - goto __ok1; - do_delay(chip); - } while (time_after_eq(end_time, jiffies)); - snd_printk(KERN_ERR "codec_ready: codec is not ready [0x%x]\n", igetdword(chip, ICHREG(GLOB_STA))); - return -EIO; - - __ok1: - if (status == (ICH_PCR | ICH_SCR | ICH_TCR)) - goto __ok3; - /* wait for other codecs ready status. No secondary codecs? , ok */ - end_time = jiffies + HZ / 4; - do { - nstatus = igetdword(chip, ICHREG(GLOB_STA)) & (ICH_PCR | ICH_SCR | ICH_TCR); - if (nstatus != status) { - status = nstatus; - goto __ok2; + if (probing) { + /* wait for any codec ready status. +* Once it becomes ready it should remain ready +* as long as we do not disable the ac97 link. +*/ + end_time = jiffies + HZ; + do { + status = igetdword(chip, ICHREG(GLOB_STA)) & (ICH_PCR | ICH_SCR | ICH_TCR); + if (status) + break; + do_delay(chip); + } while (time_after_eq(end_time, jiffies)); + if (! status) { + /* no codec is found */ + snd_printk(KERN_ERR "codec_ready: codec is not ready [0x%x]\n", igetdword(chip, ICHREG(GLOB_STA))); + return -EIO; } - do_delay(chip); - } while (time_after_eq(end_time, jiffies)); - __ok2: - if (
[alsa-cvslog] CVS: alsa-tools/seq/sbiload sbiload.c,1.8,1.9
Update of /cvsroot/alsa/alsa-tools/seq/sbiload In directory sc8-pr-cvs1:/tmp/cvs-serv18571 Modified Files: sbiload.c Log Message: Added warnings when files were not specified Index: sbiload.c === RCS file: /cvsroot/alsa/alsa-tools/seq/sbiload/sbiload.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- sbiload.c 25 Mar 2003 17:36:37 - 1.8 +++ sbiload.c 30 Jul 2003 14:14:21 - 1.9 @@ -654,12 +654,16 @@ finish_client(); return 1; } + } else { +fprintf(stderr, "Warning: instrument file was not specified\n"); } if (optind < argc) { if (load_file (128, argv[optind]) < 0) { finish_client(); return 1; } + } else { +fprintf(stderr, "Warning: drum file was not specified\n"); } /* Unsubscribe destination port and close client */ --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/pci intel8x0.c,1.85,1.86 via82xx.c,1.43,1.44
Update of /cvsroot/alsa/alsa-kernel/pci In directory sc8-pr-cvs1:/tmp/cvs-serv15504/pci Modified Files: intel8x0.c via82xx.c Log Message: - added quirk type AC97_TUNE_AD_SHARING. - added mask field to snd_ac97_quirk. - new patch for AD1985. set more config bits for line/mic sharing. - rewritten quirk table in C99 init style. - more quirks for intel ICH5/AD1985 boards. Index: intel8x0.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/intel8x0.c,v retrieving revision 1.85 retrieving revision 1.86 diff -u -r1.85 -r1.86 --- intel8x0.c 24 Jul 2003 05:53:57 - 1.85 +++ intel8x0.c 30 Jul 2003 10:54:03 - 1.86 @@ -1555,13 +1555,98 @@ }; static struct ac97_quirk ac97_quirks[] __devinitdata = { - { 0x1028, 0x0126, "Dell Optiplex GX260", AC97_TUNE_HP_ONLY }, - { 0x1734, 0x0088, "Fujitsu-Siemens D1522", AC97_TUNE_HP_ONLY }, - { 0x10f1, 0x2665, "Fujitsu-Siemens Celcius", AC97_TUNE_HP_ONLY }, - { 0x110a, 0x0056, "Fujitsu-Siemens Scenic", AC97_TUNE_HP_ONLY }, - { 0x8086, 0x4d44, "Intel D850EMV2", AC97_TUNE_HP_ONLY }, - /* { 0x4144, 0x5360, "AMD64 Motherboard", AC97_TUNE_HP_ONLY }, */ /* FIXME: this seems invalid */ - { 0x1043, 0x80b0, "ASUS P4PE Mobo", AC97_TUNE_SWAP_SURROUND }, + { + .vendor = 0x1028, + .device = 0x0126, + .name = "Dell Optiplex GX260", + .type = AC97_TUNE_HP_ONLY + }, + { + .vendor = 0x1043, + .device =0x80b0, + .name = "ASUS P4PE Mobo", + .type = AC97_TUNE_SWAP_SURROUND + }, + { + .vendor = 0x10f1, + .device = 0x2665, + .name = "Fujitsu-Siemens Celcius", + .type = AC97_TUNE_HP_ONLY + }, + { + .vendor = 0x110a, + .device = 0x0056, + .name = "Fujitsu-Siemens Scenic", + .type = AC97_TUNE_HP_ONLY + }, + { + .vendor = 0x11d4, + .device = 0x5375, + .name = "ADI AD1985 (discrete)", + .type = AC97_TUNE_HP_ONLY + }, + { + .vendor = 0x1734, + .device = 0x0088, + .name = "Fujitsu-Siemens D1522", + .type = AC97_TUNE_HP_ONLY + }, +#if 0 + /* FIXME: this seems invalid */ + { + .vendor = 0x4144, + .device = 0x5360, + .type = "AMD64 Motherboard", + .name = AC97_TUNE_HP_ONLY + }, +#endif + { + .vendor = 0x8086, + .device = 0x2000, + .mask = 0xfff0, + .name = "Intel ICH5/AD1985 (discrete)", + .type = AC97_TUNE_HP_ONLY + }, + { + .vendor = 0x8086, + .device = 0x4000, + .mask = 0xfff0, + .name = "Intel ICH5/AD1985", + .type = AC97_TUNE_AD_SHARING + }, + { + .vendor = 0x8086, + .device = 0x4d44, + .name = "Intel D850EMV2", + .type = AC97_TUNE_HP_ONLY + }, + { + .vendor = 0x8086, + .device = 0x6000, + .mask = 0xfff0, + .name = "Intel ICH5/AD1985", + .type = AC97_TUNE_AD_SHARING + }, + { + .vendor = 0x8086, + .device = 0xe000, + .mask = 0xfff0, + .name = "Intel ICH5/AD1985", + .type = AC97_TUNE_AD_SHARING + }, + { + .vendor = 0x8086, + .device = 0xa000, + .mask = 0xfff0, + .name = "Intel ICH5/AD1985 (discrete)", + .type = AC97_TUNE_HP_ONLY + }, + { + .vendor = 0x80f3, + .device = 0x1043, + .name = "ASUS ICH5/AD1985", + .type = AC97_TUNE_AD_SHARING + }, { } /* terminator */ }; Index: via82xx.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/via82xx.c,v retrieving revision 1.43 retrieving revision 1.44 diff -u -r1.43 -r1.44 --- via82xx.c 21 Jul 2003 14:55:22 - 1.43 +++ via82xx.c 30 Jul 2003 10:54:03 - 1.44 @@ -886,9 +886,11 @@ snd_ac97_set_rate(chip->ac97, AC97_PCM_LFE_DAC_RATE, runtime->rate); snd_ac97_set_rate(chip->ac97, AC97_SPDIF, runtime->rate); } +#if 0 if (chip->revision == VIA_REV_8233A) rbits = 0; else +#endif rbits = (0xf / 48000) * runtime->rate + ((0xf % 48000) * runtime->rate) / 48000; snd_assert((rbits & ~0xf) == 0, return -EINVAL); snd_via82xx_channel_reset(chip, viadev); @@ -928,9 +930,12 @@ fmt = (runtime->format == SNDRV_PCM_FORMAT_S16_LE) ? VIA_R
[alsa-cvslog] CVS: alsa-kernel/include ac97_codec.h,1.30,1.31
Update of /cvsroot/alsa/alsa-kernel/include In directory sc8-pr-cvs1:/tmp/cvs-serv15504/include Modified Files: ac97_codec.h Log Message: - added quirk type AC97_TUNE_AD_SHARING. - added mask field to snd_ac97_quirk. - new patch for AD1985. set more config bits for line/mic sharing. - rewritten quirk table in C99 init style. - more quirks for intel ICH5/AD1985 boards. Index: ac97_codec.h === RCS file: /cvsroot/alsa/alsa-kernel/include/ac97_codec.h,v retrieving revision 1.30 retrieving revision 1.31 diff -u -r1.30 -r1.31 --- ac97_codec.h19 Jun 2003 20:15:33 - 1.30 +++ ac97_codec.h30 Jul 2003 10:54:03 - 1.31 @@ -345,13 +345,20 @@ void snd_ac97_resume(ac97_t *ac97); #endif -enum { AC97_TUNE_HP_ONLY, AC97_TUNE_SWAP_HP, AC97_TUNE_SWAP_SURROUND }; +/* quirk types */ +enum { + AC97_TUNE_HP_ONLY, /* headphone (true line-out) control as master only */ + AC97_TUNE_SWAP_HP, /* swap headphone and master controls */ + AC97_TUNE_SWAP_SURROUND, /* swap master and surround controls */ + AC97_TUNE_AD_SHARING/* for AD1985, turn on OMS bit and use headphone */ +}; struct ac97_quirk { - unsigned short vendor; - unsigned short device; - const char *name; - int type; + unsigned short vendor; /* PCI vendor id */ + unsigned short device; /* PCI device id */ + unsigned short mask;/* device id bit mask, 0 = accept all */ + const char *name; /* name shown as info */ + int type; /* quirk type above */ }; int snd_ac97_tune_hardware(ac97_t *ac97, struct ac97_quirk *quirk); --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/alsa-cvslog
[alsa-cvslog] CVS: alsa-kernel/pci/ac97 ac97_codec.c,1.99,1.100 ac97_patch.c,1.17,1.18 ac97_patch.h,1.8,1.9
Update of /cvsroot/alsa/alsa-kernel/pci/ac97 In directory sc8-pr-cvs1:/tmp/cvs-serv15504/pci/ac97 Modified Files: ac97_codec.c ac97_patch.c ac97_patch.h Log Message: - added quirk type AC97_TUNE_AD_SHARING. - added mask field to snd_ac97_quirk. - new patch for AD1985. set more config bits for line/mic sharing. - rewritten quirk table in C99 init style. - more quirks for intel ICH5/AD1985 boards. Index: ac97_codec.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_codec.c,v retrieving revision 1.99 retrieving revision 1.100 diff -u -r1.99 -r1.100 --- ac97_codec.c1 Jul 2003 10:07:54 - 1.99 +++ ac97_codec.c30 Jul 2003 10:54:03 - 1.100 @@ -103,7 +103,7 @@ { 0x41445370, 0x, "AD1980",patch_ad1980, NULL }, { 0x41445372, 0x, "AD1981A", patch_ad1881, NULL }, { 0x41445374, 0x, "AD1981B", patch_ad1881, NULL }, -{ 0x41445375, 0x, "AD1985",patch_ad1980, NULL }, +{ 0x41445375, 0x, "AD1985",patch_ad1985, NULL }, { 0x414c4300, 0xfff0, "RL5306",NULL, NULL }, { 0x414c4310, 0xfff0, "RL5382",NULL, NULL }, { 0x414c4320, 0xfff0, "RL5383",NULL, NULL }, @@ -2235,6 +2235,14 @@ return 0; } +static int tune_ad_sharing(ac97_t *ac97) +{ + unsigned short scfg; + /* Turn on OMS bit to route microphone to back panel */ + scfg = snd_ac97_read(ac97, AC97_AD_SERIAL_CFG); + snd_ac97_write_cache(ac97, AC97_AD_SERIAL_CFG, scfg | 0x0200); + return swap_headphone(ac97, 1); +} /** * snd_ac97_tune_hardware - tune up the hardware @@ -2253,7 +2261,10 @@ snd_assert(quirk, return -EINVAL); for (; quirk->vendor; quirk++) { - if (quirk->vendor == ac97->subsystem_vendor && quirk->device == ac97->subsystem_device) { + if (quirk->vendor != ac97->subsystem_vendor) + continue; + if ((! quirk->mask && quirk->device == ac97->subsystem_device) || + quirk->device == (quirk->mask & ac97->subsystem_device)) { snd_printdd("ac97 quirk for %s (%04x:%04x)\n", quirk->name, ac97->subsystem_vendor, ac97->subsystem_device); switch (quirk->type) { case AC97_TUNE_HP_ONLY: @@ -2262,6 +2273,8 @@ return swap_headphone(ac97, 0); case AC97_TUNE_SWAP_SURROUND: return swap_surround(ac97); + case AC97_TUNE_AD_SHARING: + return tune_ad_sharing(ac97); } snd_printk(KERN_ERR "invalid quirk type %d for %s\n", quirk->type, quirk->name); return -EINVAL; Index: ac97_patch.c === RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -r1.17 -r1.18 --- ac97_patch.c26 Jul 2003 09:46:14 - 1.17 +++ ac97_patch.c30 Jul 2003 10:54:03 - 1.18 @@ -759,6 +759,19 @@ return 0; } +int patch_ad1985(ac97_t * ac97) +{ + unsigned short misc; + + patch_ad1881(ac97); + ac97->build_ops = &patch_ad1980_build_ops; + misc = snd_ac97_read(ac97, AC97_AD_MISC); + /* switch front/surround line-out/hp-out */ + /* center/LFE, surround in High-Z mode */ + snd_ac97_write_cache(ac97, AC97_AD_MISC, misc | 0x1c28); + return 0; +} + static const snd_kcontrol_new_t snd_ac97_controls_alc650[] = { AC97_SINGLE("Duplicate Front", AC97_ALC650_MULTICH, 0, 1, 0), AC97_SINGLE("Surround Down Mix", AC97_ALC650_MULTICH, 1, 1, 0), Index: ac97_patch.h === RCS file: /cvsroot/alsa/alsa-kernel/pci/ac97/ac97_patch.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- ac97_patch.h17 Jun 2003 18:43:32 - 1.8 +++ ac97_patch.h30 Jul 2003 10:54:03 - 1.9 @@ -42,6 +42,7 @@ int patch_ad1885(ac97_t * ac97); int patch_ad1886(ac97_t * ac97); int patch_ad1980(ac97_t * ac97); +int patch_ad1985(ac97_t * ac97); int patch_alc650(ac97_t * ac97); int patch_cm9738(ac97_t * ac97); int patch_cm9739(ac97_t * ac97); --- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa0013ave/direct;at.aspnet_072303_01/01 ___ Alsa-cvslog mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo