[alsa-cvslog] CVS: alsa-lib/src/conf/cards CMI8738-MC6.conf,1.5,1.6

2003-11-07 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-lib/src/conf/cards
In directory sc8-pr-cvs1:/tmp/cvs-serv2198/cards

Modified Files:
CMI8738-MC6.conf 
Log Message:
removed "Exchange DAC" hack again.  now it's handled in the driver.
  


Index: CMI8738-MC6.conf
===
RCS file: /cvsroot/alsa/alsa-lib/src/conf/cards/CMI8738-MC6.conf,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CMI8738-MC6.conf31 Oct 2003 16:50:40 -  1.5
+++ CMI8738-MC6.conf7 Nov 2003 19:39:16 -   1.6
@@ -50,12 +50,6 @@
preserve true
value false
}
-{
-name "Exchange DAC"
-lock true
-preserve true
-value true
-}
]
}
 }  



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-kernel/pci cmipci.c,1.52,1.53

2003-11-07 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-kernel/pci
In directory sc8-pr-cvs1:/tmp/cvs-serv2057

Modified Files:
cmipci.c 
Log Message:
- set XCHGDAC bit implicitly on MC4/6 models for fixing wrong
  playback on some boards.
- removed "Exchange DAC" control from such a model.

  


Index: cmipci.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/cmipci.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -r1.52 -r1.53
--- cmipci.c28 Oct 2003 11:28:01 -  1.52
+++ cmipci.c7 Nov 2003 19:38:09 -   1.53
@@ -725,6 +725,7 @@
 
spin_lock_irqsave(&cm->reg_lock, flags);
snd_cmipci_set_bit(cm, CM_REG_LEGACY_CTRL, CM_NXCHG);
+   snd_cmipci_set_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC);
if (channels > 4) {
snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D);
snd_cmipci_set_bit(cm, CM_REG_CHFORMAT, CM_CHB3D5C);
@@ -749,6 +750,7 @@
snd_cmipci_clear_bit(cm, CM_REG_CHFORMAT, CM_CHB3D5C);
snd_cmipci_clear_bit(cm, CM_REG_LEGACY_CTRL, CM_CHB3D6C);
snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_ENCENTER);
+   snd_cmipci_clear_bit(cm, CM_REG_MISC_CTRL, CM_XCHGDAC);
spin_unlock_irqrestore(&cm->reg_lock, flags);
}
}
@@ -2671,11 +2673,14 @@
 
 /* both for CM8338/8738 */
 static snd_kcontrol_new_t snd_cmipci_mixer_switches[] __devinitdata = {
-   DEFINE_MIXER_SWITCH("Exchange DAC", exchange_dac),
DEFINE_MIXER_SWITCH("Four Channel Mode", fourch),
DEFINE_MIXER_SWITCH("Line-In As Rear", line_rear),
 };
 
+/* for non-multichannel chips */
+static snd_kcontrol_new_t snd_cmipci_nomulti_switch __devinitdata =
+DEFINE_MIXER_SWITCH("Exchange DAC", exchange_dac);
+
 /* only for CM8738 */
 static snd_kcontrol_new_t snd_cmipci_8738_mixer_switches[] __devinitdata = {
 #if 0 /* controlled in pcm device */
@@ -2748,6 +2753,11 @@
sw = snd_cmipci_mixer_switches;
for (idx = 0; idx < num_controls(snd_cmipci_mixer_switches); idx++, sw++) {
err = snd_ctl_add(cm->card, snd_ctl_new1(sw, cm));
+   if (err < 0)
+   return err;
+   }
+   if (! cm->can_multi_ch) {
+   err = snd_ctl_add(cm->card, snd_ctl_new1(&snd_cmipci_nomulti_switch, 
cm));
if (err < 0)
return err;
}



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-kernel/pci/rme9652 hdsp.c,1.47,1.48

2003-11-07 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-kernel/pci/rme9652
In directory sc8-pr-cvs1:/tmp/cvs-serv23391

Modified Files:
hdsp.c 
Log Message:
Thomas Charbonnel <[EMAIL PROTECTED]>:

The attached patch at last fixes the long lasting firmware loading error 
after boot, and includes a small cosmetic fix for H9632 cards (fixes 
SPDIF external rate reporting in /proc/asound/cardX/hdsp and amixer 
outputs).


Index: hdsp.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/rme9652/hdsp.c,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- hdsp.c  7 Nov 2003 18:25:54 -   1.47
+++ hdsp.c  7 Nov 2003 18:42:59 -   1.48
@@ -694,6 +694,13 @@
return -EIO;
}
}
+
+   if ((1000 / HZ) < 3000) {
+   set_current_state(TASK_UNINTERRUPTIBLE);
+   schedule_timeout((3000 * HZ + 999) / 1000);
+   } else {
+   mdelay(3000);
+   }

