Blog: Intel HD Audio support for AQEMU (and other bugs): aqemu-0.8.2-soundhw-hda.patch

File aqemu-0.8.2-soundhw-hda.patch, 8.7 KB (added by retracile, 9 years ago)

Add checkbox for Intel HD Audio patch

  • Main_Window.cpp

    diff -urN aqemu-0.8.2.orig/Main_Window.cpp aqemu-0.8.2/Main_Window.cpp
    old new  
    316316        connect( ui.CH_Adlib, SIGNAL(clicked()),
    317317                         this, SLOT(VM_Changet()) );
    318318       
     319        connect( ui.CH_hda, SIGNAL(clicked()),
     320                         this, SLOT(VM_Changet()) );
     321       
    319322        connect( ui.CH_AC97, SIGNAL(clicked()),
    320323                         this, SLOT(VM_Changet()) );
    321324       
     
    801804        if( ui.CH_Adlib->isChecked() ) snd_card.Audio_Adlib = true;
    802805        else snd_card.Audio_Adlib = false;
    803806       
     807        if( ui.CH_hda->isChecked() ) snd_card.Audio_hda = true;
     808        else snd_card.Audio_hda = false;
     809       
    804810        if( ui.CH_PCSPK->isChecked() ) snd_card.Audio_PC_Speaker = true;
    805811        else snd_card.Audio_PC_Speaker = false;
    806812       
     
    14891495        if( tmp_vm->Get_Audio_Cards().Audio_Adlib ) ui.CH_Adlib->setChecked( true );
    14901496        else ui.CH_Adlib->setChecked( false );
    14911497       
     1498        if( tmp_vm->Get_Audio_Cards().Audio_hda ) ui.CH_hda->setChecked( true );
     1499        else ui.CH_hda->setChecked( false );
     1500       
    14921501        if( tmp_vm->Get_Audio_Cards().Audio_PC_Speaker ) ui.CH_PCSPK->setChecked( true );
    14931502        else ui.CH_PCSPK->setChecked( false );
    14941503       
     
    21162125                        cell_cursor = cell.firstCursorPosition();
    21172126                       
    21182127                        if( ui.CH_sb16->isChecked() || ui.CH_es1370->isChecked() || ui.CH_Adlib->isChecked() ||
     2128                                ui.CH_hda->isChecked()  ||
    21192129                                ui.CH_AC97->isChecked() || ui.CH_GUS->isChecked()        || ui.CH_PCSPK->isChecked() )
    21202130                        {
    21212131                                cell_cursor.insertText( tr("Yes"), format );
     
    60906100                        if( curComp.Audio_Card_List.Audio_Adlib ) ui.CH_Adlib->setEnabled( true );
    60916101                        else ui.CH_Adlib->setEnabled( false );
    60926102                       
     6103                        if( curComp.Audio_Card_List.Audio_hda ) ui.CH_hda->setEnabled( true );
     6104                        else ui.CH_hda->setEnabled( false );
     6105                       
    60936106                        if( curComp.Audio_Card_List.Audio_AC97 ) ui.CH_AC97->setEnabled( true );
    60946107                        else ui.CH_AC97->setEnabled( false );
    60956108                       
  • Main_Window.ui

    diff -urN aqemu-0.8.2.orig/Main_Window.ui aqemu-0.8.2/Main_Window.ui
    old new  
    11231123                 </property>
    11241124                </widget>
    11251125               </item>
     1126               <item row="0" column="5">
     1127                <spacer>
     1128                 <property name="orientation">
     1129                  <enum>Qt::Horizontal</enum>
     1130                 </property>
     1131                 <property name="sizeHint" stdset="0">
     1132                  <size>
     1133                   <width>16</width>
     1134                   <height>20</height>
     1135                  </size>
     1136                 </property>
     1137                </spacer>
     1138               </item>
     1139               <item row="0" column="6">
     1140                <widget class="QCheckBox" name="CH_hda">
     1141                 <property name="text">
     1142                  <string>&amp;Intel HD Audio</string>
     1143                 </property>
     1144                 <property name="checked">
     1145                  <bool>false</bool>
     1146                 </property>
     1147                </widget>
     1148               </item>
    11261149               <item row="1" column="0">
    11271150                <widget class="QCheckBox" name="CH_AC97">
    11281151                 <property name="text">
     
    47394762  <tabstop>CH_es1370</tabstop>
    47404763  <tabstop>CH_GUS</tabstop>
    47414764  <tabstop>CH_Adlib</tabstop>
     4765  <tabstop>CH_hda</tabstop>
    47424766  <tabstop>CH_PCSPK</tabstop>
    47434767  <tabstop>CH_Fullscreen</tabstop>
    47444768  <tabstop>CH_Local_Time</tabstop>
  • System_Info.cpp

    diff -urN aqemu-0.8.2.orig/System_Info.cpp aqemu-0.8.2/System_Info.cpp
    old new  
    559559        Audio_Card_x86.Audio_PC_Speaker = true;
    560560        Audio_Card_x86.Audio_sb16 = true;
    561561        Audio_Card_x86.Audio_Adlib = true;
     562        Audio_Card_x86.Audio_hda = true;
    562563        Audio_Card_x86.Audio_es1370 = true;
    563564       
    564565        Audio_Card_PPC.Audio_sb16 = true;
     
    23642365                if( qemu_dev_name == "sb16" ) tmp_dev.Audio_Card_List.Audio_sb16 = true;
    23652366                else if( qemu_dev_name == "es1370" ) tmp_dev.Audio_Card_List.Audio_es1370 = true;
    23662367                else if( qemu_dev_name == "gus" ) tmp_dev.Audio_Card_List.Audio_Adlib = true;
     2368                else if( qemu_dev_name == "hda" ) tmp_dev.Audio_Card_List.Audio_hda = true;
    23672369                else if( qemu_dev_name == "adlib" ) tmp_dev.Audio_Card_List.Audio_PC_Speaker = true;
    23682370                else if( qemu_dev_name == "pcspk" ) tmp_dev.Audio_Card_List.Audio_GUS = true;
    23692371                else if( qemu_dev_name == "ac97" ) tmp_dev.Audio_Card_List.Audio_AC97 = true;
  • aqemu-0.8.2

    diff -urN aqemu-0.8.2.orig/VM.cpp aqemu-0.8.2/VM.cpp
    old new  
    11431143       
    11441144        Sec_Element.appendChild( Dom_Text );
    11451145       
     1146        // Audio_hda
     1147        Sec_Element = New_Dom_Document.createElement( "Audio_hda" );
     1148        Dom_Element.appendChild( Sec_Element );
     1149       
     1150        if( Audio_Card.Audio_hda )
     1151                Dom_Text = New_Dom_Document.createTextNode( "true" );
     1152        else
     1153                Dom_Text = New_Dom_Document.createTextNode( "false" );
     1154       
     1155        Sec_Element.appendChild( Dom_Text );
     1156       
    11461157        // Audio_PC_Speaker
    11471158        Sec_Element = New_Dom_Document.createElement( "Audio_PC_Speaker" );
    11481159        Dom_Element.appendChild( Sec_Element );
     
    37323743                        // Audio_Adlib
    37333744                        snd_card.Audio_Adlib = Second_Element.firstChildElement("Audio_Adlib").text() == "true";
    37343745                       
     3746                        // Audio_hda
     3747                        snd_card.Audio_hda = Second_Element.firstChildElement("Audio_hda").text() == "true";
     3748                       
    37353749                        // Audio_PC_Speaker
    37363750                        snd_card.Audio_PC_Speaker = Second_Element.firstChildElement("Audio_PC_Speaker").text() == "true";
    37373751                       
     
    51565170        if( Audio_Card.Audio_sb16 &&  Current_Emulator_Devices.Audio_Card_List.Audio_sb16 ) audio_list << "sb16";
    51575171        if( Audio_Card.Audio_es1370 && Current_Emulator_Devices.Audio_Card_List.Audio_es1370 ) audio_list << "es1370";
    51585172        if( Audio_Card.Audio_Adlib && Current_Emulator_Devices.Audio_Card_List.Audio_Adlib ) audio_list << "adlib";
     5173        if( Audio_Card.Audio_hda && Current_Emulator_Devices.Audio_Card_List.Audio_hda ) audio_list << "hda";
    51595174        if( Audio_Card.Audio_PC_Speaker && Current_Emulator_Devices.Audio_Card_List.Audio_PC_Speaker ) audio_list << "pcspk";
    51605175        if( Audio_Card.Audio_GUS && Current_Emulator_Devices.Audio_Card_List.Audio_GUS ) audio_list << "gus";
    51615176        if( Audio_Card.Audio_AC97 && Current_Emulator_Devices.Audio_Card_List.Audio_AC97 ) audio_list << "ac97";
  • VM_Devices.cpp

    diff -urN aqemu-0.8.2.orig/VM_Devices.cpp aqemu-0.8.2/VM_Devices.cpp
    old new  
    421421                        tmpDev.Audio_Card_List.Audio_sb16 = (thirdElement.firstChildElement("sb16").text() == "yes");
    422422                        tmpDev.Audio_Card_List.Audio_es1370 = (thirdElement.firstChildElement("es1370").text() == "yes");
    423423                        tmpDev.Audio_Card_List.Audio_Adlib = (thirdElement.firstChildElement("Adlib").text() == "yes");
     424                        tmpDev.Audio_Card_List.Audio_hda = (thirdElement.firstChildElement("hda").text() == "yes");
    424425                        tmpDev.Audio_Card_List.Audio_PC_Speaker = (thirdElement.firstChildElement("PC_Speaker").text() == "yes");
    425426                        tmpDev.Audio_Card_List.Audio_GUS = (thirdElement.firstChildElement("GUS").text() == "yes");
    426427                        tmpDev.Audio_Card_List.Audio_AC97 = (thirdElement.firstChildElement("AC97").text() == "yes");
     
    765766                thirdElement.appendChild( domText );
    766767                deviceElement.appendChild( thirdElement );
    767768               
     769                thirdElement = domDocument.createElement( "hda" );
     770                domText = domDocument.createTextNode( (tmpDev.Audio_Card_List.Audio_hda ? "yes" : "no") );
     771                thirdElement.appendChild( domText );
     772                deviceElement.appendChild( thirdElement );
     773               
    768774                thirdElement = domDocument.createElement( "PC_Speaker" );
    769775                domText = domDocument.createTextNode( (tmpDev.Audio_Card_List.Audio_PC_Speaker ? "yes" : "no") );
    770776                thirdElement.appendChild( domText );
  • VM_Devices.h

    diff -urN aqemu-0.8.2.orig/VM_Devices.h aqemu-0.8.2/VM_Devices.h
    old new  
    5151                                bool Audio_sb16;
    5252                                bool Audio_es1370;
    5353                                bool Audio_Adlib;
     54                                bool Audio_hda;
    5455                                bool Audio_PC_Speaker;
    5556                                bool Audio_GUS;
    5657                                bool Audio_AC97;
    5758                               
    5859                                Sound_Cards()
    5960                                {
    60                                         Audio_sb16 = Audio_es1370 = Audio_Adlib = Audio_PC_Speaker = Audio_GUS = Audio_AC97 = false;
     61                                        Audio_sb16 = Audio_es1370 = Audio_Adlib = Audio_hda = Audio_PC_Speaker = Audio_GUS = Audio_AC97 = false;
    6162                                }
    6263                               
    6364                                bool operator==( const Sound_Cards &v ) const
     
    6566                                        if( Audio_sb16 == v.Audio_sb16 &&
    6667                                                Audio_es1370 == v.Audio_es1370 &&
    6768                                                Audio_Adlib == v.Audio_Adlib &&
     69                                                Audio_hda == v.Audio_hda &&
    6870                                                Audio_PC_Speaker == v.Audio_PC_Speaker &&
    6971                                                Audio_GUS == v.Audio_GUS &&
    7072                                                Audio_AC97 == v.Audio_AC97 )