Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up --- Bug Reports --- Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: GroovyArcade keeps defaulting to HDMI audio  (Read 1490 times)

0 Members and 1 Guest are viewing this topic.

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:December 03, 2019, 06:41:08 pm
GroovyArcade keeps defaulting to HDMI audio
« on: October 28, 2019, 07:59:44 pm »
It doesn't do it every time I boot, but maybe 1 out of 10 times when the frontend comes up there's no sound, and it's because it has changed the default from my motherboard's normal onboard audio chipset to the HDMI audio in my HD 5450 video card. Is there any way to disable HDMI audio from even being an option? For example, I assume there are HDMI audio drivers packaged with GroovyArcade which allow it to recognize the HDMI audio hardware in the first place. Can those drivers be deleted? If so, where are they located and what's the name of the file(s)?

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 490
  • Last login:Yesterday at 10:15:54 am
  • Z80 ERROR
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #1 on: October 29, 2019, 09:13:47 am »
It doesn't do it every time I boot, but maybe 1 out of 10 times when the frontend comes up there's no sound, and it's because it has changed the default from my motherboard's normal onboard audio chipset to the HDMI audio in my HD 5450 video card. Is there any way to disable HDMI audio from even being an option? For example, I assume there are HDMI audio drivers packaged with GroovyArcade which allow it to recognize the HDMI audio hardware in the first place. Can those drivers be deleted? If so, where are they located and what's the name of the file(s)?

Hi,

If you know the module use by your internal audio chip you can blacklist it in the /etc/modprobe.d/blacklist.conf file.

Eg. if you are using intel hda chipset (check with lspci or lsmod) insert he following line in the file:
Code: [Select]
blacklist snd_hda_intel



MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:December 03, 2019, 06:41:08 pm
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #2 on: October 29, 2019, 11:38:20 am »

Hi,

If you know the module use by your internal audio chip you can blacklist it in the /etc/modprobe.d/blacklist.conf file.

Eg. if you are using intel hda chipset (check with lspci or lsmod) insert he following line in the file:
Code: [Select]
blacklist snd_hda_intel

Thanks. The LSPCI command shows "Cedar HDMI Audio". The LSMOD command gives results that are largely unreadable on a 15 KHz arcade monitor in an interlaced mode. Since I know next to nothing about Linux, I don't know how to copy the text and save it to the USB flash drive so I can open it on my main PC to read it. I managed to paste it into Vim, but there's no menu and the methods to save that I found on Google aren't working. Then I tried creating a blank file on the USB drive, and when I opened it, I got some sort of text editor, which actually has a menu, but the copied text from Xterm simply won't paste into it like it did into Vim (I tried shift + insert, as well as "paste" from the menu; nothing happened in either case). I'm out of ideas on how to make the LSMOD results readable, since the program I can paste the results into won't save, and the program that will save won't let me paste the results into it.

Edit: I found a command that will send the output of a command (such as LSMOD) directly to a text file:

LSMOD > output.txt

But trying to type ">" results in a colon (":") being typed instead, and there's nothing wrong with my keyboard. It's like I'm in the Twilight Zone or something. So I made a text file on this PC with "LSMOD > output.txt" typed in it, then I opened it on the GroovyArcade PC, copied and pasted it into Xterm (amazing that copy and paste actually worked in this particular scenario), and finally I was able to get the results of the LSMOD command saved to a text file. In any case, does this look like the name of the module to blacklist?

snd_hda_codec_hdmi

Edit 2: I added the line...

blacklist snd_hda_codec_hdmi

... to the /etc/modprobe.d/blacklist.conf file, saved it, reopened it to confirm it was actually saved, and it was, and, it didn't work. The first time I booted after doing that there was sound, but there was usually sound before anyway. The second time I booted there was no sound, so it's still doing the same thing as before. Also, the HDMI audio option is still there in the default sound card menu.



The "blacklist lp" line was already there by default.

Edit 3: This is the output from the LSMOD command:

