
/*
 * hifi_cd.h:
 *
 * Copyright (c) 2000 James McKenzie <james@fishsoup.dhs.org>.
 *
 * $Id: hifi_cd.h,v 1.2 2000/09/24 01:46:07 root Exp $
 *
 * $Log: hifi_cd.h,v $
 * Revision 1.2  2000/09/24 01:46:07  root
 * #
 *
 * Revision 1.1  2000/02/20 03:18:15  root
 * #
 *
 * Revision 1.3  2000/02/20 03:10:18  root
 * #
 *
 * Revision 1.2  2000/02/20 03:09:30  root
 * #
 *
 *
 */

#ifndef __HIFI_CD_
#define __HIFI_CD_
#define HIFI_ST_CD_STATE	HIFI_ST(HIFI_CLASS_CD,1)
#define HIFI_ST_CD_TKSTATE	HIFI_ST(HIFI_CLASS_CD,2)



#define HIFI_CMD_CD_PLAY	HIFI_CMD(HIFI_CLASS_CD,1)


typedef struct
{
#define HIFI_CD_DUDTRACK	0xff
/*All binary not BCD */
  Byte track;                   /*0xff for unknown,stoped,off etc.. */
  Byte index;
  Byte min;
  Byte sec;
}
HIFI_PACKED Hifi_CD_Address;

typedef struct
{
/*All binary not BCD */
  Byte min;
  Byte sec;
}
HIFI_PACKED Hifi_CD_Time;

typedef struct
{
  Hifi_CMD_Header header;
  Hifi_CD_Address addr;
}
HIFI_PACKED Hifi_CMD_CD_Play;

// Can't use enum
#define  HIFI_CD_State_Stopped	0
#define  HIFI_CD_State_Playing	1
#define  HIFI_CD_State_Paused   2
#define  HIFI_CD_State_NoDisc	254
#define  HIFI_CD_State_Unknown  255

typedef struct
{
  Hifi_ST_Header header;
  Hifi_CD_Address addr;
  Byte state;
}
HIFI_PACKED Hifi_ST_CD_State;

typedef struct
{
  Hifi_ST_Header header;
  Byte track;
  Byte Tracks;
  Word tracklen;                /*In seconds */
}
HIFI_PACKED Hifi_ST_CD_TkState;


#endif /* __HIFI_CD_H_ */
