taglinefilesource code
D_S710drivers/cdrom/sbpcd.c} D_S[NR_SBPCD];
D_S913drivers/cdrom/sbpcd.cD_S[d].CD_changed=0xFF;
D_S1028drivers/cdrom/sbpcd.cD_S[d].status_bits=0;
D_S1029drivers/cdrom/sbpcd.cif (fam1_drive) D_S[d].status_bits=st|p_success;
D_S1032drivers/cdrom/sbpcd.cif (st&p_caddin_old) D_S[d].status_bits |= p_door_closed|p_caddy_in;
D_S1033drivers/cdrom/sbpcd.cif (st&p_spinning) D_S[d].status_bits |= p_spinning;
D_S1034drivers/cdrom/sbpcd.cif (st&p_check) D_S[d].status_bits |= p_check;
D_S1035drivers/cdrom/sbpcd.cif (st&p_success_old) D_S[d].status_bits |= p_success;
D_S1036drivers/cdrom/sbpcd.cif (st&p_busy_old) D_S[d].status_bits |= p_busy_new;
D_S1037drivers/cdrom/sbpcd.cif (st&p_disk_ok) D_S[d].status_bits |= p_disk_ok;
D_S1041drivers/cdrom/sbpcd.cD_S[d].status_bits |= p_success;
D_S1042drivers/cdrom/sbpcd.cif (st&p_caddin_old) D_S[d].status_bits |= p_disk_ok|p_caddy_in;
D_S1043drivers/cdrom/sbpcd.cif (st&p_spinning) D_S[d].status_bits |= p_spinning;
D_S1044drivers/cdrom/sbpcd.cif (st&p_check) D_S[d].status_bits |= p_check;
D_S1045drivers/cdrom/sbpcd.cif (st&p_busy_old) D_S[d].status_bits |= p_busy_new;
D_S1046drivers/cdrom/sbpcd.cif (st&p_lcs_door_closed) D_S[d].status_bits |= p_door_closed;
D_S1047drivers/cdrom/sbpcd.cif (st&p_lcs_door_locked) D_S[d].status_bits |= p_door_locked;
D_S1051drivers/cdrom/sbpcd.cD_S[d].status_bits |= p_success;
D_S1052drivers/cdrom/sbpcd.cif (st&p2_check) D_S[d].status_bits |= p1_check;
D_S1053drivers/cdrom/sbpcd.cif (st&p2_door_closed) D_S[d].status_bits |= p1_door_closed;
D_S1054drivers/cdrom/sbpcd.cif (st&p2_disk_in) D_S[d].status_bits |= p1_disk_in;
D_S1055drivers/cdrom/sbpcd.cif (st&p2_busy1) D_S[d].status_bits |= p1_busy;
D_S1056drivers/cdrom/sbpcd.cif (st&p2_busy2) D_S[d].status_bits |= p1_busy;
D_S1057drivers/cdrom/sbpcd.cif (st&p2_spinning) D_S[d].status_bits |= p1_spinning;
D_S1058drivers/cdrom/sbpcd.cif (st&p2_door_locked) D_S[d].status_bits |= p1_door_locked;
D_S1059drivers/cdrom/sbpcd.cif (st&p2_disk_ok) D_S[d].status_bits |= p1_disk_ok;
D_S1064drivers/cdrom/sbpcd.cD_S[d].status_bits |= p_success;
D_S1065drivers/cdrom/sbpcd.cif (st&p2_check) D_S[d].status_bits |= p1_check;
D_S1066drivers/cdrom/sbpcd.cif (st&p2_door_closed) D_S[d].status_bits |= p1_door_closed;
D_S1067drivers/cdrom/sbpcd.cif (st&p2_disk_in) D_S[d].status_bits |= p1_disk_in;
D_S1068drivers/cdrom/sbpcd.cif (st&p2_busy1) D_S[d].status_bits |= p1_busy;
D_S1069drivers/cdrom/sbpcd.cif (st&p2_busy2) D_S[d].status_bits |= p1_busy;
D_S1070drivers/cdrom/sbpcd.cif (st&p2_spinning) D_S[d].status_bits |= p1_spinning;
D_S1071drivers/cdrom/sbpcd.cif (st&p2_door_locked) D_S[d].status_bits |= p1_door_locked;
D_S1072drivers/cdrom/sbpcd.cif (st&p2_disk_ok) D_S[d].status_bits |= p1_disk_ok;
D_S1084drivers/cdrom/sbpcd.cD_S[d].n_bytes=1;
D_S1095drivers/cdrom/sbpcd.cD_S[d].status_bits=p1_door_closed|p1_disk_in|p1_spinning|p1_disk_ok;
D_S1096drivers/cdrom/sbpcd.celse if (D_S[d].error_state==6)
D_S1098drivers/cdrom/sbpcd.cD_S[d].status_bits=p1_door_closed|p1_disk_in;
D_S1099drivers/cdrom/sbpcd.celse if ((D_S[d].error_state!=2)||(D_S[d].b3!=0x3A)||(D_S[d].b4==0x00))
D_S1102drivers/cdrom/sbpcd.cD_S[d].status_bits=p1_door_closed;
D_S1103drivers/cdrom/sbpcd.cD_S[d].open_count=0;
D_S1105drivers/cdrom/sbpcd.celse if (D_S[d].b4==0x01)
D_S1108drivers/cdrom/sbpcd.cD_S[d].status_bits=0;
D_S1109drivers/cdrom/sbpcd.cD_S[d].open_count=0;
D_S1114drivers/cdrom/sbpcd.cD_S[d].status_bits=p1_door_closed;
D_S1115drivers/cdrom/sbpcd.cD_S[d].open_count=0;
D_S1117drivers/cdrom/sbpcd.creturn (D_S[d].status_bits);
D_S1147drivers/cdrom/sbpcd.cD_S[d].status_bits=0;
D_S1153drivers/cdrom/sbpcd.cmsg(DBG_STA,"status_bits=%02X, i=%02X\n",D_S[d].status_bits,i);
D_S1154drivers/cdrom/sbpcd.creturn (D_S[d].status_bits);
D_S1204drivers/cdrom/sbpcd.cD_S[d].error_byte=0;
D_S1209drivers/cdrom/sbpcd.cD_S[d].error_byte=infobuf[i];
D_S1210drivers/cdrom/sbpcd.cmsg(DBG_ERR,"cc_ReadError: infobuf[%d] is %d (%02X)\n",i,D_S[d].error_byte,D_S[d].error_byte);
D_S1225drivers/cdrom/sbpcd.cD_S[d].error_state=0;
D_S1226drivers/cdrom/sbpcd.cD_S[d].b3=0;
D_S1227drivers/cdrom/sbpcd.cD_S[d].b4=0;
D_S1228drivers/cdrom/sbpcd.cD_S[d].f_drv_error=0;
D_S1234drivers/cdrom/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S1339drivers/cdrom/sbpcd.cD_S[d].error_state=infobuf[2];
D_S1340drivers/cdrom/sbpcd.cD_S[d].b3=infobuf[3];
D_S1341drivers/cdrom/sbpcd.cD_S[d].b4=infobuf[4];
D_S1342drivers/cdrom/sbpcd.cif (D_S[d].f_drv_error)
D_S1344drivers/cdrom/sbpcd.cD_S[d].f_drv_error=0;
D_S1346drivers/cdrom/sbpcd.cD_S[d].error_state=2;
D_S1348drivers/cdrom/sbpcd.creturn (-D_S[d].error_state-400);
D_S1355drivers/cdrom/sbpcd.cD_S[d].f_drv_error=1;
D_S1357drivers/cdrom/sbpcd.cD_S[d].error_state=2;
D_S1389drivers/cdrom/sbpcd.cif (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to CDi_stat_loop.\n");
D_S1398drivers/cdrom/sbpcd.cif (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to cc_ReadStatus.\n");
D_S1404drivers/cdrom/sbpcd.cif (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to ResponseStatus.\n");
D_S1420drivers/cdrom/sbpcd.cif (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to cc_ReadError.\n");
D_S1422drivers/cdrom/sbpcd.cif (D_S[d].in_SpinUp) msg(DBG_SPI,"in_SpinUp: to cmd_out OK.\n");
D_S1476drivers/cdrom/sbpcd.cD_S[d].n_bytes=1;
D_S1488drivers/cdrom/sbpcd.cD_S[d].in_SpinUp = 1;
D_S1517drivers/cdrom/sbpcd.cD_S[d].in_SpinUp = 0;
D_S1578drivers/cdrom/sbpcd.cdrvcmd[1]=D_S[d].speed_byte;
D_S1579drivers/cdrom/sbpcd.cdrvcmd[2]=D_S[d].frmsiz>>8;
D_S1580drivers/cdrom/sbpcd.cdrvcmd[3]=D_S[d].frmsiz&0x0FF;
D_S1581drivers/cdrom/sbpcd.cdrvcmd[4]=D_S[d].f_XA; /* 1: XA */
D_S1582drivers/cdrom/sbpcd.cdrvcmd[5]=D_S[d].type_byte; /* 0, 1, 3 */
D_S1583drivers/cdrom/sbpcd.cdrvcmd[6]=D_S[d].mode_xb_6;
D_S1584drivers/cdrom/sbpcd.cdrvcmd[7]=D_S[d].mode_yb_7|D_S[d].volume_control;
D_S1585drivers/cdrom/sbpcd.cdrvcmd[8]=D_S[d].mode_xb_8;
D_S1586drivers/cdrom/sbpcd.cdrvcmd[9]=D_S[d].delay;
D_S1601drivers/cdrom/sbpcd.cD_S[d].speed_byte=0x02; /* 0x02: auto quad, 0x82: quad, 0x81: double, 0x80: single */
D_S1602drivers/cdrom/sbpcd.cD_S[d].frmsiz=make16(infobuf[2],infobuf[3]);
D_S1603drivers/cdrom/sbpcd.cD_S[d].f_XA=infobuf[4];
D_S1604drivers/cdrom/sbpcd.cif (D_S[d].f_XA==0) D_S[d].type_byte=0;
D_S1605drivers/cdrom/sbpcd.celse D_S[d].type_byte=1;
D_S1606drivers/cdrom/sbpcd.cD_S[d].mode_xb_6=infobuf[6];
D_S1607drivers/cdrom/sbpcd.cD_S[d].mode_yb_7=1;
D_S1608drivers/cdrom/sbpcd.cD_S[d].mode_xb_8=infobuf[8];
D_S1609drivers/cdrom/sbpcd.cD_S[d].delay=0; /* 0, 1, 2, 3 */
D_S1664drivers/cdrom/sbpcd.cD_S[d].diskstate_flags &= ~volume_bit;
D_S1666drivers/cdrom/sbpcd.cchannel0=D_S[d].vol_chan0;
D_S1667drivers/cdrom/sbpcd.cvolume0=D_S[d].vol_ctrl0;
D_S1668drivers/cdrom/sbpcd.cchannel1=control1=D_S[d].vol_chan1;
D_S1669drivers/cdrom/sbpcd.cvolume1=value1=D_S[d].vol_ctrl1;
D_S1674drivers/cdrom/sbpcd.cif (((D_S[d].drv_options&audio_mono)!=0)&&(D_S[d].drv_type>=drv_211))
D_S1743drivers/cdrom/sbpcd.cif (D_S[d].drv_type>=drv_300)
D_S1755drivers/cdrom/sbpcd.cif (D_S[d].drv_type<drv_211)
D_S1788drivers/cdrom/sbpcd.celse if (D_S[d].drv_type<drv_201) volume0=volume1=value0;
D_S1790drivers/cdrom/sbpcd.cif (D_S[d].drv_type>=drv_201)
D_S1795drivers/cdrom/sbpcd.cif (D_S[d].drv_type>=drv_211)
D_S1809drivers/cdrom/sbpcd.cD_S[d].volume_control=0;
D_S1810drivers/cdrom/sbpcd.cif (!volume0) D_S[d].volume_control|=0x10;
D_S1811drivers/cdrom/sbpcd.cif (!volume1) D_S[d].volume_control|=0x20;
D_S1821drivers/cdrom/sbpcd.cD_S[d].diskstate_flags |= volume_bit;
D_S1861drivers/cdrom/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S1878drivers/cdrom/sbpcd.cif (D_S[d].error_byte!=aud_12) return -501;
D_S1886drivers/cdrom/sbpcd.cif (!(D_S[d].drv_options&(speed_auto|speed_300|speed_150))) return (0);
D_S1888drivers/cdrom/sbpcd.cif (!(D_S[d].drv_options&speed_auto))
D_S1891drivers/cdrom/sbpcd.cif (!(D_S[d].drv_options&speed_300)) speed=0;
D_S1912drivers/cdrom/sbpcd.cD_S[d].CD_changed=1;
D_S1926drivers/cdrom/sbpcd.cif (D_S[d].audio_state==audio_playing) return (-EINVAL);
D_S2016drivers/cdrom/sbpcd.cif (pau_res==3)  return (cc_PlayAudio(D_S[d].pos_audio_start,D_S[d].pos_audio_end));
D_S2157drivers/cdrom/sbpcd.cD_S[d].diskstate_flags &= ~subq_bit;
D_S2206drivers/cdrom/sbpcd.cD_S[d].SubQ_ctl_adr=D_S[d].SubQ_trk=D_S[d].SubQ_pnt_idx=D_S[d].SubQ_whatisthis=0;
D_S2207drivers/cdrom/sbpcd.cD_S[d].SubQ_run_tot=D_S[d].SubQ_run_trk=0;
D_S2211drivers/cdrom/sbpcd.cif (famT_drive) D_S[d].SubQ_ctl_adr=infobuf[1];
D_S2212drivers/cdrom/sbpcd.celse D_S[d].SubQ_ctl_adr=swap_nibbles(infobuf[1]);
D_S2213drivers/cdrom/sbpcd.cD_S[d].SubQ_trk=byt2bcd(infobuf[2]);
D_S2214drivers/cdrom/sbpcd.cD_S[d].SubQ_pnt_idx=byt2bcd(infobuf[3]);
D_S2218drivers/cdrom/sbpcd.cD_S[d].SubQ_run_tot=make32(make16(0,infobuf[i]),make16(infobuf[i+1],infobuf[i+2])); /* msf-bin */
D_S2223drivers/cdrom/sbpcd.cD_S[d].SubQ_run_trk=make32(make16(0,infobuf[i]),make16(infobuf[i+1],infobuf[i+2])); /* msf-bin */
D_S2224drivers/cdrom/sbpcd.cD_S[d].SubQ_whatisthis=infobuf[i+3];
D_S2225drivers/cdrom/sbpcd.cD_S[d].diskstate_flags |= subq_bit;
D_S2235drivers/cdrom/sbpcd.cD_S[d].diskstate_flags &= ~frame_size_bit;
D_S2259drivers/cdrom/sbpcd.cD_S[d].sense_byte=0;
D_S2260drivers/cdrom/sbpcd.cif (fam1_drive) D_S[d].sense_byte=infobuf[i++];
D_S2263drivers/cdrom/sbpcd.cif (infobuf[4]==0x01) D_S[d].xa_byte=0x20;
D_S2264drivers/cdrom/sbpcd.celse D_S[d].xa_byte=0;
D_S2267drivers/cdrom/sbpcd.cD_S[d].frame_size=make16(infobuf[i],infobuf[i+1]);
D_S2273drivers/cdrom/sbpcd.cD_S[d].diskstate_flags |= frame_size_bit;
D_S2284drivers/cdrom/sbpcd.cD_S[d].diskstate_flags &= ~frame_size_bit;
D_S2286drivers/cdrom/sbpcd.cD_S[d].frame_size=framesize;
D_S2287drivers/cdrom/sbpcd.cif (framesize==CD_FRAMESIZE_RAW) D_S[d].sense_byte=0x82;
D_S2288drivers/cdrom/sbpcd.celse D_S[d].sense_byte=0x00;
D_S2291drivers/cdrom/sbpcd.cD_S[d].sense_byte, D_S[d].frame_size);
D_S2297drivers/cdrom/sbpcd.cdrvcmd[2]=D_S[d].sense_byte;
D_S2298drivers/cdrom/sbpcd.cdrvcmd[3]=(D_S[d].frame_size>>8)&0xFF;
D_S2299drivers/cdrom/sbpcd.cdrvcmd[4]=D_S[d].frame_size&0xFF;
D_S2306drivers/cdrom/sbpcd.cdrvcmd[2]=(D_S[d].frame_size>>8)&0xFF;
D_S2307drivers/cdrom/sbpcd.cdrvcmd[3]=D_S[d].frame_size&0xFF;
D_S2321drivers/cdrom/sbpcd.cD_S[d].diskstate_flags |= frame_size_bit;
D_S2335drivers/cdrom/sbpcd.cD_S[d].diskstate_flags &= ~volume_bit;
D_S2411drivers/cdrom/sbpcd.cif (D_S[d].drv_type>=drv_201)
D_S2413drivers/cdrom/sbpcd.cif (D_S[d].drv_type<drv_300)
D_S2418drivers/cdrom/sbpcd.cif (D_S[d].drv_type>=drv_211)
D_S2438drivers/cdrom/sbpcd.cD_S[d].volume_control=infobuf[7];
D_S2441drivers/cdrom/sbpcd.cif (D_S[d].volume_control&0x10) vol0=0;
D_S2443drivers/cdrom/sbpcd.cif (D_S[d].volume_control&0x20) vol1=0;
D_S2446drivers/cdrom/sbpcd.cD_S[d].vol_chan0=chan0;
D_S2447drivers/cdrom/sbpcd.cD_S[d].vol_ctrl0=vol0;
D_S2448drivers/cdrom/sbpcd.cD_S[d].vol_chan1=chan1;
D_S2449drivers/cdrom/sbpcd.cD_S[d].vol_ctrl1=vol1;
D_S2451drivers/cdrom/sbpcd.cD_S[d].vol_chan2=2;
D_S2452drivers/cdrom/sbpcd.cD_S[d].vol_ctrl2=0xFF;
D_S2453drivers/cdrom/sbpcd.cD_S[d].vol_chan3=3;
D_S2454drivers/cdrom/sbpcd.cD_S[d].vol_ctrl3=0xFF;
D_S2456drivers/cdrom/sbpcd.cD_S[d].diskstate_flags |= volume_bit;
D_S2467drivers/cdrom/sbpcd.cD_S[d].diskstate_flags &= ~cd_size_bit;
D_S2497drivers/cdrom/sbpcd.cif (fam1_drive) D_S[d].CDsize_frm=msf2blk(make32(make16(0,infobuf[0]),make16(infobuf[1],infobuf[2])))+CD_MSF_OFFSET;
D_S2498drivers/cdrom/sbpcd.celse if (fam0_drive) D_S[d].CDsize_frm=make32(make16(0,infobuf[0]),make16(infobuf[1],infobuf[2]));
D_S2500drivers/cdrom/sbpcd.celse if (fam2_drive) D_S[d].CDsize_frm=make32(make16(infobuf[0],infobuf[1]),make16(infobuf[2],infobuf[3]));
D_S2502drivers/cdrom/sbpcd.cD_S[d].diskstate_flags |= cd_size_bit;
D_S2503drivers/cdrom/sbpcd.cmsg(DBG_000,"cc_ReadCapacity: %d frames.\n", D_S[d].CDsize_frm);
D_S2511drivers/cdrom/sbpcd.cD_S[d].diskstate_flags &= ~toc_bit;
D_S2531drivers/cdrom/sbpcd.cD_S[d].f_multisession=0;
D_S2541drivers/cdrom/sbpcd.cD_S[d].f_multisession=0;
D_S2553drivers/cdrom/sbpcd.cD_S[d].xa_byte=infobuf[0];
D_S2556drivers/cdrom/sbpcd.cD_S[d].first_session=infobuf[1];
D_S2557drivers/cdrom/sbpcd.cD_S[d].last_session=infobuf[2];
D_S2558drivers/cdrom/sbpcd.cD_S[d].n_first_track=infobuf[3];
D_S2559drivers/cdrom/sbpcd.cD_S[d].n_last_track=infobuf[4];
D_S2560drivers/cdrom/sbpcd.cif (D_S[d].first_session!=D_S[d].last_session)
D_S2562drivers/cdrom/sbpcd.cD_S[d].f_multisession=1;
D_S2563drivers/cdrom/sbpcd.cD_S[d].lba_multi=msf2blk(make32(make16(0,infobuf[5]),make16(infobuf[6],infobuf[7])));
D_S2566drivers/cdrom/sbpcd.cif (D_S[d].first_session!=D_S[d].last_session)
D_S2568drivers/cdrom/sbpcd.cif (D_S[d].last_session<=20)
D_S2569drivers/cdrom/sbpcd.czwanzig=D_S[d].last_session+1;
D_S2571drivers/cdrom/sbpcd.cfor (count=D_S[d].first_session;count<zwanzig;count++)
D_S2581drivers/cdrom/sbpcd.cD_S[d].msf_multi_n[count]=make32(make16(0,infobuf[5]),make16(infobuf[6],infobuf[7]));
D_S2583drivers/cdrom/sbpcd.cD_S[d].diskstate_flags |= multisession_bit;
D_S2594drivers/cdrom/sbpcd.cD_S[d].size_msf=make32(make16(0,infobuf[2]),make16(infobuf[3],infobuf[4]));
D_S2595drivers/cdrom/sbpcd.cD_S[d].size_blk=msf2blk(D_S[d].size_msf);
D_S2596drivers/cdrom/sbpcd.cD_S[d].CDsize_frm=D_S[d].size_blk+1;
D_S2600drivers/cdrom/sbpcd.cD_S[d].size_msf=make32(make16(infobuf[8],infobuf[9]),make16(infobuf[10],infobuf[11]));
D_S2601drivers/cdrom/sbpcd.cD_S[d].size_blk=msf2blk(D_S[d].size_msf);
D_S2602drivers/cdrom/sbpcd.cD_S[d].CDsize_frm=D_S[d].size_blk+1;
D_S2603drivers/cdrom/sbpcd.cD_S[d].n_first_track=infobuf[2];
D_S2604drivers/cdrom/sbpcd.cD_S[d].n_last_track=infobuf[3];
D_S2608drivers/cdrom/sbpcd.cD_S[d].n_first_track=infobuf[1];
D_S2609drivers/cdrom/sbpcd.cD_S[d].n_last_track=infobuf[2];
D_S2610drivers/cdrom/sbpcd.cD_S[d].size_msf=make32(make16(0,infobuf[3]),make16(infobuf[4],infobuf[5]));
D_S2611drivers/cdrom/sbpcd.cD_S[d].size_blk=msf2blk(D_S[d].size_msf);
D_S2612drivers/cdrom/sbpcd.cif (famLV_drive) D_S[d].CDsize_frm=D_S[d].size_blk+1;
D_S2614drivers/cdrom/sbpcd.cD_S[d].diskstate_flags |= toc_bit;
D_S2616drivers/cdrom/sbpcd.cD_S[d].xa_byte,
D_S2617drivers/cdrom/sbpcd.cD_S[d].n_first_track,
D_S2618drivers/cdrom/sbpcd.cD_S[d].n_last_track,
D_S2619drivers/cdrom/sbpcd.cD_S[d].size_msf);
D_S2669drivers/cdrom/sbpcd.cD_S[d].TocEnt_nixbyte=infobuf[0];
D_S2674drivers/cdrom/sbpcd.cD_S[d].TocEnt_ctl_adr=swap_nibbles(infobuf[i++]);
D_S2677drivers/cdrom/sbpcd.cD_S[d].TocEnt_number=infobuf[i++];
D_S2678drivers/cdrom/sbpcd.cD_S[d].TocEnt_format=infobuf[i];
D_S2682drivers/cdrom/sbpcd.cD_S[d].TocEnt_number=num;
D_S2683drivers/cdrom/sbpcd.cD_S[d].TocEnt_format=0;
D_S2689drivers/cdrom/sbpcd.cD_S[d].TocEnt_address=make32(make16(0,infobuf[i]),
D_S2696drivers/cdrom/sbpcd.cD_S[d].TocEnt_nixbyte, D_S[d].TocEnt_ctl_adr,
D_S2697drivers/cdrom/sbpcd.cD_S[d].TocEnt_number, D_S[d].TocEnt_format,
D_S2698drivers/cdrom/sbpcd.cD_S[d].TocEnt_address);
D_S2729drivers/cdrom/sbpcd.cif (fam1_drive) D_S[d].UPC_buf[i]=swap_nibbles(*p++);
D_S2732drivers/cdrom/sbpcd.cD_S[d].UPC_buf[i]=((*p++)<<4)&0xFF;
D_S2733drivers/cdrom/sbpcd.cD_S[d].UPC_buf[i] |= *p++;
D_S2744drivers/cdrom/sbpcd.cD_S[d].UPC_buf[6] &= 0xF0;
D_S2762drivers/cdrom/sbpcd.cD_S[d].diskstate_flags &= ~upc_bit;
D_S2831drivers/cdrom/sbpcd.cD_S[d].UPC_ctl_adr=0;
D_S2837drivers/cdrom/sbpcd.cD_S[d].UPC_ctl_adr = (D_S[d].TocEnt_ctl_adr & 0xF0) | 0x02;
D_S2840drivers/cdrom/sbpcd.csprintf(&msgbuf[i*3], " %02X", D_S[d].UPC_buf[i]);
D_S2841drivers/cdrom/sbpcd.csprintf(&msgbuf[i*3], " (%02X)", D_S[d].UPC_ctl_adr);
D_S2844drivers/cdrom/sbpcd.cD_S[d].diskstate_flags |= upc_bit;
D_S2853drivers/cdrom/sbpcd.cD_S[d].f_multisession=0;
D_S2854drivers/cdrom/sbpcd.cD_S[d].lba_multi=0;
D_S2866drivers/cdrom/sbpcd.cD_S[d].f_multisession=1;
D_S2867drivers/cdrom/sbpcd.cD_S[d].lba_multi=msf2blk(make32(make16(0,infobuf[1]),
D_S2880drivers/cdrom/sbpcd.cD_S[d].lba_multi=msf2blk(make32(make16(0,infobuf[5]),
D_S2894drivers/cdrom/sbpcd.cD_S[d].first_session=infobuf[2];
D_S2895drivers/cdrom/sbpcd.cD_S[d].last_session=infobuf[3];
D_S2896drivers/cdrom/sbpcd.cD_S[d].track_of_last_session=infobuf[6];
D_S2897drivers/cdrom/sbpcd.cif (D_S[d].first_session!=D_S[d].last_session)
D_S2899drivers/cdrom/sbpcd.cD_S[d].f_multisession=1;
D_S2900drivers/cdrom/sbpcd.cD_S[d].lba_multi=msf2blk(make32(make16(0,infobuf[9]),make16(infobuf[10],infobuf[11])));
D_S2906drivers/cdrom/sbpcd.cmsg(DBG_MUL,"MultiSession Info:%s (%d)\n", msgbuf, D_S[d].lba_multi);
D_S2907drivers/cdrom/sbpcd.cif (D_S[d].lba_multi>200)
D_S2909drivers/cdrom/sbpcd.cD_S[d].f_multisession=1;
D_S2910drivers/cdrom/sbpcd.cmsg(DBG_MUL,"MultiSession base: %06X\n", D_S[d].lba_multi);
D_S2927drivers/cdrom/sbpcd.cif (D_S[d].audio_state!=audio_playing) return (-ENODATA);
D_S2938drivers/cdrom/sbpcd.cD_S[d].frame_size=CD_FRAMESIZE_SUB;
D_S3022drivers/cdrom/sbpcd.cCDo_command, type, D_S[d].drive_model, D_S[d].drv_id);
D_S3038drivers/cdrom/sbpcd.cmsg(DBG_INI,"check_version: id=%d, d=%d.\n", D_S[d].drv_id, d);
D_S3039drivers/cdrom/sbpcd.cD_S[d].drv_type=0;
D_S3074drivers/cdrom/sbpcd.cD_S[d].drive_model[0]='C';
D_S3075drivers/cdrom/sbpcd.cD_S[d].drive_model[1]='R';
D_S3076drivers/cdrom/sbpcd.cD_S[d].drive_model[2]='-';
D_S3077drivers/cdrom/sbpcd.cD_S[d].drive_model[3]='5';
D_S3078drivers/cdrom/sbpcd.cD_S[d].drive_model[4]=infobuf[i++];
D_S3079drivers/cdrom/sbpcd.cD_S[d].drive_model[5]=infobuf[i++];
D_S3080drivers/cdrom/sbpcd.cD_S[d].drive_model[6]=0;
D_S3081drivers/cdrom/sbpcd.cD_S[d].drv_type=drv_fam1;
D_S3083drivers/cdrom/sbpcd.cif (!D_S[d].drv_type)
D_S3088drivers/cdrom/sbpcd.cD_S[d].drive_model[0]='C';
D_S3089drivers/cdrom/sbpcd.cD_S[d].drive_model[1]='R';
D_S3090drivers/cdrom/sbpcd.cD_S[d].drive_model[2]='-';
D_S3091drivers/cdrom/sbpcd.cD_S[d].drive_model[3]='5';
D_S3092drivers/cdrom/sbpcd.cD_S[d].drive_model[4]='2';
D_S3093drivers/cdrom/sbpcd.cD_S[d].drive_model[5]='x';
D_S3094drivers/cdrom/sbpcd.cD_S[d].drive_model[6]=0;
D_S3095drivers/cdrom/sbpcd.cD_S[d].drv_type=drv_fam0;
D_S3098drivers/cdrom/sbpcd.cif (!D_S[d].drv_type)
D_S3104drivers/cdrom/sbpcd.cD_S[d].drive_model[j]=infobuf[j];
D_S3105drivers/cdrom/sbpcd.cD_S[d].drive_model[8]=0;
D_S3106drivers/cdrom/sbpcd.cD_S[d].drv_type=drv_famL;
D_S3109drivers/cdrom/sbpcd.cif (!D_S[d].drv_type)
D_S3115drivers/cdrom/sbpcd.cD_S[d].drive_model[j]=infobuf[j];
D_S3116drivers/cdrom/sbpcd.cD_S[d].drive_model[6]=0;
D_S3117drivers/cdrom/sbpcd.cD_S[d].drv_type=drv_famV;
D_S3121drivers/cdrom/sbpcd.cif (!D_S[d].drv_type)
D_S3138drivers/cdrom/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S3164drivers/cdrom/sbpcd.cD_S[d].drive_model[0]='C';
D_S3165drivers/cdrom/sbpcd.cD_S[d].drive_model[1]='D';
D_S3166drivers/cdrom/sbpcd.cD_S[d].drive_model[2]='2';
D_S3167drivers/cdrom/sbpcd.cD_S[d].drive_model[3]='0';
D_S3168drivers/cdrom/sbpcd.cD_S[d].drive_model[4]='0';
D_S3169drivers/cdrom/sbpcd.cD_S[d].drive_model[5]=infobuf[i++];
D_S3170drivers/cdrom/sbpcd.cD_S[d].drive_model[6]=infobuf[i++];
D_S3171drivers/cdrom/sbpcd.cD_S[d].drive_model[7]=0;
D_S3172drivers/cdrom/sbpcd.cD_S[d].drv_type=drv_fam2;
D_S3176drivers/cdrom/sbpcd.cif (!D_S[d].drv_type)
D_S3180drivers/cdrom/sbpcd.cfor (j=1;j<=((D_S[d].drv_id==0)?3:1);j++)
D_S3182drivers/cdrom/sbpcd.cfor (l=1;l<=((D_S[d].drv_id==0)?10:1);l++)
D_S3188drivers/cdrom/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S3194drivers/cdrom/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S3221drivers/cdrom/sbpcd.cD_S[d].drive_model[0]='C';
D_S3222drivers/cdrom/sbpcd.cD_S[d].drive_model[1]='D';
D_S3223drivers/cdrom/sbpcd.cD_S[d].drive_model[2]='-';
D_S3224drivers/cdrom/sbpcd.cD_S[d].drive_model[3]='5';
D_S3225drivers/cdrom/sbpcd.cD_S[d].drive_model[4]='5';
D_S3226drivers/cdrom/sbpcd.cD_S[d].drive_model[5]=0;
D_S3227drivers/cdrom/sbpcd.cD_S[d].drv_type=drv_famT;
D_S3231drivers/cdrom/sbpcd.cif (!D_S[d].drv_type)
D_S3233drivers/cdrom/sbpcd.cmsg(DBG_TEA,"no drive found at address %03X under ID %d.\n",CDo_command,D_S[d].drv_id);
D_S3236drivers/cdrom/sbpcd.cfor (j=0;j<4;j++) D_S[d].firmware_version[j]=infobuf[i+j];
D_S3243drivers/cdrom/sbpcd.cif (D_S[d].firmware_version[j]!=lcs_firm_e1[j]) break;
D_S3244drivers/cdrom/sbpcd.cif (j==4) D_S[d].drv_type=drv_e1;
D_S3247drivers/cdrom/sbpcd.cif (D_S[d].firmware_version[j]!=lcs_firm_f4[j]) break;
D_S3248drivers/cdrom/sbpcd.cif (j==4) D_S[d].drv_type=drv_f4;
D_S3250drivers/cdrom/sbpcd.cif (D_S[d].drv_type==drv_famL) ask_mail();
D_S3257drivers/cdrom/sbpcd.cD_S[d].firmware_version[0]=infobuf[7];
D_S3258drivers/cdrom/sbpcd.cD_S[d].firmware_version[1]=infobuf[8];
D_S3259drivers/cdrom/sbpcd.cD_S[d].firmware_version[2]=infobuf[10];
D_S3260drivers/cdrom/sbpcd.cD_S[d].firmware_version[3]=infobuf[11];
D_S3265drivers/cdrom/sbpcd.cD_S[d].firmware_version[0]='0';
D_S3266drivers/cdrom/sbpcd.cD_S[d].firmware_version[1]='.';
D_S3267drivers/cdrom/sbpcd.cD_S[d].firmware_version[2]='0'+(j>>4);
D_S3268drivers/cdrom/sbpcd.cD_S[d].firmware_version[3]='0'+(j&0x0f);
D_S3273drivers/cdrom/sbpcd.cj = (D_S[d].firmware_version[0] & 0x0F) * 100 +
D_S3274drivers/cdrom/sbpcd.c(D_S[d].firmware_version[2] & 0x0F) *10 +
D_S3275drivers/cdrom/sbpcd.c(D_S[d].firmware_version[3] & 0x0F);
D_S3278drivers/cdrom/sbpcd.cif (j<200) D_S[d].drv_type=drv_199;
D_S3279drivers/cdrom/sbpcd.celse if (j<201) D_S[d].drv_type=drv_200;
D_S3280drivers/cdrom/sbpcd.celse if (j<210) D_S[d].drv_type=drv_201;
D_S3281drivers/cdrom/sbpcd.celse if (j<211) D_S[d].drv_type=drv_210;
D_S3282drivers/cdrom/sbpcd.celse if (j<300) D_S[d].drv_type=drv_211;
D_S3283drivers/cdrom/sbpcd.celse if (j>=300) D_S[d].drv_type=drv_300;
D_S3287drivers/cdrom/sbpcd.cif (j<100) D_S[d].drv_type=drv_099;
D_S3290drivers/cdrom/sbpcd.cD_S[d].drv_type=drv_100;
D_S3296drivers/cdrom/sbpcd.cif (D_S[d].drive_model[5]=='F')
D_S3310drivers/cdrom/sbpcd.cif (j==100) D_S[d].drv_type=drv_at;
D_S3314drivers/cdrom/sbpcd.cmsg(DBG_LCS,"drive type %02X\n",D_S[d].drv_type);
D_S3322drivers/cdrom/sbpcd.cOUT(CDo_enable,D_S[d].drv_sel);
D_S3323drivers/cdrom/sbpcd.cmsg(DBG_DID,"drive %d (ID=%d) activated.\n", i, D_S[d].drv_id);
D_S3443drivers/cdrom/sbpcd.cD_S[ndrives].drv_id=j;
D_S3444drivers/cdrom/sbpcd.cif (sbpro_type==1) D_S[ndrives].drv_sel=(j&0x01)<<1|(j&0x02)>>1;
D_S3445drivers/cdrom/sbpcd.celse D_S[ndrives].drv_sel=j;
D_S3453drivers/cdrom/sbpcd.cD_S[d].drv_options=drv_pattern[j];
D_S3454drivers/cdrom/sbpcd.cif (fam0L_drive) D_S[d].drv_options&=~(speed_auto|speed_300|speed_150);
D_S3457drivers/cdrom/sbpcd.cD_S[d].drv_id,
D_S3458drivers/cdrom/sbpcd.cD_S[d].drive_model,
D_S3459drivers/cdrom/sbpcd.cD_S[d].firmware_version,
D_S3465drivers/cdrom/sbpcd.cfor (j=ndrives;j<NR_SBPCD;j++) D_S[j].drv_id=-1;
D_S3595drivers/cdrom/sbpcd.ci=msf2blk(D_S[d].pos_audio_end)-1;
D_S3605drivers/cdrom/sbpcd.cD_S[d].diskstate_flags &= ~toc_bit;
D_S3606drivers/cdrom/sbpcd.cD_S[d].ored_ctl_adr=0;
D_S3607drivers/cdrom/sbpcd.cfor (j=D_S[d].n_first_track;j<=D_S[d].n_last_track;j++)
D_S3615drivers/cdrom/sbpcd.cD_S[d].TocBuffer[j].nixbyte=D_S[d].TocEnt_nixbyte;
D_S3616drivers/cdrom/sbpcd.cD_S[d].TocBuffer[j].ctl_adr=D_S[d].TocEnt_ctl_adr;
D_S3617drivers/cdrom/sbpcd.cD_S[d].TocBuffer[j].number=D_S[d].TocEnt_number;
D_S3618drivers/cdrom/sbpcd.cD_S[d].TocBuffer[j].format=D_S[d].TocEnt_format;
D_S3619drivers/cdrom/sbpcd.cD_S[d].TocBuffer[j].address=D_S[d].TocEnt_address;
D_S3620drivers/cdrom/sbpcd.cD_S[d].ored_ctl_adr |= D_S[d].TocEnt_ctl_adr;
D_S3623drivers/cdrom/sbpcd.cD_S[d].TocBuffer[j].nixbyte=0;
D_S3624drivers/cdrom/sbpcd.cD_S[d].TocBuffer[j].ctl_adr=0;
D_S3625drivers/cdrom/sbpcd.cD_S[d].TocBuffer[j].number=CDROM_LEADOUT;
D_S3626drivers/cdrom/sbpcd.cD_S[d].TocBuffer[j].format=0;
D_S3627drivers/cdrom/sbpcd.cD_S[d].TocBuffer[j].address=D_S[d].size_msf;
D_S3629drivers/cdrom/sbpcd.cD_S[d].diskstate_flags |= toc_bit;
D_S3637drivers/cdrom/sbpcd.cD_S[d].mode=READ_M1;
D_S3682drivers/cdrom/sbpcd.cif (D_S[d].f_multisession) D_S[d].sbp_bufsiz=1;  /* possibly a weird PhotoCD */
D_S3683drivers/cdrom/sbpcd.celse D_S[d].sbp_bufsiz=SBP_BUFFER_FRAMES;
D_S3684drivers/cdrom/sbpcd.ci=cc_ReadTocEntry(D_S[d].n_first_track);
D_S3692drivers/cdrom/sbpcd.cif ((fam0L_drive) && (D_S[d].xa_byte==0x20))
D_S3720drivers/cdrom/sbpcd.cif (D_S[d].CD_changed==0xFF)
D_S3722drivers/cdrom/sbpcd.cD_S[d].diskstate_flags=0;
D_S3723drivers/cdrom/sbpcd.cD_S[d].audio_state=0;
D_S3734drivers/cdrom/sbpcd.cD_S[d].CD_changed=1;
D_S3743drivers/cdrom/sbpcd.cD_S[d].diskstate_flags=0;
D_S3744drivers/cdrom/sbpcd.cD_S[d].audio_state=0;
D_S3752drivers/cdrom/sbpcd.cif (D_S[d].audio_state!=audio_pausing)
D_S3760drivers/cdrom/sbpcd.cif (D_S[d].audio_state==audio_playing) seek_pos_audio_end();
D_S3761drivers/cdrom/sbpcd.cD_S[d].audio_state=0;
D_S3768drivers/cdrom/sbpcd.cD_S[d].diskstate_flags=0;
D_S3769drivers/cdrom/sbpcd.cD_S[d].audio_state=0;
D_S3840drivers/cdrom/sbpcd.cif ((i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1))
D_S3872drivers/cdrom/sbpcd.cswitch (D_S[d].audio_state)
D_S3881drivers/cdrom/sbpcd.cD_S[d].pos_audio_start=D_S[d].SubQ_run_tot;
D_S3882drivers/cdrom/sbpcd.cD_S[d].audio_state=audio_pausing;
D_S3885drivers/cdrom/sbpcd.ci=cc_Seek(D_S[d].pos_audio_start,1);
D_S3897drivers/cdrom/sbpcd.cif (D_S[d].audio_state!=audio_pausing) return -EINVAL;
D_S3899drivers/cdrom/sbpcd.ci=cc_PlayAudio(D_S[d].pos_audio_start,
D_S3900drivers/cdrom/sbpcd.cD_S[d].pos_audio_end);
D_S3903drivers/cdrom/sbpcd.cD_S[d].audio_state=audio_playing;
D_S3908drivers/cdrom/sbpcd.cif (D_S[d].audio_state==audio_playing)
D_S3914drivers/cdrom/sbpcd.cD_S[d].pos_audio_start=D_S[d].SubQ_run_tot;
D_S3915drivers/cdrom/sbpcd.ci=cc_Seek(D_S[d].pos_audio_start,1);
D_S3921drivers/cdrom/sbpcd.cD_S[d].pos_audio_start = (msf.cdmsf_min0<<16) |
D_S3924drivers/cdrom/sbpcd.cD_S[d].pos_audio_end = (msf.cdmsf_min1<<16) |
D_S3928drivers/cdrom/sbpcd.cD_S[d].pos_audio_start,D_S[d].pos_audio_end);
D_S3929drivers/cdrom/sbpcd.ci=cc_PlayAudio(D_S[d].pos_audio_start,D_S[d].pos_audio_end);
D_S3934drivers/cdrom/sbpcd.cD_S[d].audio_state=audio_playing;
D_S3939drivers/cdrom/sbpcd.cif (D_S[d].audio_state==audio_playing)
D_S3954drivers/cdrom/sbpcd.cif (ti.cdti_trk0<D_S[d].n_first_track) return (-EINVAL);
D_S3955drivers/cdrom/sbpcd.cif (ti.cdti_trk0>D_S[d].n_last_track) return (-EINVAL);
D_S3957drivers/cdrom/sbpcd.cif (ti.cdti_trk1>D_S[d].n_last_track) ti.cdti_trk1=D_S[d].n_last_track;
D_S3958drivers/cdrom/sbpcd.cD_S[d].pos_audio_start=D_S[d].TocBuffer[ti.cdti_trk0].address;
D_S3959drivers/cdrom/sbpcd.cD_S[d].pos_audio_end=D_S[d].TocBuffer[ti.cdti_trk1+1].address;
D_S3960drivers/cdrom/sbpcd.ci=cc_PlayAudio(D_S[d].pos_audio_start,D_S[d].pos_audio_end);
D_S3964drivers/cdrom/sbpcd.cD_S[d].audio_state=audio_playing;
D_S3969drivers/cdrom/sbpcd.ctochdr.cdth_trk0=D_S[d].n_first_track;
D_S3970drivers/cdrom/sbpcd.ctochdr.cdth_trk1=D_S[d].n_last_track;
D_S3982drivers/cdrom/sbpcd.cif (i==CDROM_LEADOUT) i=D_S[d].n_last_track+1;
D_S3983drivers/cdrom/sbpcd.celse if (i<D_S[d].n_first_track||i>D_S[d].n_last_track) return (-EINVAL);
D_S3984drivers/cdrom/sbpcd.ctocentry.cdte_adr=D_S[d].TocBuffer[i].ctl_adr&0x0F;
D_S3985drivers/cdrom/sbpcd.ctocentry.cdte_ctrl=(D_S[d].TocBuffer[i].ctl_adr>>4)&0x0F;
D_S3986drivers/cdrom/sbpcd.ctocentry.cdte_datamode=D_S[d].TocBuffer[i].format;
D_S3989drivers/cdrom/sbpcd.ctocentry.cdte_addr.msf.minute=(D_S[d].TocBuffer[i].address>>16)&0x00FF;
D_S3990drivers/cdrom/sbpcd.ctocentry.cdte_addr.msf.second=(D_S[d].TocBuffer[i].address>>8)&0x00FF;
D_S3991drivers/cdrom/sbpcd.ctocentry.cdte_addr.msf.frame=D_S[d].TocBuffer[i].address&0x00FF;
D_S3994drivers/cdrom/sbpcd.ctocentry.cdte_addr.lba=msf2blk(D_S[d].TocBuffer[i].address);
D_S4004drivers/cdrom/sbpcd.cD_S[d].audio_state=0;
D_S4010drivers/cdrom/sbpcd.cD_S[d].audio_state=0;
D_S4016drivers/cdrom/sbpcd.cD_S[d].audio_state=0;
D_S4022drivers/cdrom/sbpcd.cif (D_S[d].open_count>1) return (-EBUSY);
D_S4024drivers/cdrom/sbpcd.cD_S[d].open_count=-9; /* to get it locked next time again */
D_S4029drivers/cdrom/sbpcd.cD_S[d].CD_changed=0xFF;
D_S4030drivers/cdrom/sbpcd.cD_S[d].diskstate_flags=0;
D_S4031drivers/cdrom/sbpcd.cD_S[d].audio_state=0;
D_S4037drivers/cdrom/sbpcd.cD_S[d].f_eject=arg;
D_S4045drivers/cdrom/sbpcd.cD_S[d].vol_chan0=0;
D_S4046drivers/cdrom/sbpcd.cD_S[d].vol_ctrl0=volctrl.channel0;
D_S4047drivers/cdrom/sbpcd.cD_S[d].vol_chan1=1;
D_S4048drivers/cdrom/sbpcd.cD_S[d].vol_ctrl1=volctrl.channel1;
D_S4058drivers/cdrom/sbpcd.cvolctrl.channel0=D_S[d].vol_ctrl0;
D_S4059drivers/cdrom/sbpcd.cvolctrl.channel1=D_S[d].vol_ctrl1;
D_S4075drivers/cdrom/sbpcd.cswitch (D_S[d].audio_state)
D_S4087drivers/cdrom/sbpcd.cSC.cdsc_adr=D_S[d].SubQ_ctl_adr;
D_S4088drivers/cdrom/sbpcd.cSC.cdsc_ctrl=D_S[d].SubQ_ctl_adr>>4;
D_S4089drivers/cdrom/sbpcd.cSC.cdsc_trk=bcd2bin(D_S[d].SubQ_trk);
D_S4090drivers/cdrom/sbpcd.cSC.cdsc_ind=bcd2bin(D_S[d].SubQ_pnt_idx);
D_S4093drivers/cdrom/sbpcd.cSC.cdsc_absaddr.lba=msf2blk(D_S[d].SubQ_run_tot);
D_S4094drivers/cdrom/sbpcd.cSC.cdsc_reladdr.lba=msf2blk(D_S[d].SubQ_run_trk);
D_S4098drivers/cdrom/sbpcd.cSC.cdsc_absaddr.msf.minute=(D_S[d].SubQ_run_tot>>16)&0x00FF;
D_S4099drivers/cdrom/sbpcd.cSC.cdsc_absaddr.msf.second=(D_S[d].SubQ_run_tot>>8)&0x00FF;
D_S4100drivers/cdrom/sbpcd.cSC.cdsc_absaddr.msf.frame=D_S[d].SubQ_run_tot&0x00FF;
D_S4101drivers/cdrom/sbpcd.cSC.cdsc_reladdr.msf.minute=(D_S[d].SubQ_run_trk>>16)&0x00FF;
D_S4102drivers/cdrom/sbpcd.cSC.cdsc_reladdr.msf.second=(D_S[d].SubQ_run_trk>>8)&0x00FF;
D_S4103drivers/cdrom/sbpcd.cSC.cdsc_reladdr.msf.frame=D_S[d].SubQ_run_trk&0x00FF;
D_S4117drivers/cdrom/sbpcd.cD_S[d].mode=READ_M1;
D_S4124drivers/cdrom/sbpcd.cD_S[d].mode=READ_M2;
D_S4129drivers/cdrom/sbpcd.cif (D_S[d].sbp_audsiz>0) vfree(D_S[d].aud_buf);
D_S4130drivers/cdrom/sbpcd.cD_S[d].aud_buf=NULL;
D_S4131drivers/cdrom/sbpcd.cD_S[d].sbp_audsiz=arg;
D_S4132drivers/cdrom/sbpcd.cif (D_S[d].sbp_audsiz>0)
D_S4134drivers/cdrom/sbpcd.cD_S[d].aud_buf=(u_char *) vmalloc(D_S[d].sbp_audsiz*CD_FRAMESIZE_RAW);
D_S4135drivers/cdrom/sbpcd.cif (D_S[d].aud_buf==NULL)
D_S4137drivers/cdrom/sbpcd.cmsg(DBG_INF,"audio buffer (%d frames) not available.\n",D_S[d].sbp_audsiz);
D_S4138drivers/cdrom/sbpcd.cD_S[d].sbp_audsiz=0;
D_S4140drivers/cdrom/sbpcd.celse msg(DBG_INF,"audio buffer size: %d frames.\n",D_S[d].sbp_audsiz);
D_S4142drivers/cdrom/sbpcd.creturn (D_S[d].sbp_audsiz);
D_S4161drivers/cdrom/sbpcd.cif (D_S[d].aud_buf==NULL) return (-EINVAL);
D_S4165drivers/cdrom/sbpcd.cif (read_audio.nframes>D_S[d].sbp_audsiz) return (-EINVAL);
D_S4188drivers/cdrom/sbpcd.cD_S[d].mode=READ_AU;
D_S4278drivers/cdrom/sbpcd.cp = D_S[d].aud_buf;
D_S4326drivers/cdrom/sbpcd.cD_S[d].status_bits);
D_S4338drivers/cdrom/sbpcd.c(u_char *) D_S[d].aud_buf,
D_S4345drivers/cdrom/sbpcd.cD_S[d].mode=READ_M1;
D_S4362drivers/cdrom/sbpcd.clba2msf(D_S[d].lba_multi,&ms_info.addr.msf.minute);
D_S4364drivers/cdrom/sbpcd.cms_info.addr.lba=D_S[d].lba_multi;
D_S4366drivers/cdrom/sbpcd.cif (D_S[d].f_multisession) ms_info.xa_flag=1; /* valid redirection address */
D_S4396drivers/cdrom/sbpcd.c(CURRENT->sector/4 >= D_S[d].sbp_first_frame) &&
D_S4397drivers/cdrom/sbpcd.c(CURRENT->sector/4 <= D_S[d].sbp_last_frame) )
D_S4399drivers/cdrom/sbpcd.coffs = (CURRENT->sector - D_S[d].sbp_first_frame * 4) * 512;
D_S4400drivers/cdrom/sbpcd.cmemcpy(CURRENT->buffer, D_S[d].sbp_buf + offs, 512);
D_S4430drivers/cdrom/sbpcd.cif ( (i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1))
D_S4439drivers/cdrom/sbpcd.cif (D_S[i].audio_state==audio_playing) goto err_done;
D_S4508drivers/cdrom/sbpcd.cD_S[d].sbp_first_frame=D_S[d].sbp_last_frame=-1;      /* purge buffer */
D_S4509drivers/cdrom/sbpcd.cD_S[d].sbp_current = 0;
D_S4511drivers/cdrom/sbpcd.cif (block+D_S[d].sbp_bufsiz <= D_S[d].CDsize_frm)
D_S4512drivers/cdrom/sbpcd.cD_S[d].sbp_read_frames = D_S[d].sbp_bufsiz;
D_S4515drivers/cdrom/sbpcd.cD_S[d].sbp_read_frames=D_S[d].CDsize_frm-block;
D_S4517drivers/cdrom/sbpcd.cif (D_S[d].sbp_read_frames < 1)
D_S4520drivers/cdrom/sbpcd.cblock, D_S[d].CDsize_frm);
D_S4521drivers/cdrom/sbpcd.cD_S[d].sbp_read_frames=1;
D_S4534drivers/cdrom/sbpcd.cdrvcmd[4]=D_S[d].sbp_read_frames>>8;
D_S4535drivers/cdrom/sbpcd.cdrvcmd[5]=D_S[d].sbp_read_frames&0xff;
D_S4541drivers/cdrom/sbpcd.cif (D_S[d].xa_byte==0x20)
D_S4548drivers/cdrom/sbpcd.cdrvcmd[4]=(D_S[d].sbp_read_frames>>8)&0x0ff;
D_S4549drivers/cdrom/sbpcd.cdrvcmd[5]=D_S[d].sbp_read_frames&0x0ff;
D_S4554drivers/cdrom/sbpcd.cif (D_S[d].drv_type>=drv_201)
D_S4567drivers/cdrom/sbpcd.cdrvcmd[4]=(D_S[d].sbp_read_frames>>8)&0x0ff;
D_S4568drivers/cdrom/sbpcd.cdrvcmd[5]=D_S[d].sbp_read_frames&0x0ff;
D_S4569drivers/cdrom/sbpcd.cdrvcmd[6]=(D_S[d].drv_type<drv_201)?0:2; /* flag "lba or msf-bcd format" */
D_S4576drivers/cdrom/sbpcd.cdrvcmd[5]=(D_S[d].sbp_read_frames>>8)&0x0ff;
D_S4577drivers/cdrom/sbpcd.cdrvcmd[6]=D_S[d].sbp_read_frames&0x0ff;
D_S4583drivers/cdrom/sbpcd.cdrvcmd[4]=(D_S[d].sbp_read_frames>>8)&0x0ff;
D_S4584drivers/cdrom/sbpcd.cdrvcmd[5]=D_S[d].sbp_read_frames&0x0ff;
D_S4594drivers/cdrom/sbpcd.cdrvcmd[7]=(D_S[d].sbp_read_frames>>8)&0x0ff;
D_S4595drivers/cdrom/sbpcd.cdrvcmd[8]=D_S[d].sbp_read_frames&0x0ff;
D_S4629drivers/cdrom/sbpcd.cif (D_S[d].f_multisession) max_latency=9*HZ;
D_S4633drivers/cdrom/sbpcd.cfor (frame=0;frame<D_S[d].sbp_read_frames&&!error_flag; frame++)
D_S4643drivers/cdrom/sbpcd.cif (D_S[d].f_multisession) try=maxtim_data*4;
D_S4688drivers/cdrom/sbpcd.cif ((D_S[d].ored_ctl_adr&0x40)==0)
D_S4697drivers/cdrom/sbpcd.cp = D_S[d].sbp_buf + frame *  CD_FRAMESIZE;
D_S4707drivers/cdrom/sbpcd.cD_S[d].sbp_current++;
D_S4779drivers/cdrom/sbpcd.cD_S[d].error_state=infobuf[2];
D_S4780drivers/cdrom/sbpcd.cD_S[d].b3=infobuf[3];
D_S4781drivers/cdrom/sbpcd.cD_S[d].b4=infobuf[4];
D_S4851drivers/cdrom/sbpcd.cmsg(DBG_INF,"bad cc_ReadStatus after read: %02X\n", D_S[d].status_bits);
D_S4865drivers/cdrom/sbpcd.cD_S[d].sbp_first_frame=D_S[d].sbp_last_frame=-1;      /* purge buffer */
D_S4866drivers/cdrom/sbpcd.cD_S[d].sbp_current = 0;
D_S4871drivers/cdrom/sbpcd.cD_S[d].sbp_first_frame = CURRENT -> sector / 4;
D_S4872drivers/cdrom/sbpcd.cD_S[d].sbp_last_frame = D_S[d].sbp_first_frame + D_S[d].sbp_read_frames - 1;
D_S4886drivers/cdrom/sbpcd.cif ((i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1))
D_S4929drivers/cdrom/sbpcd.cif (famT_drive)  msg(DBG_TEA,"sbpcd_open: status %02X\n", D_S[d].status_bits);
D_S4933drivers/cdrom/sbpcd.cD_S[d].open_count=0;
D_S4948drivers/cdrom/sbpcd.cD_S[d].open_count,D_S[d].open_count+1);
D_S4949drivers/cdrom/sbpcd.cif (++D_S[d].open_count<=1)
D_S4952drivers/cdrom/sbpcd.cD_S[d].open_count=1;
D_S4956drivers/cdrom/sbpcd.cif ((D_S[d].ored_ctl_adr&0x40)==0)
D_S4971drivers/cdrom/sbpcd.cif ((i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1))
D_S4978drivers/cdrom/sbpcd.cD_S[d].sbp_first_frame=D_S[d].sbp_last_frame=-1;
D_S4987drivers/cdrom/sbpcd.cD_S[d].open_count,D_S[d].open_count-1);
D_S4988drivers/cdrom/sbpcd.cif (D_S[d].open_count>-2) /* CDROMEJECT may have been done */
D_S4990drivers/cdrom/sbpcd.cif (--D_S[d].open_count<=0) 
D_S4993drivers/cdrom/sbpcd.cif (D_S[d].audio_state!=audio_playing)
D_S4994drivers/cdrom/sbpcd.cif (D_S[d].f_eject) cc_SpinDown();
D_S4995drivers/cdrom/sbpcd.cD_S[d].diskstate_flags &= ~cd_size_bit;
D_S4996drivers/cdrom/sbpcd.cD_S[d].open_count=0; 
D_S5246drivers/cdrom/sbpcd.cif (D_S[j].drv_id==-1) continue;
D_S5252drivers/cdrom/sbpcd.cD_S[d].sbp_first_frame = -1;  /* First frame in buffer */
D_S5253drivers/cdrom/sbpcd.cD_S[d].sbp_last_frame = -1;   /* Last frame in buffer  */
D_S5254drivers/cdrom/sbpcd.cD_S[d].sbp_read_frames = 0;   /* Number of frames being read to buffer */
D_S5255drivers/cdrom/sbpcd.cD_S[d].sbp_current = 0;       /* Frame being currently read */
D_S5256drivers/cdrom/sbpcd.cD_S[d].CD_changed=1;
D_S5257drivers/cdrom/sbpcd.cD_S[d].frame_size=CD_FRAMESIZE;
D_S5258drivers/cdrom/sbpcd.cD_S[d].f_eject=0;
D_S5260drivers/cdrom/sbpcd.cif (!fam0_drive) D_S[d].f_eject=1;
D_S5278drivers/cdrom/sbpcd.cD_S[d].error_byte);
D_S5279drivers/cdrom/sbpcd.cif (D_S[d].error_byte==aud_12)
D_S5288drivers/cdrom/sbpcd.cD_S[d].error_byte);
D_S5295drivers/cdrom/sbpcd.cif (i>=0) D_S[d].CD_changed=1;
D_S5323drivers/cdrom/sbpcd.cif (D_S[j].drv_id==-1) continue;
D_S5328drivers/cdrom/sbpcd.cD_S[j].aud_buf=NULL;
D_S5329drivers/cdrom/sbpcd.cD_S[j].sbp_audsiz=0;
D_S5330drivers/cdrom/sbpcd.cD_S[j].sbp_bufsiz=SBP_BUFFER_FRAMES;
D_S5331drivers/cdrom/sbpcd.cif (D_S[j].drv_type&drv_fam1)
D_S5332drivers/cdrom/sbpcd.cif (READ_AUDIO>0) D_S[j].sbp_audsiz=READ_AUDIO;
D_S5333drivers/cdrom/sbpcd.cD_S[j].sbp_buf=(u_char *) vmalloc(D_S[j].sbp_bufsiz*CD_FRAMESIZE);
D_S5334drivers/cdrom/sbpcd.cif (D_S[j].sbp_buf==NULL)
D_S5336drivers/cdrom/sbpcd.cmsg(DBG_INF,"data buffer (%d frames) not available.\n",D_S[j].sbp_bufsiz);
D_S5342drivers/cdrom/sbpcd.cif (D_S[j].sbp_audsiz>0)
D_S5344drivers/cdrom/sbpcd.cD_S[j].aud_buf=(u_char *) vmalloc(D_S[j].sbp_audsiz*CD_FRAMESIZE_RAW);
D_S5345drivers/cdrom/sbpcd.cif (D_S[j].aud_buf==NULL) msg(DBG_INF,"audio buffer (%d frames) not available.\n",D_S[j].sbp_audsiz);
D_S5346drivers/cdrom/sbpcd.celse msg(DBG_INF,"audio buffer size: %d frames.\n",D_S[j].sbp_audsiz);
D_S5386drivers/cdrom/sbpcd.cif (D_S[j].drv_id==-1) continue;
D_S5387drivers/cdrom/sbpcd.cvfree(D_S[j].sbp_buf);
D_S5388drivers/cdrom/sbpcd.cif (D_S[j].sbp_audsiz>0) vfree(D_S[j].aud_buf);
D_S5407drivers/cdrom/sbpcd.cif ( (i<0) || (i>=NR_SBPCD) || (D_S[i].drv_id==-1) )
D_S5417drivers/cdrom/sbpcd.cmsg(DBG_CHK,"media_check: %02X\n",D_S[d].status_bits);
D_S5423drivers/cdrom/sbpcd.cif (D_S[d].CD_changed==0xFF) msg(DBG_CHK,"media_check: \"changed\" assumed.\n");
D_S5428drivers/cdrom/sbpcd.cD_S[d].CD_changed=0xFF;
D_S5433drivers/cdrom/sbpcd.cD_S[d].open_count=0;
D_S5434drivers/cdrom/sbpcd.cD_S[d].CD_changed=0xFF;
D_S5439drivers/cdrom/sbpcd.cif (D_S[d].CD_changed==0xFF)
D_S5441drivers/cdrom/sbpcd.cD_S[d].CD_changed=1;
D_S225include/linux/sbpcd.h#define upc_valid    (D_S[d].diskstate_flags&upc_bit)
D_S226include/linux/sbpcd.h#define volume_valid    (D_S[d].diskstate_flags&volume_bit)
D_S227include/linux/sbpcd.h#define toc_valid    (D_S[d].diskstate_flags&toc_bit)
D_S228include/linux/sbpcd.h#define cd_size_valid    (D_S[d].diskstate_flags&cd_size_bit)
D_S229include/linux/sbpcd.h#define subq_valid    (D_S[d].diskstate_flags&subq_bit)
D_S230include/linux/sbpcd.h#define frame_size_valid  (D_S[d].diskstate_flags&frame_size_bit)
D_S307include/linux/sbpcd.h#define st_door_closed  (D_S[d].status_bits&p_door_closed)
D_S308include/linux/sbpcd.h#define st_caddy_in  (D_S[d].status_bits&p_caddy_in)
D_S309include/linux/sbpcd.h#define st_spinning  (D_S[d].status_bits&p_spinning)
D_S310include/linux/sbpcd.h#define st_check  (D_S[d].status_bits&p_check)
D_S311include/linux/sbpcd.h#define st_busy    (D_S[d].status_bits&p_busy_new)
D_S312include/linux/sbpcd.h#define st_door_locked  (D_S[d].status_bits&p_door_locked)
D_S313include/linux/sbpcd.h#define st_diskok  (D_S[d].status_bits&p_disk_ok)
D_S355include/linux/sbpcd.h#define fam0_drive  (D_S[d].drv_type&drv_fam0)
D_S356include/linux/sbpcd.h#define famL_drive  (D_S[d].drv_type&drv_famL)
D_S357include/linux/sbpcd.h#define famV_drive  (D_S[d].drv_type&drv_famV)
D_S358include/linux/sbpcd.h#define fam1_drive  (D_S[d].drv_type&drv_fam1)
D_S359include/linux/sbpcd.h#define fam2_drive  (D_S[d].drv_type&drv_fam2)
D_S360include/linux/sbpcd.h#define famT_drive  (D_S[d].drv_type&drv_famT)
D_S361include/linux/sbpcd.h#define fam0L_drive  (D_S[d].drv_type&(drv_fam0|drv_famL))
D_S362include/linux/sbpcd.h#define fam0V_drive  (D_S[d].drv_type&(drv_fam0|drv_famV))
D_S363include/linux/sbpcd.h#define famLV_drive  (D_S[d].drv_type&(drv_famL|drv_famV))
D_S364include/linux/sbpcd.h#define fam0LV_drive  (D_S[d].drv_type&(drv_fam0|drv_famL|drv_famV))
D_S365include/linux/sbpcd.h#define fam1L_drive  (D_S[d].drv_type&(drv_fam1|drv_famL))
D_S366include/linux/sbpcd.h#define fam1V_drive  (D_S[d].drv_type&(drv_fam1|drv_famV))
D_S367include/linux/sbpcd.h#define fam1LV_drive  (D_S[d].drv_type&(drv_fam1|drv_famL|drv_famV))
D_S368include/linux/sbpcd.h#define fam01_drive  (D_S[d].drv_type&(drv_fam0|drv_fam1))
D_S369include/linux/sbpcd.h#define fam12_drive  (D_S[d].drv_type&(drv_fam1|drv_fam2))
D_S370include/linux/sbpcd.h#define fam2T_drive  (D_S[d].drv_type&(drv_fam2|drv_famT))