Code: [Select]
Module                  Size  Used by
nls_iso8859_1          16384  1
nls_cp437              20480  1
vfat                   20480  1
fat                    81920  1 vfat
forcedeth              77824  0
mousedev               24576  0
snd_hda_codec_hdmi     61440  1
snd_intel8x0           49152  0
snd_hda_intel          49152  0
snd_hda_codec         155648  2 snd_hda_codec_hdmi,snd_hda_intel
snd_ac97_codec        151552  1 snd_intel8x0
snd_mpu401             16384  0
snd_hda_core           98304  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_mpu401_uart        16384  1 snd_mpu401
ac97_bus               16384  1 snd_ac97_codec
snd_hwdep              16384  1 snd_hda_codec
psmouse               172032  0
edac_mce_amd           28672  0
snd_pcm               135168  6 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_intel8x0,snd_ac97_codec,snd_hda_core
snd_rawmidi            40960  1 snd_mpu401_uart
ppdev                  24576  0
k8temp                 16384  0
pcspkr                 16384  0
snd_seq_device         16384  1 snd_rawmidi
snd_timer              40960  1 snd_pcm
ns558                  16384  0
snd                   102400  12 snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_mpu401,snd_hda_codec,snd_intel8x0,snd_timer,snd_ac97_codec,snd_mpu401_uart,snd_pcm,snd_rawmidi
soundcore              16384  1 snd
i2c_nforce2            20480  0
input_leds             16384  0
gameport               16384  2 ns558
asus_atk0110           24576  0
evdev                  20480  9
mac_hid                16384  0
parport_pc             53248  0
parport                61440  2 parport_pc,ppdev
crypto_user            20480  0
ip_tables              32768  0
x_tables               49152  1 ip_tables
ext4                  749568  1
crc32c_generic         16384  2
crc16                  16384  1 ext4
mbcache                16384  1 ext4
jbd2                  131072  1 ext4
fscrypto               32768  1 ext4
hid_generic            16384  0
usbhid                 61440  0
hid                   143360  2 usbhid,hid_generic
uas                    28672  0
usb_storage            73728  2 uas
sr_mod                 28672  0
cdrom                  73728  1 sr_mod
sd_mod                 57344  3
ata_generic            16384  0
serio_raw              20480  0
atkbd                  36864  0
libps2                 20480  2 atkbd,psmouse
pata_acpi              16384  0
sata_nv                36864  0
pata_amd               24576  1
libata                278528  4 pata_amd,pata_acpi,ata_generic,sata_nv
ohci_pci               20480  0
ehci_pci               20480  0
scsi_mod              258048  5 sd_mod,usb_storage,uas,libata,sr_mod
ohci_hcd               57344  1 ohci_pci
ehci_hcd               98304  1 ehci_pci
floppy                 90112  0
i8042                  32768  0
serio                  28672  6 serio_raw,atkbd,psmouse,i8042
nouveau              2195456  0
mxm_wmi                16384  1 nouveau
wmi                    32768  2 mxm_wmi,nouveau
radeon               1638400  4
i2c_algo_bit           16384  2 radeon,nouveau
drm_kms_helper        208896  2 radeon,nouveau
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
ttm                   110592  2 radeon,nouveau
drm                   499712  7 drm_kms_helper,radeon,ttm,nouveau
agpgart                53248  3 ttm,nouveau,drm
« Last Edit: October 29, 2019, 01:27:27 pm by MaximRecoil »

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 490
  • Last login:Yesterday at 10:15:54 am
  • Z80 ERROR
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #3 on: October 29, 2019, 02:46:31 pm »

Hi,

If you know the module use by your internal audio chip you can blacklist it in the /etc/modprobe.d/blacklist.conf file.

Eg. if you are using intel hda chipset (check with lspci or lsmod) insert he following line in the file:
Code: [Select]
blacklist snd_hda_intel

Thanks. The LSPCI command shows "Cedar HDMI Audio". The LSMOD command gives results that are largely unreadable on a 15 KHz arcade monitor in an interlaced mode. Since I know next to nothing about Linux, I don't know how to copy the text and save it to the USB flash drive so I can open it on my main PC to read it. I managed to paste it into Vim, but there's no menu and the methods to save that I found on Google aren't working. Then I tried creating a blank file on the USB drive, and when I opened it, I got some sort of text editor, which actually has a menu, but the copied text from Xterm simply won't paste into it like it did into Vim (I tried shift + insert, as well as "paste" from the menu; nothing happened in either case). I'm out of ideas on how to make the LSMOD results readable, since the program I can paste the results into won't save, and the program that will save won't let me paste the results into it.

Edit: I found a command that will send the output of a command (such as LSMOD) directly to a text file:

LSMOD > output.txt

But trying to type ">" results in a colon (":") being typed instead, and there's nothing wrong with my keyboard. It's like I'm in the Twilight Zone or something. So I made a text file on this PC with "LSMOD > output.txt" typed in it, then I opened it on the GroovyArcade PC, copied and pasted it into Xterm (amazing that copy and paste actually worked in this particular scenario), and finally I was able to get the results of the LSMOD command saved to a text file. In any case, does this look like the name of the module to blacklist?

snd_hda_codec_hdmi

Edit 2: I added the line...

blacklist snd_hda_codec_hdmi

... to the /etc/modprobe.d/blacklist.conf file, saved it, reopened it to confirm it was actually saved, and it was, and, it didn't work. The first time I booted after doing that there was sound, but there was usually sound before anyway. The second time I booted there was no sound, so it's still doing the same thing as before. Also, the HDMI audio option is still there in the default sound card menu.