if (hdsp_fifo_wait (hdsp, 0, HDSP_LONG_WAIT)) {
snd_printk ("timeout at end of firmware loading\n");
@@ -708,12 +715,6 @@
hdsp_write (hdsp, HDSP_control2Reg, hdsp->control2_register);
snd_printk ("finished firmware loading\n");

-   if ((1000 / HZ) < 3000) {
-   set_current_state(TASK_UNINTERRUPTIBLE);
-   schedule_timeout((3000 * HZ + 999) / 1000);
-   } else {
-   mdelay(3000);
-   }
}
if (hdsp->state & HDSP_InitializationComplete) {
snd_printk("firmware loaded from cache, restoring defaults\n");
@@ -1882,10 +1883,12 @@
 
 static int snd_hdsp_info_spdif_sample_rate(snd_kcontrol_t *kcontrol, 
snd_ctl_elem_info_t * uinfo)
 {
-   static char *texts[] = {"32000", "44100", "48000", "64000", "88200", "96000", 
"None"};
+   static char *texts[] = {"32000", "44100", "48000", "64000", "88200", "96000", 
"None", "128000", "176400", "192000"};
+   hdsp_t *hdsp = _snd_kcontrol_chip(kcontrol);
+
uinfo->type = SNDRV_CTL_ELEM_TYPE_ENUMERATED;
uinfo->count = 1;
-   uinfo->value.enumerated.items = 7 ;
+   uinfo->value.enumerated.items = (hdsp->io_type == H9632) ? 10 : 7;
if (uinfo->value.enumerated.item >= uinfo->value.enumerated.items)
uinfo->value.enumerated.item = uinfo->value.enumerated.items - 1;
strcpy(uinfo->value.enumerated.name, texts[uinfo->value.enumerated.item]);
@@ -1915,6 +1918,15 @@
case 96000:
ucontrol->value.enumerated.item[0] = 5;
break;
+   case 128000:
+   ucontrol->value.enumerated.item[0] = 7;
+   break;
+   case 176400:
+   ucontrol->value.enumerated.item[0] = 8;
+   break;
+   case 192000:
+   ucontrol->value.enumerated.item[0] = 9;
+   break;
default:
ucontrol->value.enumerated.item[0] = 6; 
}
@@ -3534,7 +3546,7 @@
tmp = "-12 dB";
break;
}
-   snd_iprintf(buffer, "Phone Gain : %s\n", tmp);
+   snd_iprintf(buffer, "Phones Gain : %s\n", tmp);
 
snd_iprintf(buffer, "XLR Breakout Cable : %s\n", 
hdsp_xlr_breakout_cable(hdsp) ? "yes" : "no"); 




---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-kernel/pci/rme9652 hdsp.c,1.46,1.47

2003-11-07 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-kernel/pci/rme9652
In directory sc8-pr-cvs1:/tmp/cvs-serv20235

Modified Files:
hdsp.c 
Log Message:
Thomas Charbonnel <[EMAIL PROTECTED]>:

The attached patch fixes matrix mixer and metering problems spotted by 
Pentti Ala-Vannesluoma for H9632 cards and gcc 2.9x compile errors 
reported by Martin Langer.


Index: hdsp.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/rme9652/hdsp.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -r1.46 -r1.47
--- hdsp.c  3 Nov 2003 18:24:53 -   1.46
+++ hdsp.c  7 Nov 2003 18:25:54 -   1.47
@@ -454,6 +454,7 @@
unsigned shortstate; /* stores state bits */
u32   firmware_cache[24413]; /* this helps recover from 
accidental iobox power failure */
size_tperiod_bytes;  /* guess what this is */
+   unsigned char max_channels;
unsigned char qs_in_channels;/* quad speed mode for H9632 */
unsigned char ds_in_channels;
unsigned char ss_in_channels;   /* different for 
multiface/digiface */
@@ -1169,11 +1170,11 @@
/* set thru for all channels */
 
