Chinaunix首页 | 论坛 | 博客
  • 博客访问: 529536
  • 博文数量: 116
  • 博客积分: 2063
  • 博客等级: 大尉
  • 技术积分: 1174
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-26 16:44
个人简介

none

文章分类

全部博文(116)

文章存档

2023年(2)

2020年(3)

2019年(4)

2018年(7)

2017年(6)

2016年(17)

2015年(13)

2014年(19)

2013年(6)

2012年(13)

2011年(5)

2010年(11)

2008年(10)

分类: LINUX

2018-08-13 16:10:04

REFER 2
[root@localhost ~]# lspci  -v -s 00:1f.3
00:1f.3 Audio device: Intel Corporation Device 9d71 (rev 21)
        Subsystem: Intel Corporation Device 7270
        Flags: bus master, fast devsel, latency 32, IRQ 128
        Memory at df120000 (64-bit, non-prefetchable) [size=16K]
        Memory at df100000 (64-bit, non-prefetchable) [size=64K]
        Capabilities: [50] Power Management version 3
        Capabilities: [60] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel, snd_soc_skl
[root@localhost ~]# 
[root@localhost ~]# pactl list sinks |grep "名称" |grep "output"
        名称:alsa_output.pci-0000_00_1f.3.analog-stereo
[root@localhost ~]# 
[root@localhost ~]# pactl list sources |grep "名称" |grep "input"            
        名称:alsa_input.pci-0000_00_1f.3.analog-stereo
=================================================================   
查询声音输出的大小
pactl list sinks |grep "音量"
设置声音输出的大小
pactl set-sink-volume alsa_output.pci-0000_00_1f.3.analog-stereo 20%   OR  pactl set-sink-volume 0 20%

查询声音输入的大小
[root@localhost ~]# pactl list sources |grep "音量:front-left:" 
        音量:front-left: 21626 /  33% / -28.89 dB,   front-right: 21626 /  33% / -28.89 dB
        音量:front-left: 28180 /  43% / -21.99 dB,   front-right: 28180 /  43% / -21.99 dB
设置声音输入的大小        
pactl set-source-volume alsa_input.pci-0000_00_1f.3.analog-stereo 25%  OR  pactl set-source-volume 1 25%
====================================================================
[root@localhost ~]# 
[root@localhost ~]# pactl set-sink-volume 0 20%                 
[root@localhost ~]# 
[root@localhost ~]# pactl list sinks |grep "音量"               
        音量:front-left: 13107 /  20% / -41.94 dB,   front-right: 13107 /  20% / -41.94 dB
        基础音量:65536 / 100% / 0.00 dB