The "blacklist lp" line was already there by default.

Edit 3: This is the output from the LSMOD command:

Code: [Select]
Module                  Size  Used by
nls_iso8859_1          16384  1
nls_cp437              20480  1
vfat                   20480  1
fat                    81920  1 vfat
forcedeth              77824  0
mousedev               24576  0
snd_hda_codec_hdmi     61440  1
snd_intel8x0           49152  0
snd_hda_intel          49152  0
snd_hda_codec         155648  2 snd_hda_codec_hdmi,snd_hda_intel
snd_ac97_codec        151552  1 snd_intel8x0
snd_mpu401             16384  0
snd_hda_core           98304  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_mpu401_uart        16384  1 snd_mpu401
ac97_bus               16384  1 snd_ac97_codec
snd_hwdep              16384  1 snd_hda_codec
psmouse               172032  0
edac_mce_amd           28672  0
snd_pcm               135168  6 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_intel8x0,snd_ac97_codec,snd_hda_core
snd_rawmidi            40960  1 snd_mpu401_uart
ppdev                  24576  0
k8temp                 16384  0
pcspkr                 16384  0
snd_seq_device         16384  1 snd_rawmidi
snd_timer              40960  1 snd_pcm
ns558                  16384  0
snd                   102400  12 snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_mpu401,snd_hda_codec,snd_intel8x0,snd_timer,snd_ac97_codec,snd_mpu401_uart,snd_pcm,snd_rawmidi
soundcore              16384  1 snd
i2c_nforce2            20480  0
input_leds             16384  0
gameport               16384  2 ns558
asus_atk0110           24576  0
evdev                  20480  9
mac_hid                16384  0
parport_pc             53248  0
parport                61440  2 parport_pc,ppdev
crypto_user            20480  0
ip_tables              32768  0
x_tables               49152  1 ip_tables
ext4                  749568  1
crc32c_generic         16384  2
crc16                  16384  1 ext4
mbcache                16384  1 ext4
jbd2                  131072  1 ext4
fscrypto               32768  1 ext4
hid_generic            16384  0
usbhid                 61440  0
hid                   143360  2 usbhid,hid_generic
uas                    28672  0
usb_storage            73728  2 uas
sr_mod                 28672  0
cdrom                  73728  1 sr_mod
sd_mod                 57344  3
ata_generic            16384  0
serio_raw              20480  0
atkbd                  36864  0
libps2                 20480  2 atkbd,psmouse
pata_acpi              16384  0
sata_nv                36864  0
pata_amd               24576  1
libata                278528  4 pata_amd,pata_acpi,ata_generic,sata_nv
ohci_pci               20480  0
ehci_pci               20480  0
scsi_mod              258048  5 sd_mod,usb_storage,uas,libata,sr_mod
ohci_hcd               57344  1 ohci_pci
ehci_hcd               98304  1 ehci_pci
floppy                 90112  0
i8042                  32768  0
serio                  28672  6 serio_raw,atkbd,psmouse,i8042
nouveau              2195456  0
mxm_wmi                16384  1 nouveau
wmi                    32768  2 mxm_wmi,nouveau
radeon               1638400  4
i2c_algo_bit           16384  2 radeon,nouveau
drm_kms_helper        208896  2 radeon,nouveau
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
ttm                   110592  2 radeon,nouveau
drm                   499712  7 drm_kms_helper,radeon,ttm,nouveau
agpgart                53248  3 ttm,nouveau,drm
Hi,

Blacklisting a codec will not work, you have to blacklist the sound driver.
Now I am a bit confused by what you are trying to acheived. Do you want to disable the onboard sound card or the ati HDMI output?

If you want to disable the internal sound card, just copy/paste the line provided in my previous post. You have to reboot and check with lsmod that the module snd_hda_intel is not loaded anymore.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 490
  • Last login:Yesterday at 10:15:54 am
  • Z80 ERROR
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #4 on: October 29, 2019, 02:58:46 pm »

Hi,

If you know the module use by your internal audio chip you can blacklist it in the /etc/modprobe.d/blacklist.conf file.

Eg. if you are using intel hda chipset (check with lspci or lsmod) insert he following line in the file:
Code: [Select]
blacklist snd_hda_intel

Thanks. The LSPCI command shows "Cedar HDMI Audio". The LSMOD command gives results that are largely unreadable on a 15 KHz arcade monitor in an interlaced mode. Since I know next to nothing about Linux, I don't know how to copy the text and save it to the USB flash drive so I can open it on my main PC to read it. I managed to paste it into Vim, but there's no menu and the methods to save that I found on Google aren't working. Then I tried creating a blank file on the USB drive, and when I opened it, I got some sort of text editor, which actually has a menu, but the copied text from Xterm simply won't paste into it like it did into Vim (I tried shift + insert, as well as "paste" from the menu; nothing happened in either case). I'm out of ideas on how to make the LSMOD results readable, since the program I can paste the results into won't save, and the program that will save won't let me paste the results into it.