if (enable) {
-   for (i = 0; i < HDSP_MAX_CHANNELS; i++) {
+   for (i = 0; i < hdsp->max_channels; i++) {
hdsp_write_gain (hdsp, 
hdsp_input_to_output_key(hdsp,i,i), UNITY_GAIN);
}
} else {
-   for (i = 0; i < HDSP_MAX_CHANNELS; i++) {
+   for (i = 0; i < hdsp->max_channels; i++) {
hdsp_write_gain (hdsp, 
hdsp_input_to_output_key(hdsp,i,i), MINUS_INFINITY_GAIN);
}
}
@@ -1181,7 +1182,7 @@
} else {
int mapped_channel;
 
-   snd_assert(channel < HDSP_MAX_CHANNELS, return);
+   snd_assert(channel < hdsp->max_channels, return);
 
mapped_channel = hdsp->channel_map[channel];
 
@@ -2902,9 +2903,9 @@
 
source = ucontrol->value.integer.value[0];
destination = ucontrol->value.integer.value[1];
-
-   if (source > 25) {
-   addr = hdsp_playback_to_output_key(hdsp,source-26,destination);
+   
+   if (source >= hdsp->max_channels) {
+   addr = 
hdsp_playback_to_output_key(hdsp,source-hdsp->max_channels,destination);
} else {
addr = hdsp_input_to_output_key(hdsp,source, destination);
}
@@ -2931,8 +2932,8 @@
source = ucontrol->value.integer.value[0];
destination = ucontrol->value.integer.value[1];
 
-   if (source > 25) {
-   addr = hdsp_playback_to_output_key(hdsp,source-26, destination);
+   if (source >= hdsp->max_channels) {
+   addr = hdsp_playback_to_output_key(hdsp,source-hdsp->max_channels, 
destination);
} else {
addr = hdsp_input_to_output_key(hdsp,source, destination);
}
@@ -3177,7 +3178,7 @@
 
 int snd_hdsp_create_controls(snd_card_t *card, hdsp_t *hdsp)
 {
-   unsigned int idx, limit;
+   unsigned int idx;
int err;
snd_kcontrol_t *kctl;
 
@@ -3676,12 +3677,13 @@
   odd numbered channels to right, even to left.
*/
if (hdsp->io_type == H9632) {
-   lineouts_base = 14;
+   /* this is the phones/analog output */
+   lineouts_base = 10;
} else {
lineouts_base = 26;
}

-   for (i = 0; i < HDSP_MAX_CHANNELS; i++) {
+   for (i = 0; i < hdsp->max_channels; i++) {
if (i & 1) { 
if (hdsp_write_gain (hdsp, hdsp_input_to_output_key 
(hdsp, i, lineouts_base), UNITY_GAIN) ||
hdsp_write_gain (hdsp, hdsp_playback_to_output_key 
(hdsp, i, lineouts_base), UNITY_GAIN)) {
@@ -3793,7 +3795,7 @@
 {
int mapped_channel;
 
-snd_assert(channel >= 0 || channel < HDSP_MAX_CHANNELS, return NULL);
+snd_assert(channel >= 0 || channel < hdsp->max_channels, return NULL);
 
if ((mapped_channel = hdsp->channel_map[channel]) < 0) {
return NULL;
@@ -3963,7 +3965,7 @@
hdsp_t *hdsp = _snd_pcm_substream_chip(substream);
int mapped_channel;
 
-   snd_assert(info->channel < HDSP_MAX_CHANNELS, return -EINVAL);
+   snd_assert(info->channel < hdsp->max_channels, return -EINVAL);
 
if ((mapped_channel = hdsp->channel_map[info->channel]) < 0) {
return -EINVAL;
@@ -4487,8 +4489,8 @@
 
 static int snd_hdsp_hwdep_dummy_op(snd_hwdep_t *hw, struct file *file)
 {
-/* we have nothing to initialize but the call is 

[alsa-cvslog] CVS: alsa-kernel/include emu10k1.h,1.33,1.34

2003-11-07 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-kernel/include
In directory sc8-pr-cvs1:/tmp/cvs-serv13854/include

Modified Files:
emu10k1.h 
Log Message:
Peter Zubaj <[EMAIL PROTECTED]>:
 - disable routing from AC97 line out to front speakers.
 - AC97 ADC is used only for Mic playback and recording
 - Philips ADC is used for other analog playback and recording 
  (Analog Mix Playback Volume, Analog Mix Capture Volume)
 - removes unused AC97 controls (is phone used ???)

Takashi Iwai <[EMAIL PROTECTED]>:
 - removed the duplicated IEC958 control on Dell's board.


Index: emu10k1.h
===
RCS file: /cvsroot/alsa/alsa-kernel/include/emu10k1.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- emu10k1.h   17 Oct 2003 15:39:52 -  1.33
+++ emu10k1.h   7 Nov 2003 17:52:00 -   1.34
@@ -679,6 +679,9 @@
 #define A_ADCIDX   0x63
 #define A_ADCIDX_IDX   0x1063
 
+#define A_MICIDX   0x64
+#define A_MICIDX_IDX   0x1064
+
 #define FXIDX  0x65/* FX recording buffer index register  
 */
 #define FXIDX_MASK 0x  /* 16-bit value
 */
 #define FXIDX_IDX  0x1065
@@ -1201,8 +1204,8 @@
 #define A_EXTIN_OPT_SPDIF_R 0x05/*  right */ 
 #define A_EXTIN_LINE2_L0x08/* audigy drive line2/mic2 - left */
 #define A_EXTIN_LINE2_R0x09/*   right */
-#define A_EXTIN_RCA_SPDIF_L 0x0a/* audigy drive RCA SPDIF - left */
-#define A_EXTIN_RCA_SPDIF_R 0x0b/*  right */
+#define A_EXTIN_ADC_L  0x0a/* Philips ADC - left */
+#define A_EXTIN_ADC_R  0x0b/*   right */
 #define A_EXTIN_AUX2_L 0x0c/* audigy drive aux2 - left */
 #define A_EXTIN_AUX2_R 0x0d/*   - right */
 
@@ -1227,6 +1230,7 @@
 #define A_EXTOUT_AC97_R0x11/*  right */
 #define A_EXTOUT_ADC_CAP_L 0x16/* ADC capture buffer left */
 #define A_EXTOUT_ADC_CAP_R 0x17/*right */
+#define A_EXTOUT_MIC_CAP   0x18/* Mic capture buffer */
 
 /* Audigy constants */
 #define A_C_   0xc0



---
This SF.Net email sponsored by: ApacheCon 2003,
16-19 November in Las Vegas. Learn firsthand the latest
developments in Apache, PHP, Perl, XML, Java, MySQL,
WebDAV, and more! http://www.apachecon.com/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog


[alsa-cvslog] CVS: alsa-kernel/pci/emu10k1 emu10k1_main.c,1.25,1.26 emufx.c,1.43,1.44 emumixer.c,1.18,1.19 emupcm.c,1.22,1.23

2003-11-07 Thread Takashi Iwai
Update of /cvsroot/alsa/alsa-kernel/pci/emu10k1
In directory sc8-pr-cvs1:/tmp/cvs-serv13854/pci/emu10k1

Modified Files:
emu10k1_main.c emufx.c emumixer.c emupcm.c 
Log Message:
Peter Zubaj <[EMAIL PROTECTED]>:
 - disable routing from AC97 line out to front speakers.
 - AC97 ADC is used only for Mic playback and recording
 - Philips ADC is used for other analog playback and recording 
  (Analog Mix Playback Volume, Analog Mix Capture Volume)
 - removes unused AC97 controls (is phone used ???)

Takashi Iwai <[EMAIL PROTECTED]>:
 - removed the duplicated IEC958 control on Dell's board.


Index: emu10k1_main.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emu10k1_main.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- emu10k1_main.c  25 Jul 2003 10:39:38 -  1.25
+++ emu10k1_main.c  7 Nov 2003 17:52:01 -   1.26
@@ -269,6 +269,9 @@
 * This has to be done after init ALice3 I2SOut beyond 48KHz.
 * So, sequence is important. */
outl(inl(emu->port + A_IOCFG) | 0x0040, emu->port + A_IOCFG);
+   } else {
+   /* Disable routing from AC97 line out to Front speakers */
+   outl(inl(emu->port + A_IOCFG) | 0x0080, emu->port + A_IOCFG);
}
}


Index: emufx.c
===
RCS file: /cvsroot/alsa/alsa-kernel/pci/emu10k1/emufx.c,v
retrieving revision 1.43
retrieving revision 1.44
diff -u -r1.43 -r1.44
--- emufx.c 21 Oct 2003 17:40:14 -  1.43
+++ emufx.c 7 Nov 2003 17:52:01 -   1.44
@@ -1308,10 +1308,10 @@
snd_emu10k1_init_stereo_control(&controls[nctl++], "Music Playback Volume", 
gpr, 100);
gpr += 2;
 
-   /* Wave Capture */
+   /* Wave (PCM) Capture */
A_OP(icode, &ptr, iMAC0, A_GPR(capture+0), A_C_, A_GPR(gpr), 
A_FXBUS(FXBUS_PCM_LEFT));
A_OP(icode, &ptr, iMAC0, A_GPR(capture+1), A_C_, A_GPR(gpr+1), 
A_FXBUS(FXBUS_PCM_RIGHT));
-   snd_emu10k1_init_stereo_control(&controls[nctl++], "Wave Capture Volume", gpr, 
0);
+   snd_emu10k1_init_stereo_control(&controls[nctl++], "PCM Capture Volume", gpr, 
0);
gpr += 2;
 
/* Music Capture */
@@ -1326,17 +1326,20 @@
 #define A_ADD_VOLUME_IN(var,vol,input) \
 A_OP(icode, &ptr, iMAC0, A_GPR(var), A_GPR(var), A_GPR(vol), A_EXTIN(input))
 
-   /* AC'97 Playback Volume */
+   /* AC'97 Playback Volume - used only for mic */
A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_AC97_L);
A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_AC97_R);
-   snd_emu10k1_init_stereo_control(&controls[nctl++], "AC97 Playback Volume", 
gpr, 100);
+   snd_emu10k1_init_stereo_control(&controls[nctl++], "AMic Playback Volume", 
gpr, 0);
gpr += 2;
-   /* AC'97 Capture Volume */
+   /* AC'97 Capture Volume - used only for mic */
A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_AC97_L);
A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_AC97_R);
-   snd_emu10k1_init_stereo_control(&controls[nctl++], "AC97 Capture Volume", gpr, 
100);
+   snd_emu10k1_init_stereo_control(&controls[nctl++], "Mic Capture Volume", gpr, 
0);
gpr += 2;
 
+   /* mic capture buffer */
+   A_OP(icode, &ptr, iINTERP, A_EXTOUT(A_EXTOUT_MIC_CAP), 
A_EXTIN(A_EXTIN_AC97_L), 0xcd, A_EXTIN(A_EXTIN_AC97_R));
+
/* Audigy CD Playback Volume */
A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_SPDIF_CD_L);
A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_SPDIF_CD_R);
@@ -1370,15 +1373,15 @@
snd_emu10k1_init_stereo_control(&controls[nctl++], "Line2 Capture Volume", 
gpr, 0);
gpr += 2;
 
-   /* RCA SPDIF Playback Volume */
-   A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_RCA_SPDIF_L);
-   A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_RCA_SPDIF_R);
-   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++], "IEC958 Coaxial Capture 
Volume", gpr, 0);
+   /* Philips ADC Playback Volume */
+   A_ADD_VOLUME_IN(stereo_mix, gpr, A_EXTIN_ADC_L);
+   A_ADD_VOLUME_IN(stereo_mix+1, gpr+1, A_EXTIN_ADC_R);
+   snd_emu10k1_init_stereo_control(&controls[nctl++], "Analog Mix Playback 
Volume", gpr, 0);
+   gpr += 2;
+   /* Philips ADC Capture Volume */
+   A_ADD_VOLUME_IN(capture, gpr, A_EXTIN_ADC_L);
+   A_ADD_VOLUME_IN(capture+1, gpr+1, A_EXTIN_ADC_R);
+   snd_emu10k1_init_stereo_control(&controls[nctl++], "Analog Mix Capture 
Volume", gpr, 0);
gpr += 2;
 
/* Aux2 Playback Volume */

Index: emumixer.c

[alsa-cvslog] CVS: alsa-kernel/core/oss pcm_oss.c,1.56,1.57

2003-11-07 Thread Jaroslav Kysela
Update of /cvsroot/alsa/alsa-kernel/core/oss
In directory sc8-pr-cvs1:/tmp/cvs-serv26479

Modified Files:
pcm_oss.c 
Log Message:
Fixed semantics in snd_pcm_oss_bytes() function.


Index: pcm_oss.c
===
RCS file: /cvsroot/alsa/alsa-kernel/core/oss/pcm_oss.c,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- pcm_oss.c   30 Oct 2003 11:29:26 -  1.56
+++ pcm_oss.c   7 Nov 2003 09:47:18 -   1.57
@@ -124,11 +124,10 @@
 static long snd_pcm_oss_bytes(snd_pcm_substream_t *substream, long frames)
 {
snd_pcm_runtime_t *runtime = substream->runtime;
-   if (runtime->period_size == runtime->oss.period_bytes)
+   snd_pcm_uframes_t buffer_size = snd_pcm_lib_buffer_bytes(substream);
+   if (buffer_size == runtime->oss.buffer_bytes)
return frames;
-   if (runtime->period_size < runtime->oss.period_bytes)
-   return (frames * runtime->period_size) / runtime->oss.period_bytes;
-   return (frames * runtime->oss.period_bytes) / runtime->period_size;
+   return (runtime->oss.buffer_bytes * frames_to_bytes(runtime, frames)) / 
buffer_size;
 }
 
 static int snd_pcm_oss_format_from(int format)



---
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?   SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
___
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog