View previous topic :: View next topic |
Author |
Message |
tomg_66 n00b
Joined: 08 Nov 2014 Posts: 18
|
Posted: Tue Jun 16, 2015 4:16 am Post subject: automatic switch to hdmi audio output |
|
|
all,
I'm trying to get alsa to switch audio output from my internal laptop speakers to the hdmi output. I was going to put in a udev rule to execute a script to make the change, but i don't get any events when I plug/unplug the hdmi cable. I am running the proprietary NVidia video driver. X notices the cable switch and sends video to the hdmi display land to my laptop screen appropriately. I can manually change my /etc/asound.conf, so I know that works too. What event can i capture to automatically switch the audio?
output of lspci:
Code: |
$ /usr/sbin/lspci
00:00.0 Host bridge: Intel Corporation Core Processor DRAM Controller (rev 02)
00:01.0 PCI bridge: Intel Corporation Core Processor PCI Express x16 Root Port (rev 02)
00:1a.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1b.0 Audio device: Intel Corporation 5 Series/3400 Series Chipset High Definition Audio (rev 05)
00:1c.0 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 1 (rev 05)
00:1c.1 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 2 (rev 05)
00:1c.4 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 5 (rev 05)
00:1c.7 PCI bridge: Intel Corporation 5 Series/3400 Series Chipset PCI Express Root Port 8 (rev 05)
00:1d.0 USB controller: Intel Corporation 5 Series/3400 Series Chipset USB2 Enhanced Host Controller (rev 05)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev a5)
00:1f.0 ISA bridge: Intel Corporation Mobile 5 Series Chipset LPC Interface Controller (rev 05)
00:1f.2 SATA controller: Intel Corporation 5 Series/3400 Series Chipset 6 port SATA AHCI Controller (rev 05)
00:1f.3 SMBus: Intel Corporation 5 Series/3400 Series Chipset SMBus Controller (rev 05)
00:1f.6 Signal processing controller: Intel Corporation 5 Series/3400 Series Chipset Thermal Subsystem (rev 05)
01:00.0 VGA compatible controller: NVIDIA Corporation GT218M [GeForce G 105M] (rev a2)
01:00.1 Audio device: NVIDIA Corporation High Definition Audio Controller (rev a1)
02:00.0 Network controller: Broadcom Corporation BCM43225 802.11b/g/n (rev 01)
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
04:00.0 FireWire (IEEE 1394): JMicron Technology Corp. IEEE 1394 Host Controller
04:00.1 System peripheral: JMicron Technology Corp. SD/MMC Host Controller
04:00.2 SD Host controller: JMicron Technology Corp. Standard SD Host Controller
04:00.3 System peripheral: JMicron Technology Corp. MS Host Controller
04:00.4 System peripheral: JMicron Technology Corp. xD Host Controller
ff:00.0 Host bridge: Intel Corporation Core Processor QuickPath Architecture Generic Non-core Registers (rev 02)
ff:00.1 Host bridge: Intel Corporation Core Processor QuickPath Architecture System Address Decoder (rev 02)
ff:02.0 Host bridge: Intel Corporation Core Processor QPI Link 0 (rev 02)
ff:02.1 Host bridge: Intel Corporation 1st Generation Core Processor QPI Physical 0 (rev 02)
ff:02.2 Host bridge: Intel Corporation 1st Generation Core Processor Reserved (rev 02)
ff:02.3 Host bridge: Intel Corporation 1st Generation Core Processor Reserved (rev 02)
|
output of lsmod:
Code: |
$ lsmod
Module Size Used by
bnep 10116 2
bluetooth 279013 5 bnep
snd_hda_codec_hdmi 36671 1
snd_hda_codec_idt 43588 1
snd_hda_codec_generic 50958 1 snd_hda_codec_idt
brcmsmac 503306 0
cordic 1024 1 brcmsmac
nvidia 10499311 45
brcmutil 4613 1 brcmsmac
b43 418666 0
uvcvideo 71260 0
ssb 46546 1 b43
videobuf2_vmalloc 2800 1 uvcvideo
videobuf2_memops 1607 1 videobuf2_vmalloc
videobuf2_core 32827 1 uvcvideo
v4l2_common 3914 1 videobuf2_core
videodev 122912 3 uvcvideo,v4l2_common,videobuf2_core
media 11273 2 uvcvideo,videodev
coretemp 5884 0
kvm_intel 132963 0
bcma 33647 2 b43,brcmsmac
firewire_ohci 31579 0
nvidiafb 37209 0
firewire_core 50473 1 firewire_ohci
kvm 385016 1 kvm_intel
hp_wmi 6750 0
crc_itu_t 1275 1 firewire_core
vgastate 8649 1 nvidiafb
fb_ddc 1309 1 nvidiafb
r8169 67980 0
hp_accel 16998 0
lpc_ich 13952 0
lis3lv02d 10619 1 hp_accel
joydev 9447 0
snd_hda_intel 21675 4
snd_hda_controller 18139 1 snd_hda_intel
snd_hda_codec 94900 5 snd_hda_codec_hdmi,snd_hda_codec_idt,snd_hda_codec_generic,snd_hda_intel,snd_hda_controller
snd_hwdep 6084 1 snd_hda_codec
snd_pcm 78076 4 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel,snd_hda_controller
intel_ips 11316 0
shpchp 24857 0
mfd_core 3193 1 lpc_ich
|
drm and kms kernel variables:
Code: | # cat .config | egrep -i "kms|drm"
CONFIG_DRM=y
CONFIG_DRM_KMS_HELPER=m
CONFIG_DRM_KMS_FB_HELPER=y
# CONFIG_DRM_LOAD_EDID_FIRMWARE is not set
CONFIG_DRM_TTM=m
# CONFIG_DRM_I2C_CH7006 is not set
# CONFIG_DRM_I2C_SIL164 is not set
# CONFIG_DRM_I2C_NXP_TDA998X is not set
# CONFIG_DRM_PTN3460 is not set
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
# CONFIG_DRM_RADEON is not set
# CONFIG_DRM_NOUVEAU is not set
# CONFIG_DRM_I810 is not set
CONFIG_DRM_I915=m
CONFIG_DRM_I915_KMS=y
CONFIG_DRM_I915_FBDEV=y
# CONFIG_DRM_I915_PRELIMINARY_HW_SUPPORT is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
CONFIG_DRM_VMWGFX=m
# CONFIG_DRM_VMWGFX_FBCON is not set
# CONFIG_DRM_GMA500 is not set
# CONFIG_DRM_UDL is not set
# CONFIG_DRM_AST is not set
# CONFIG_DRM_MGAG200 is not set
# CONFIG_DRM_CIRRUS_QEMU is not set
# CONFIG_DRM_QXL is not set
# CONFIG_DRM_BOCHS is not set
|
|
|
Back to top |
|
|
mir3x Guru
Joined: 02 Jun 2012 Posts: 455
|
Posted: Thu Jun 18, 2015 8:28 pm Post subject: |
|
|
u have:
Support jack plugging notification via input layer (SND_HDA_INPUT_JACK)
in sound card -> ALSA -> HD-Audio
so maybe u can switch depending if jack is plugged or not. _________________ Sent from Windows |
|
Back to top |
|
|
tomg_66 n00b
Joined: 08 Nov 2014 Posts: 18
|
Posted: Fri Jun 19, 2015 4:05 pm Post subject: |
|
|
yes.... output from config file
Code: |
# cat .config | grep JACK
CONFIG_SND_JACK=y
CONFIG_SND_KCTL_JACK=y
CONFIG_SND_HDA_INPUT_JACK=y
|
what would i do to get a jack notification then? |
|
Back to top |
|
|
mir3x Guru
Joined: 02 Jun 2012 Posts: 455
|
Posted: Sun Jun 21, 2015 5:56 pm Post subject: |
|
|
nvm, I found solution there with udev
https://bbs.archlinux.org/viewtopic.php?id=132641
if it doesnt work u can try script with
nvidia-settings -q dpys and greping for hdmi and connected and some dirty script _________________ Sent from Windows |
|
Back to top |
|
|
tomg_66 n00b
Joined: 08 Nov 2014 Posts: 18
|
Posted: Sun Jun 28, 2015 6:18 pm Post subject: |
|
|
well, that's the issue, as i said in my first post, i don't get a udev message when i plug/unplug the cable. unless i need something in there before i use
udevadm monitor
nothing happens.
Tom |
|
Back to top |
|
|
tomg_66 n00b
Joined: 08 Nov 2014 Posts: 18
|
Posted: Sun Jul 12, 2015 3:35 pm Post subject: |
|
|
sooo....... no ideas? any reason i'm not getting a udev event? |
|
Back to top |
|
|
|