Edit: I found a command that will send the output of a command (such as LSMOD) directly to a text file:

LSMOD > output.txt

But trying to type ">" results in a colon (":") being typed instead, and there's nothing wrong with my keyboard. It's like I'm in the Twilight Zone or something. So I made a text file on this PC with "LSMOD > output.txt" typed in it, then I opened it on the GroovyArcade PC, copied and pasted it into Xterm (amazing that copy and paste actually worked in this particular scenario), and finally I was able to get the results of the LSMOD command saved to a text file. In any case, does this look like the name of the module to blacklist?

snd_hda_codec_hdmi

Edit 2: I added the line...

blacklist snd_hda_codec_hdmi

... to the /etc/modprobe.d/blacklist.conf file, saved it, reopened it to confirm it was actually saved, and it was, and, it didn't work. The first time I booted after doing that there was sound, but there was usually sound before anyway. The second time I booted there was no sound, so it's still doing the same thing as before. Also, the HDMI audio option is still there in the default sound card menu.



The "blacklist lp" line was already there by default.

Edit 3: This is the output from the LSMOD command:

Code: [Select]
Module                  Size  Used by
nls_iso8859_1          16384  1
nls_cp437              20480  1
vfat                   20480  1
fat                    81920  1 vfat
forcedeth              77824  0
mousedev               24576  0
snd_hda_codec_hdmi     61440  1
snd_intel8x0           49152  0
snd_hda_intel          49152  0
snd_hda_codec         155648  2 snd_hda_codec_hdmi,snd_hda_intel
snd_ac97_codec        151552  1 snd_intel8x0
snd_mpu401             16384  0
snd_hda_core           98304  3 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec
snd_mpu401_uart        16384  1 snd_mpu401
ac97_bus               16384  1 snd_ac97_codec
snd_hwdep              16384  1 snd_hda_codec
psmouse               172032  0
edac_mce_amd           28672  0
snd_pcm               135168  6 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_intel8x0,snd_ac97_codec,snd_hda_core
snd_rawmidi            40960  1 snd_mpu401_uart
ppdev                  24576  0
k8temp                 16384  0
pcspkr                 16384  0
snd_seq_device         16384  1 snd_rawmidi
snd_timer              40960  1 snd_pcm
ns558                  16384  0
snd                   102400  12 snd_seq_device,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_mpu401,snd_hda_codec,snd_intel8x0,snd_timer,snd_ac97_codec,snd_mpu401_uart,snd_pcm,snd_rawmidi
soundcore              16384  1 snd
i2c_nforce2            20480  0
input_leds             16384  0
gameport               16384  2 ns558
asus_atk0110           24576  0
evdev                  20480  9
mac_hid                16384  0
parport_pc             53248  0
parport                61440  2 parport_pc,ppdev
crypto_user            20480  0
ip_tables              32768  0
x_tables               49152  1 ip_tables
ext4                  749568  1
crc32c_generic         16384  2
crc16                  16384  1 ext4
mbcache                16384  1 ext4
jbd2                  131072  1 ext4
fscrypto               32768  1 ext4
hid_generic            16384  0
usbhid                 61440  0
hid                   143360  2 usbhid,hid_generic
uas                    28672  0
usb_storage            73728  2 uas
sr_mod                 28672  0
cdrom                  73728  1 sr_mod
sd_mod                 57344  3
ata_generic            16384  0
serio_raw              20480  0
atkbd                  36864  0
libps2                 20480  2 atkbd,psmouse
pata_acpi              16384  0
sata_nv                36864  0
pata_amd               24576  1
libata                278528  4 pata_amd,pata_acpi,ata_generic,sata_nv
ohci_pci               20480  0
ehci_pci               20480  0
scsi_mod              258048  5 sd_mod,usb_storage,uas,libata,sr_mod
ohci_hcd               57344  1 ohci_pci
ehci_hcd               98304  1 ehci_pci
floppy                 90112  0
i8042                  32768  0
serio                  28672  6 serio_raw,atkbd,psmouse,i8042
nouveau              2195456  0
mxm_wmi                16384  1 nouveau
wmi                    32768  2 mxm_wmi,nouveau
radeon               1638400  4
i2c_algo_bit           16384  2 radeon,nouveau
drm_kms_helper        208896  2 radeon,nouveau
syscopyarea            16384  1 drm_kms_helper
sysfillrect            16384  1 drm_kms_helper
sysimgblt              16384  1 drm_kms_helper
fb_sys_fops            16384  1 drm_kms_helper
ttm                   110592  2 radeon,nouveau
drm                   499712  7 drm_kms_helper,radeon,ttm,nouveau
agpgart                53248  3 ttm,nouveau,drm
Hi,

