diff options
author | Britney Fransen <brfransen@gmail.com> | 2014-02-17 23:54:00 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2014-02-17 23:54:00 (GMT) |
commit | 64de605c2bbf7fea4c80fe803bb229593d9fafbf (patch) | |
tree | cfa22726bd1ac0861de6deae9177091947e30021 /abs/core/mythinstall | |
parent | 6c08ad9abe517022061180ebf3d086edc3808b58 (diff) | |
download | linhes_pkgbuild-64de605c2bbf7fea4c80fe803bb229593d9fafbf.zip linhes_pkgbuild-64de605c2bbf7fea4c80fe803bb229593d9fafbf.tar.gz linhes_pkgbuild-64de605c2bbf7fea4c80fe803bb229593d9fafbf.tar.bz2 |
mythinstall: Audio Settings cleanups. HDMI is detected as Digital. refs #960
LinHES-config: systemconfig.py: remove tinker from audio config
soundconfig.sh: fix aplay cmd flag for testing audio. Add asound.conf and mplayer.conf creation using the seleted default devices.
Diffstat (limited to 'abs/core/mythinstall')
-rwxr-xr-x | abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp | 73 | ||||
-rw-r--r-- | abs/core/mythinstall/PKGBUILD | 2 |
2 files changed, 48 insertions, 27 deletions
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp index 2e505f1..fb5f841 100755 --- a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp @@ -2800,9 +2800,8 @@ SoundSettings::SoundSettings(): HostAudiotype->setLabel(QObject::tr("Sound Card Driver")); HostAudiotype->addSelection("OSS"); HostAudiotype->addSelection("ALSA"); - HostAudiotype->addSelection("tinker"); - HostAudiotype->setHelpText(QObject::tr("Select the sound driver, OSS or ALSA." ) ); + HostAudiotype->setHelpText(QObject::tr("Select the sound driver, ALSA or OSS." ) ); addChild(HostAudiotype); setTrigger(HostAudiotype); @@ -2835,34 +2834,32 @@ SoundSettings::SoundSettings(): HorizontalConfigurationGroup *lpalsa = new HorizontalConfigurationGroup(false, false, true, true); TransButtonSetting *LoadOSSbutton = new TransButtonSetting(); - LoadOSSbutton->setLabel(tr("Load OSS driver")); + LoadOSSbutton->setLabel(tr("Load OSS Driver")); TransButtonSetting *LoadALSAbutton = new TransButtonSetting(); - LoadALSAbutton->setLabel(tr("Load ALSA driver")); + LoadALSAbutton->setLabel(tr("Load ALSA Driver")); TransButtonSetting *TestAudiobutton = new TransButtonSetting(); - TestAudiobutton->setLabel(tr("Test Audio Settings")); + TestAudiobutton->setLabel(tr("Test Device")); + TestAudiobutton->setHelpText(QObject::tr("Will play a sound using the selected default device.")); lp->addChild(TestAudiobutton); lp->addChild(LoadOSSbutton); TransButtonSetting *TestALSAAudiobutton = new TransButtonSetting(); - TestALSAAudiobutton->setLabel(tr("Test ALSA Audio Settings")); + TestALSAAudiobutton->setLabel(tr("Test Device")); + TestALSAAudiobutton->setHelpText(QObject::tr("Will play a sound using the selected default device.")); lpalsa->addChild(TestALSAAudiobutton); lpalsa->addChild(LoadALSAbutton); TransLabelSetting *osslabel = new TransLabelSetting(); - osslabel->setValue("The original OSS! More information can be found at:"); - - TransLabelSetting *osslabel1 = new TransLabelSetting(); - osslabel1->setValue("http://www.opensound.com \n\nPlease note to fully configure sound visit the \nMythTV audio setup.\n"); + osslabel->setValue("OSS- Open Sound System\nhttp://opensound.com\n\nTo configure sound for MythTV go to:\nService Menu --> MythTV Settings --> Setup --> Audio\n"); TransLabelSetting *AlsaLabel = new TransLabelSetting(); - AlsaLabel->setValue("ALSA, the alternative to OSS\n\nPlease note to fully configure sound visit the \nMythTV audio setup.\n"); + AlsaLabel->setValue("ALSA - Advanced Linux Sound Architecture\nhttp://alsa-project.org\n\nTo configure sound for MythTV go to:\nService Menu --> MythTV Settings --> Setup --> Audio\n"); // OSS GROUP SoundOSSsettings *OSS = new SoundOSSsettings ; ConfigurationGroup* osssettings = new VerticalConfigurationGroup(false); osssettings->addChild(osslabel); - osssettings->addChild(osslabel1); osssettings->addChild(OSS); // osssettings->addChild(syncboxes); osssettings->addChild(lp); @@ -2889,7 +2886,6 @@ SoundSettings::SoundSettings(): ALSA, SLOT(loadalsadriver())); addTarget("ALSA", alsasettings); addTarget("OSS", osssettings); - addTarget("tinker", new VerticalConfigurationGroup(false)); }; @@ -2898,13 +2894,17 @@ SoundOSSsettings::SoundOSSsettings(): { SetVertical(true); HostSoundTypeout = new HostComboBox("HostSoundTypeout"); - HostSoundTypeout->setLabel(QObject::tr("Type")); + HostSoundTypeout->setLabel(QObject::tr("Audio Type")); HostSoundTypeout->addSelection("Analog"); HostSoundTypeout->addSelection("Digital"); - HostSoundTypeout->setHelpText(QObject::tr("")); + HostSoundTypeout->setHelpText(QObject::tr("Select the connection type, Analog or Digital.")); HostSoundOssAnalog = new HostComboBox("HostSoundOssAnalog"); + HostSoundOssAnalog->setLabel(QObject::tr("Default Device")); + HostSoundOssAnalog->setHelpText(QObject::tr("Select the default audio output device for the system.")); HostSoundOssDigital = new HostComboBox("HostSoundOssDigital"); + HostSoundOssDigital->setLabel(QObject::tr("Default Device")); + HostSoundOssDigital->setHelpText(QObject::tr("Select the default audio output device for the system.")); fillossselection(); int findossanalog=HostSoundOssAnalog->findSelection(hostparm.OLDHostSoundOSSAnalog ); int findossdigital=HostSoundOssDigital->findSelection(hostparm.OLDHostSoundOSSDigital ); @@ -2921,13 +2921,17 @@ SoundALSAsettings::SoundALSAsettings(): { SetVertical(true); HostSoundALSATypeout = new HostComboBox("HostSoundALSATypeout"); - HostSoundALSATypeout->setLabel(QObject::tr("Type")); + HostSoundALSATypeout->setLabel(QObject::tr("Audio Type")); HostSoundALSATypeout->addSelection("Analog"); HostSoundALSATypeout->addSelection("Digital"); - HostSoundALSATypeout->setHelpText(QObject::tr("")); + HostSoundALSATypeout->setHelpText(QObject::tr("Select the connection type, Analog or Digital.")); HostSoundALSAAnalog = new HostComboBox("HostSoundALSAAnalog"); + HostSoundALSAAnalog->setLabel(QObject::tr("Default Device")); + HostSoundALSAAnalog->setHelpText(QObject::tr("Select the default audio output device for the system. Chrome, aplay and other programs that use the default system device for audio will use this device. Mplayer will be set to use this device.")); HostSoundALSADigital = new HostComboBox("HostSoundALSADigital"); + HostSoundALSADigital->setLabel(QObject::tr("Default Device")); + HostSoundALSADigital->setHelpText(QObject::tr("Select the default audio output device for the system. Chrome, aplay and other programs that use the default system device for audio will use this device. Mplayer will be set to use this device.")); fillALSAselection(); int findalsaanalog=HostSoundALSAAnalog->findSelection(hostparm.OLDHostSoundALSAAnalog ); int findalsadigital=HostSoundALSADigital->findSelection(hostparm.OLDHostSoundALSADigital ); @@ -3143,10 +3147,10 @@ void SoundALSAsettings::fillALSAselection() break; } //card 0: I82801DBICH4:q [Intel 82801DB-ICH4], device 0: Intel ICH [Intel 82801DB-ICH4] - alsadescription=line.section( "," , 0 ,0 ); + alsadescription=line.section( ", " , 0 ,0 ); alsadescription=alsadescription.section(":",1,1); - alsadescription2=line.section( "," , 1 ,1 ); + alsadescription2=line.section( ", " , 1 ,1 ); //alsadescription2=alsadescription.section(":",0,0); hwdevice=line.section( ":" , 0 ,0 ); @@ -3157,16 +3161,33 @@ void SoundALSAsettings::fillALSAselection() temphwdevice=temphwdevice.section(" ",-1,-1 ); hwdevice.append(","); hwdevice.append(temphwdevice); - simpleitem=alsadescription2 + "(hw:" + hwdevice + ")"; - if (line.contains("IEC958") || line.contains("Digital")) + simpleitem=alsadescription2 + "(plughw:" + hwdevice + ")"; + if (line.contains("IEC958") || line.contains("Digital") || line.contains("PCM") || line.contains("HDMI")) HostSoundALSADigital->addSelection(simpleitem); else HostSoundALSAAnalog->addSelection(simpleitem); } } } + myth_system("aplay -L > /tmp/alsapcm"); + currentfile = "/tmp/alsapcm"; + QFile file1(currentfile); + if ( file1.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file1 ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if (line.startsWith("iec958:") ) + { + alsadescription=line; + simpleitem=alsadescription + "(plug:iec958)"; + HostSoundALSADigital->addSelection(simpleitem); + break; + } + } + } return ; - } void SoundSettings::soundossgathersettings_1 (void) @@ -3215,7 +3236,7 @@ void SoundOSSsettings::soundossgathersettings(void) cmdtxt.append("bin/soundconfig.sh -t test -i OSS -d " + hostparm.ThisHostSoundDevice + "&"); system(cmdtxt); int return_code = 0; - QString msgtext = "Playing sample audio" ; + QString msgtext = "Playing Test Audio" ; MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); @@ -3293,10 +3314,10 @@ void SoundALSAsettings::soundalsagathersettings(void) // Add info popup right here QString cmdtxt; cmdtxt=MV_ROOT ; - cmdtxt.append("bin/soundconfig.sh -t test -i ALSA -d " + hostparm.ThisHostSoundDevice + "&"); + cmdtxt.append("bin/soundconfig.sh -t test -i ALSA -d " + hostparm.ThisHostSoundDevice + "&"); system(cmdtxt); int return_code = 0; - QString msgtext = "Playing sample audio" ; + QString msgtext = "Playing Test Audio" ; MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); if (busyPopup->Create()) @@ -3521,7 +3542,7 @@ void run_systemconfig(QString modulelist, bool restart, QString dbcommand) cmdtxt.append("bin/systemconfig.sh " + modulelist + " &"); myth_system(cmdtxt); int return_code = 0; - QString msgtext = "Please wait while " ; + QString msgtext = "Please wait while " ; msgtext.append(gCoreContext->GetSetting("HostMyhostname")); msgtext.append(" is configured"); MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); diff --git a/abs/core/mythinstall/PKGBUILD b/abs/core/mythinstall/PKGBUILD index 19bdf68..c851516 100644 --- a/abs/core/mythinstall/PKGBUILD +++ b/abs/core/mythinstall/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Jams pkgname=mythinstall pkgver=8.1 -pkgrel=9 +pkgrel=10 pkgdesc="LinHES installer/systemconfig GUI." arch=('i686' 'x86_64') depends=('mythtv>=0.27') |