[root@localhost ~]# pactl set-source-volume 0 74%               
[root@localhost ~]# pactl set-source-volume 1 47% 
[root@localhost ~]# pactl list sources |grep "音量:front-left:"
        音量:front-left: 48496 /  74% / -7.85 dB,   front-right: 48496 /  74% / -7.85 dB
        音量:front-left: 30801 /  47% / -19.67 dB,   front-right: 30801 /  47% / -19.67 dB
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# pactl list sinks
信宿 #0
        状态:RUNNING
        名称:alsa_output.pci-0000_00_1f.3.analog-stereo
        描述:内置音频 模拟立体声
        驱动程序:module-alsa-card.c
        采样规格:s16le 2ch 44100Hz
        声道映射:front-left,front-right
        所有者模块:6
        静音:否
        音量:front-left: 19660 /  30% / -31.37 dB,   front-right: 19660 /  30% / -31.37 dB
                平衡 0.00
        基础音量:65536 / 100% / 0.00 dB
        监视器信源:alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
        延迟:54244 微秒,设置为 80000 微秒
        标记:HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
        属性:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC662 rev3 Analog"
                alsa.id = "ALC662 rev3 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf120000 irq 128"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "9d71"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "模拟立体声"
                device.description = "内置音频 模拟立体声"
                alsa.mixer_name = "Realtek ALC662 rev3"
                alsa.components = "HDA:10ec0662,10ec0000,00100300 HDA:8086280b,80860101,00100000"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        端口:
                analog-output-lineout: 线缆输出 (priority: 9900, available)
                analog-output-speaker: 扬声器 (priority: 10000, not available)
                analog-output-headphones: 模拟耳机 (priority: 9000, not available)
        活动端口:analog-output-lineout
        格式:
                pcm
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# pactl list sources
信源 #0
        状态:IDLE
        名称:alsa_output.pci-0000_00_1f.3.analog-stereo.monitor
        描述:Monitor of 内置音频 模拟立体声
        驱动程序:module-alsa-card.c
        采样规格:s16le 2ch 44100Hz
        声道映射:front-left,front-right
        所有者模块:6
        静音:否
        音量:front-left: 21626 /  33% / -28.89 dB,   front-right: 21626 /  33% / -28.89 dB
                平衡 0.00
        基础音量:65536 / 100% / 0.00 dB
        信宿的监视器:alsa_output.pci-0000_00_1f.3.analog-stereo
        延迟:0 微秒,已设置 2000000 微秒
        标记:DECIBEL_VOLUME LATENCY 
        属性:
                device.description = "Monitor of 内置音频 模拟立体声"
                device.class = "monitor"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf120000 irq 128"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "9d71"
                device.form_factor = "internal"
                device.string = "0"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        格式:
                pcm
信源 #1
        状态:SUSPENDED
        名称:alsa_input.pci-0000_00_1f.3.analog-stereo
        描述:内置音频 模拟立体声
        驱动程序:module-alsa-card.c
        采样规格:s16le 2ch 44100Hz
        声道映射:front-left,front-right
        所有者模块:6
        静音:否
        音量:front-left: 28180 /  43% / -21.99 dB,   front-right: 28180 /  43% / -21.99 dB
                平衡 0.00
        基础音量:6554 /  10% / -60.00 dB
        信宿的监视器:n/a
        延迟:0 微秒,已设置 0 微秒
        标记:HARDWARE HW_MUTE_CTRL HW_VOLUME_CTRL DECIBEL_VOLUME LATENCY 
        属性:
                alsa.resolution_bits = "16"
                device.api = "alsa"
                device.class = "sound"
                alsa.class = "generic"
                alsa.subclass = "generic-mix"
                alsa.name = "ALC662 rev3 Analog"
                alsa.id = "ALC662 rev3 Analog"
                alsa.subdevice = "0"
                alsa.subdevice_name = "subdevice #0"
                alsa.device = "0"
                alsa.card = "0"
                alsa.card_name = "HDA Intel PCH"
                alsa.long_card_name = "HDA Intel PCH at 0xdf120000 irq 128"
                alsa.driver_name = "snd_hda_intel"
                device.bus_path = "pci-0000:00:1f.3"
                sysfs.path = "/devices/pci0000:00/0000:00:1f.3/sound/card0"
                device.bus = "pci"
                device.vendor.id = "8086"
                device.vendor.name = "Intel Corporation"
                device.product.id = "9d71"
                device.form_factor = "internal"
                device.string = "front:0"
                device.buffering.buffer_size = "352800"
                device.buffering.fragment_size = "176400"
                device.access_mode = "mmap+timer"
                device.profile.name = "analog-stereo"
                device.profile.description = "模拟立体声"
                device.description = "内置音频 模拟立体声"
                alsa.mixer_name = "Realtek ALC662 rev3"
                alsa.components = "HDA:10ec0662,10ec0000,00100300 HDA:8086280b,80860101,00100000"
                module-udev-detect.discovered = "1"
                device.icon_name = "audio-card-pci"
        端口:
                analog-input-front-mic: 前麦克风 (priority: 8500, not available)
                analog-input-rear-mic: 后麦克风 (priority: 8200, available)
        活动端口:analog-input-rear-mic
        格式:
                pcm
[root@localhost ~]# 
阅读(4854) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~