Blacklisting a codec will not work, you have to blacklist the sound driver.
Now I am a bit confused by what you are trying to acheived. Do you want to disable the onboard sound card or the ati HDMI output?

If you want to disable the internal sound card, just copy/paste the line provided in my previous post. You have to reboot and check with lsmod that the module snd_hda_intel is not loaded anymore.
Browsing forum with tapatalk did not ease the reading of threads. My fault :/

After reading back your initial post, I understand now that you want to disable the HDMI output.

This can be done by specifying the default output (pcm) inside the .asoundrc file in your home directory.

Use "aplay -l" to list the card(s)  and identify the output number.

Edit either the home ~/.asoundrc or system /etc/asound.conf file.

Put the following lines (update the numbers accordingly to your aplay output)
Code: [Select]
defaults.pcm.card 1
defaults.pcm.device 0

No need to blacklist something here.
Now reboot and you should have pcm output as default.

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:December 03, 2019, 06:41:08 pm
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #5 on: October 29, 2019, 10:12:42 pm »

Browsing forum with tapatalk did not ease the reading of threads. My fault :/

After reading back your initial post, I understand now that you want to disable the HDMI output.

This can be done by specifying the default output (pcm) inside the .asoundrc file in your home directory.

Use "aplay -l" to list the card(s)  and identify the output number.

Edit either the home ~/.asoundrc or system /etc/asound.conf file.

Put the following lines (update the numbers accordingly to your aplay output)
Code: [Select]
defaults.pcm.card 1
defaults.pcm.device 0

No need to blacklist something here.
Now reboot and you should have pcm output as default.

Is that doing something different than setting the default sound card in the normal settings?



