summary refs log tree commit diff stats
path: root/hw/audio/fmopl.c
diff options
context:
space:
mode:
authorJuan Quintela <quintela@redhat.com>2017-04-26 00:37:26 +0200
committerGerd Hoffmann <kraxel@redhat.com>2017-05-04 09:16:04 +0200
commit8f7e2c2cb731765cde6521ae252d55f4d8a9a85f (patch)
treecc9714efbe5ecb48d3c35c852edb26d693c1589c /hw/audio/fmopl.c
parent7852b53acc951cc311cacd87d15198ef18d519e8 (diff)
downloadfocaccia-qemu-8f7e2c2cb731765cde6521ae252d55f4d8a9a85f.tar.gz
focaccia-qemu-8f7e2c2cb731765cde6521ae252d55f4d8a9a85f.zip
audio: Remove type field
It was not used anymore as now there is only one type of devices.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-14-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/audio/fmopl.c')
-rw-r--r--hw/audio/fmopl.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/hw/audio/fmopl.c b/hw/audio/fmopl.c
index 9171001030..48db828a49 100644
--- a/hw/audio/fmopl.c
+++ b/hw/audio/fmopl.c
@@ -761,18 +761,15 @@ static void OPLWriteReg(FM_OPL *OPL, int r, int v)
 		{
 		case 0x01:
 			/* wave selector enable */
-			if(OPL->type&OPL_TYPE_WAVESEL)
+			OPL->wavesel = v&0x20;
+                        if(!OPL->wavesel)
 			{
-				OPL->wavesel = v&0x20;
-				if(!OPL->wavesel)
+				/* preset compatible mode */
+				int c;
+				for(c=0;c<OPL->max_ch;c++)
 				{
-					/* preset compatible mode */
-					int c;
-					for(c=0;c<OPL->max_ch;c++)
-					{
-						OPL->P_CH[c].SLOT[SLOT1].wavetable = &SIN_TABLE[0];
-						OPL->P_CH[c].SLOT[SLOT2].wavetable = &SIN_TABLE[0];
-					}
+					OPL->P_CH[c].SLOT[SLOT1].wavetable = &SIN_TABLE[0];
+					OPL->P_CH[c].SLOT[SLOT2].wavetable = &SIN_TABLE[0];
 				}
 			}
 			return;
@@ -1076,7 +1073,7 @@ void OPLResetChip(FM_OPL *OPL)
 
 /* ----------  Create one of vietual YM3812 ----------       */
 /* 'rate'  is sampling rate and 'bufsiz' is the size of the  */
-FM_OPL *OPLCreate(int type, int clock, int rate)
+FM_OPL *OPLCreate(int clock, int rate)
 {
 	char *ptr;
 	FM_OPL *OPL;
@@ -1095,7 +1092,6 @@ FM_OPL *OPLCreate(int type, int clock, int rate)
 	OPL        = (FM_OPL *)ptr; ptr+=sizeof(FM_OPL);
 	OPL->P_CH  = (OPL_CH *)ptr; ptr+=sizeof(OPL_CH)*max_ch;
 	/* set channel state pointer */
-	OPL->type  = type;
 	OPL->clock = clock;
 	OPL->rate  = rate;
 	OPL->max_ch = max_ch;