I've set the default soundcard to the NVidia-CK804 onboard audio many times now (I don't know why two NVidia-CK804s are listed, but choosing either one works) and it keeps going back to HDA-ATI audio after one, or a couple, or a few, or several reboots. I don't want the option for it to try to use HDMI audio to even exist anymore, i.e., I want it to be completely unaware that my video card has HDMI audio. I've never used HDMI audio nor do I ever intend to. Nothing is connected to my video card's HDMI port. I couldn't use HDMI audio even if I wanted to (which I definitely don't), because I don't have anything in my arcade cabinet that can decode an HDMI signal.

If it's possible to blacklist the HDMI audio driver, then that's what I want to do. If "snd_hda_codec_hdmi" isn't the right name to blacklist, then what is?

Trying to use this build of Linux is a nightmare. Apparently the keyboard layout is set to some foreign country's layout, and in the settings there's no option to select anything different (the only option is the one it's currently set to: "es" or something like that), so a lot of the characters either can't be typed at all or are located on different keys than on a U.S. keyboard. Alt codes don't seem to work in Xterm, and pasting into Xterm only seems to work when it wants to.

Okay, it seems that you have to copy text using Shift + Prt Scr in order to paste into Xterm (using Shift + Insert). If you copy it using Geany's menu's copy command, you can paste it back into Geany, but not into Xterm, which is incredibly bizarre. I did some research and it turns out that even something as basic as copy and paste is convoluted in Linux, i.e., multiple ways to copy, multiple ways to paste, and lots of incompatibilities among them. In any case, this is the output of "aplay -l":

Code: [Select]
**** List of PLAYBACK Hardware Devices ****
card 0: CK804 [NVidia CK804], device 0: Intel ICH [NVidia CK804]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: CK804 [NVidia CK804], device 2: Intel ICH - IEC958 [NVidia CK804 - IEC958]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 2: HDMI [HDA ATI HDMI], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

And this is what's currently in my home ~/.asoundrc file:

Code: [Select]
defaults.pcm.card 0
defaults.ctl.card 0

You said to "update the numbers accordingly to your aplay output" but I'm not sure what you mean by that. It appears that it's currently set to card 0 as the default, which is NVidia CK804, which is good, but when it decides to change to HDMI as the default, I assume that's going to change. That's why I want to completely eliminate HDMI audio from the equation (i.e., blacklist it if I can, or better yet, completely delete the HDMI driver), because, due to a bug of some sort, it refuses to keep NVidia CK804 as the permanent default.
« Last Edit: October 29, 2019, 10:19:47 pm by MaximRecoil »

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 490
  • Last login:Yesterday at 10:15:54 am
  • Z80 ERROR
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #6 on: October 30, 2019, 03:16:21 am »
I do not know what changes are operated by the selection of the sound cards from the application. But it must set parameters either in the /etc/asound.conf or ~/.asoundrc files.

The IEC958 is for the digital portion of the card. You are using the analog part (NVidia CK804 card) therefore you don't need to worry about it.

It might be possible that the audio card order is reshuffled after a reboot. In such a case, it is preferable to use the card names instead of their id number.

Please try the following, empty /etc/asound.conf file with the following inside the ~/.asoundrc (/home/arcade/.asoundrc if you use groovyarcade distro)

Code: [Select]
pcm.!default {
    type hw
    card CK804
}

ctl.!default {
    type hw
    card CK804
}

It might still not work due to your system having several cards of the same name.

A second method consist of disabling the radeon sound from the kernel directly. If you are using syslinux, edit the file /boot/syslinux/syslinux.cfg and add "radeon.audio=0" to the append line.

Code: [Select]
append root=/[...]  radeon.audio=0


MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:December 03, 2019, 06:41:08 pm
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #7 on: October 30, 2019, 06:04:34 am »
I do not know what changes are operated by the selection of the sound cards from the application. But it must set parameters either in the /etc/asound.conf or ~/.asoundrc files.

The IEC958 is for the digital portion of the card. You are using the analog part (NVidia CK804 card) therefore you don't need to worry about it.

It might be possible that the audio card order is reshuffled after a reboot. In such a case, it is preferable to use the card names instead of their id number.

Please try the following, empty /etc/asound.conf file with the following inside the ~/.asoundrc (/home/arcade/.asoundrc if you use groovyarcade distro)

Code: [Select]
pcm.!default {
    type hw
    card CK804
}

ctl.!default {
    type hw
    card CK804
}

So far this is working, but I don't know yet if it's a permanent fix or not. I've rebooted 10 times so far and the audio has worked every time, which is very promising. I noticed that it made a change in the sound card selection screen. Before, the 2 NVidia-CK804 entries had a "0" before them and the HDA-ATI entry had a "2" (like in the picture I posted in my previous post). Now, after making that change to the asoundrc file, it is the opposite, i.e., the 2 NVidia-CK804 entries have a "2" and the HDA-ATI entry has a "0."

Quote
It might still not work due to your system having several cards of the same name.

My PC actually only has 1 discrete card, which is the video card (AMD Radeon HD 5450). Unfortunately, that video card has an HDMI port which can output both video and audio, which is where that troublesome HDMI audio "sound card" option is coming from. The "NVidia-CK804" option is, in a roundabout way, referring to my motherboard's onboard audio hardware, which is actually Realtek ALC850, which is part of the motherboard's Nvidia nForce4 chipset, which Linux is referring to as "NVidia-CK804."

Quote
A second method consist of disabling the radeon sound from the kernel directly. If you are using syslinux, edit the file /boot/syslinux/syslinux.cfg and add "radeon.audio=0" to the append line.

Code: [Select]
append root=/[...]  radeon.audio=0

I tried that first, but it wouldn't let me save changes to the syslinux.cfg file; it said I didn't have permission. I then logged in as root and it still said I didn't have permission to change that file. At least, I think I logged in as root. I closed the syslinux.cfg file, opened Xterm, typed "su root", it asked for my password, I typed it in, and it accepted it.

By the way, do you know why the keyboard doesn't work right when in the Linux shell or LXDE frontend? Most, if not all of the non-letter characters, such as > _ = and so are not on the correct keys, or don't seem to exist at all.

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:Today at 05:43:03 am
  • Forking GroovyArcade
    • GroovyArcade active fork
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #8 on: October 30, 2019, 06:43:26 am »
Quote
I tried that first, but it wouldn't let me save changes to the syslinux.cfg file
You should sudo the command, like sudo vi /boot/syslinux/syslinux.cfg (vi or nano or any other installed editor)

Haven't tried, but in the gasetup menu, don't you have an option to tweak audio ? or it's just alsamixer ?

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:December 03, 2019, 06:41:08 pm
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #9 on: October 30, 2019, 07:01:23 am »
Quote
I tried that first, but it wouldn't let me save changes to the syslinux.cfg file
You should sudo the command, like sudo vi /boot/syslinux/syslinux.cfg (vi or nano or any other installed editor)

Thanks. I'll try that if the change I made to the asoundrc stops working.

Quote
Haven't tried, but in the gasetup menu, don't you have an option to tweak audio ? or it's just alsamixer ?

There are 4 options in the Audio Setup Menu section of gasetup:

1. Default Card
2. Change Volume
3. AlsaMixer
4. Audio Latency MAME

"Default Card" is the one I've used the most, since I've had to change the default back to onboard audio every time it has decided to default to HDMI audio.

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:Today at 05:43:03 am
  • Forking GroovyArcade
    • GroovyArcade active fork
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #10 on: October 30, 2019, 08:01:44 am »
Default Audio is the one that should do the trick. I'll have a look at the code from gasetup in the next days, I may eventually try to reproduce the problem. If you ever have time

Do I correctly assume that your monitor is plugged on HDMI ? As for me I do have a ASUS HD5450, audio is always on MB sound outputs, my monitor is plugged on DVI or VGA.

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:December 03, 2019, 06:41:08 pm
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #11 on: October 30, 2019, 08:59:27 am »
Default Audio is the one that should do the trick. I'll have a look at the code from gasetup in the next days, I may eventually try to reproduce the problem. If you ever have time

Like I said in my previous post, "Default Card" is the one I've used the most, since I've had to change the default back to onboard audio every time it has decided to default to HDMI audio. That's the entire problem which prompted this thread, i.e., that the default card that I set doesn't "stick." For example, the PC boots and the Attract-Mode frontend is silent (it normally has background music so if it's silent something is wrong), and of course, any game I play is silent too. So I exit out of the frontend into the gasetup menus, go into the Audio Setup Menu > Default Card, select NVidia-CK804 again, then start the Attract-Mode frontend again, and the audio works. Then it might continue to work for one, a few, or several reboots, then it doesn't work again. Rinse and repeat. However, since I made the change to the asoundrc file that Doozer suggested, the audio has worked for over 10 reboots, so it might be permanently fixed now.

Quote
Do I correctly assume that your monitor is plugged on HDMI ? As for me I do have a ASUS HD5450, audio is always on MB sound outputs, my monitor is plugged on DVI or VGA.

No. My monitor is plugged into the HD 5450's VGA port. As I mentioned in reply #5, there's nothing plugged into its HDMI port, as there is nothing in my arcade cabinet which can make use of an HDMI signal, which is digital. My monitor is a Happ Vision Pro ~15 KHz CRT arcade monitor, so it takes an RGB signal which is analog. My audio amplifier is simply an amplifier, nothing more (it doesn't even have a built-in power supply). It takes an analog audio signal via a jack for a 1/8" stereo phone plug (TRS connector). In order to make use of an HDMI signal, you need more than just an amplifier, you also a need a digital-to-analog converter ("DAC") with an HDMI port. Some devices have an amplifier and a DAC stuffed into a single enclosure, but they are still more than just an amplifier. In the case of the normal analog audio output from a PC, the DAC is built into the PC's audio chipset, so all you need is an ordinary patch cable, amplifier, power supply, speaker wires, and speakers to hear sound.

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:Today at 05:43:03 am
  • Forking GroovyArcade
    • GroovyArcade active fork
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #12 on: October 30, 2019, 09:15:36 am »
If doozer's suggestion works fine, this could mean :
- either your .asoundrc was messed for God knows which reason (should compare them when you face the issue)
- audio cards change order
- gasetup needs some improvement to setup the sound card

Somewhere here

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 490
  • Last login:Yesterday at 10:15:54 am
  • Z80 ERROR
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #13 on: October 30, 2019, 09:19:08 am »
By the way, do you know why the keyboard doesn't work right when in the Linux shell or LXDE frontend? Most, if not all of the non-letter characters, such as > _ = and so are not on the correct keys, or don't seem to exist at all.

Yes I know :) It is because the system locale are set to a specific country with a different keyboard layout.

You can check current settings with the command "locale". You can set a different keyboard layout by checking available sets using the "localectl list-keymaps" command. You can load a new keymaps with "loadkeys" but it will not be boot persistent.
To make it persistent in the "/etc/vconsole.conf" file. If you don't have one, it reverts to US be default.

File " /etc/vconsole.conf
Code: [Select]
KEYMAP=us

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:December 03, 2019, 06:41:08 pm
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #14 on: October 30, 2019, 09:26:19 am »
If doozer's suggestion works fine, this could mean :
- either your .asoundrc was messed for God knows which reason (should compare them when you face the issue)
- audio cards change order
- gasetup needs some improvement to setup the sound card

Somewhere here

Before I changed the .asoundsrc file to what Doozer suggested in reply #6, it was like this:

Code: [Select]
defaults.pcm.card 0
defaults.ctl.card 0

I don't know if that was while the default I had set in gasetup was still "sticking" or not.

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:December 03, 2019, 06:41:08 pm
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #15 on: October 30, 2019, 09:42:18 am »
By the way, do you know why the keyboard doesn't work right when in the Linux shell or LXDE frontend? Most, if not all of the non-letter characters, such as > _ = and so are not on the correct keys, or don't seem to exist at all.

Yes I know :) It is because the system locale are set to a specific country with a different keyboard layout.

You can check current settings with the command "locale". You can set a different keyboard layout by checking available sets using the "localectl list-keymaps" command. You can load a new keymaps with "loadkeys" but it will not be boot persistent.
To make it persistent in the "/etc/vconsole.conf" file. If you don't have one, it reverts to US be default.

File " /etc/vconsole.conf
Code: [Select]
KEYMAP=us

I changed it to KEYMAP=us (it was originally KEYMAP=es), rebooted, opened the vconsole.conf file again to confirm that it still said "KEYMAP=us", and it did, but it didn't have any effect. The non-letter characters are still wrong; wrong in exactly the same way as before.

Doozer

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 490
  • Last login:Yesterday at 10:15:54 am
  • Z80 ERROR
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #16 on: October 30, 2019, 09:45:18 am »
I changed it to KEYMAP=us (it was originally KEYMAP=es), rebooted, opened the vconsole.conf file again to confirm that it still said "KEYMAP=us", and it did, but it didn't have any effect. The non-letter characters are still wrong; wrong in exactly the same way as before.

Are you under X ? vconsole is for console text output only. Otherwise you should look at the "setxkbmap" command, and perhaps check the .xinit file as well.

Code: [Select]
setxkbmap -model pc105 -layout us -variant altgr-intl

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:Today at 05:43:03 am
  • Forking GroovyArcade
    • GroovyArcade active fork
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #17 on: October 30, 2019, 09:53:40 am »
GroovyArcade has an option in setup/system to set the keyboard. In my case, setting it to fr-pc works perfect.

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:December 03, 2019, 06:41:08 pm
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #18 on: October 30, 2019, 10:40:46 am »
I changed it to KEYMAP=us (it was originally KEYMAP=es), rebooted, opened the vconsole.conf file again to confirm that it still said "KEYMAP=us", and it did, but it didn't have any effect. The non-letter characters are still wrong; wrong in exactly the same way as before.

Are you under X ? vconsole is for console text output only.

I did the typing test in the LXDE frontend. I just tried it after exiting to shell, and all the keys do work correctly in the shell.

Quote
Otherwise you should look at the "setxkbmap" command, and perhaps check the .xinit file as well.

Code: [Select]
setxkbmap -model pc105 -layout us -variant altgr-intl

Thanks! That worked.

By the way, something weird happened while I was doing that. While walking to my arcade cabinet my foot caught on the keyboard cable and unplugged it (it's a USB keyboard). I plugged it back in and started typing in the setxbmap changes (in the LXDE frontend, in Geany) and I noticed that the "-" key was working correctly, so I tested the other non-letter character keys and those were all correct too. So I closed the .xinit file without saving changes and rebooted, but when I tested it after the reboot in LXDE, it was back to the foreign keyboard layout. So I made your suggested change to the .xinit file, and that worked even after a reboot.

In the next build on GroovyArcade, maybe there could be an easier way of selecting the keyboard layout. Currently, in the gasetup menus, you can delete the default "es" and type in "us" instead, but that only changes it from KEYMAP=es to KEYMAP=us in the vconsole.conf file, which means it will still have a foreign layout if you are typing in the LXDE frontend (unless you do the "trick" that I accidentally discovered with my foot, but that won't stick after a reboot).

The audio is still working and now the keyboard layout is correct, so I'm all set for now. Thanks for all the help. I plan to use a newer PC for GroovyArcade soon (though I'll still be using the same HD 5450 video card), so I hope that doesn't introduce a new batch of issues.

GroovyArcade has an option in setup/system to set the keyboard. In my case, setting it to fr-pc works perfect.

Yeah, that's what I used to change it from KEYMAP=es to KEYMAP=us in the vconsole.conf file, but since it only changes it in the vconsole.conf file and does nothing to the .xinit file, you end up with the correct keyboard layout in the shell but you still have a foreign layout in the LXDE frontend.
« Last Edit: October 30, 2019, 10:43:41 am by MaximRecoil »

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:Today at 05:43:03 am
  • Forking GroovyArcade
    • GroovyArcade active fork
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #19 on: October 30, 2019, 11:24:36 am »
weird, gasetup does tell me that it changed the xkbmap ... will try again this evening and confirm.

MaximRecoil

  • Trade Count: (+1)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 1729
  • Last login:December 03, 2019, 06:41:08 pm
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #20 on: October 30, 2019, 11:50:48 am »
weird, gasetup does tell me that it changed the xkbmap ... will try again this evening and confirm.

It definitely didn't change it for me. After using gasetup to change the vconsole.conf file from KEYMAP=es to KEYMAP=us, when I opened the .xinit file it said "setxkbmap es", which I changed to "setxkbmap -model pc105 -layout us -variant altgr-intl" as suggested by Doozer.

Substring

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 201
  • Last login:Today at 05:43:03 am
  • Forking GroovyArcade
    • GroovyArcade active fork
Re: GroovyArcade keeps defaulting to HDMI audio
« Reply #21 on: October 30, 2019, 04:10:00 pm »
My very bad, this does work on my GroovyArcade version though .. Changed the keyboard to us, and had the expected result (see attachment). This indeed doesn't work in the original groovyarcade. Rather change, i haven't changed any code in gasetup regarding that part ...