Menu

Save the mixer settings of Alsamixer

You could also save the mixer settings into a custom file with alsactl:
alsactl --file ~/.config/asound.state store
Reloading:
alsactl --file ~/.config/asound.state restore
sample assound.state, tham khao search keyword: "headphone"
state.PCH {
 control.1 {
  iface MIXER
  name 'Headphone+LO Playback Volume'
  value.0 87
  value.1 87
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 87'
   dbmin -6525
   dbmax 0
   dbvalue.0 0
   dbvalue.1 0
  }
 }
 control.2 {
  iface MIXER
  name 'Line Out Playback Switch'
  value.0 true
  value.1 true
  comment {
   access 'read write'
   type BOOLEAN
   count 2
  }
 }
 control.3 {
  iface MIXER
  name 'Headphone Playback Switch'
  value.0 true
  value.1 true
  comment {
   access 'read write'
   type BOOLEAN
   count 2
  }
 }
 control.4 {
  iface MIXER
  name 'Speaker Playback Volume'
  value.0 0
  value.1 0
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 87'
   dbmin -6525
   dbmax 0
   dbvalue.0 -6525
   dbvalue.1 -6525
  }
 }
 control.5 {
  iface MIXER
  name 'Speaker Playback Switch'
  value.0 false
  value.1 false
  comment {
   access 'read write'
   type BOOLEAN
   count 2
  }
 }
 control.6 {
  iface MIXER
  name 'Loopback Mixing'
  value Disabled
  comment {
   access 'read write'
   type ENUMERATED
   count 1
   item.0 Disabled
   item.1 Enabled
  }
 }
 control.7 {
  iface MIXER
  name 'Headphone Mic Playback Volume'
  value.0 7
  value.1 7
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 31'
   dbmin -3450
   dbmax 1200
   dbvalue.0 -2400
   dbvalue.1 -2400
  }
 }
 control.8 {
  iface MIXER
  name 'Headphone Mic Playback Switch'
  value.0 true
  value.1 true
  comment {
   access 'read write'
   type BOOLEAN
   count 2
  }
 }
 control.9 {
  iface MIXER
  name 'Headset Mic Playback Volume'
  value.0 0
  value.1 0
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 31'
   dbmin -3450
   dbmax 1200
   dbvalue.0 -3450
   dbvalue.1 -3450
  }
 }
 control.10 {
  iface MIXER
  name 'Headset Mic Playback Switch'
  value.0 false
  value.1 false
  comment {
   access 'read write'
   type BOOLEAN
   count 2
  }
 }
 control.11 {
  iface MIXER
  name 'Auto-Mute Mode'
  value Disabled
  comment {
   access 'read write'
   type ENUMERATED
   count 1
   item.0 Disabled
   item.1 'Speaker Only'
   item.2 'Line Out+Speaker'
  }
 }
 control.12 {
  iface MIXER
  name 'Input Source'
  value 'Headset Mic'
  comment {
   access 'read write'
   type ENUMERATED
   count 1
   item.0 'Headphone Mic'
   item.1 'Headset Mic'
  }
 }
 control.13 {
  iface MIXER
  name 'Input Source'
  index 1
  value 'Headphone Mic'
  comment {
   access 'read write'
   type ENUMERATED
   count 1
   item.0 'Headphone Mic'
   item.1 'Headset Mic'
  }
 }
 control.14 {
  iface MIXER
  name 'Capture Volume'
  value.0 63
  value.1 63
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 63'
   dbmin -1725
   dbmax 3000
   dbvalue.0 3000
   dbvalue.1 3000
  }
 }
 control.15 {
  iface MIXER
  name 'Capture Switch'
  value.0 true
  value.1 true
  comment {
   access 'read write'
   type BOOLEAN
   count 2
  }
 }
 control.16 {
  iface MIXER
  name 'Capture Volume'
  index 1
  value.0 0
  value.1 0
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 63'
   dbmin -1725
   dbmax 3000
   dbvalue.0 -1725
   dbvalue.1 -1725
  }
 }
 control.17 {
  iface MIXER
  name 'Capture Switch'
  index 1
  value.0 false
  value.1 false
  comment {
   access 'read write'
   type BOOLEAN
   count 2
  }
 }
 control.18 {
  iface MIXER
  name 'Headphone Mic Boost Volume'
  value.0 0
  value.1 0
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 3'
   dbmin 0
   dbmax 3000
   dbvalue.0 0
   dbvalue.1 0
  }
 }
 control.19 {
  iface MIXER
  name 'Headset Mic Boost Volume'
  value.0 0
  value.1 0
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 3'
   dbmin 0
   dbmax 3000
   dbvalue.0 0
   dbvalue.1 0
  }
 }
 control.20 {
  iface MIXER
  name 'Master Playback Volume'
  value 59
  comment {
   access 'read write'
   type INTEGER
   count 1
   range '0 - 87'
   dbmin -6525
   dbmax 0
   dbvalue.0 -2100
  }
 }
 control.21 {
  iface MIXER
  name 'Master Playback Switch'
  value true
  comment {
   access 'read write'
   type BOOLEAN
   count 1
  }
 }
 control.22 {
  iface CARD
  name 'Headphone Mic Jack'
  value true
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.23 {
  iface CARD
  name 'Headset Mic Phantom Jack'
  value true
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.24 {
  iface CARD
  name 'Line Out Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.25 {
  iface CARD
  name 'Speaker Phantom Jack'
  value true
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.26 {
  iface MIXER
  name 'Beep Playback Volume'
  value.0 0
  value.1 0
  comment {
   access 'read write'
   type INTEGER
   count 2
   range '0 - 31'
   dbmin -3450
   dbmax 1200
   dbvalue.0 -3450
   dbvalue.1 -3450
  }
 }
 control.27 {
  iface MIXER
  name 'Beep Playback Switch'
  value.0 false
  value.1 false
  comment {
   access 'read write'
   type BOOLEAN
   count 2
  }
 }
 control.28 {
  iface PCM
  name 'Playback Channel Map'
  value.0 3
  value.1 4
  comment {
   access read
   type INTEGER
   count 2
   range '0 - 36'
  }
 }
 control.29 {
  iface PCM
  name 'Capture Channel Map'
  value.0 3
  value.1 4
  comment {
   access read
   type INTEGER
   count 2
   range '0 - 36'
  }
 }
 control.30 {
  iface PCM
  device 2
  name 'Capture Channel Map'
  value.0 0
  value.1 0
  comment {
   access read
   type INTEGER
   count 2
   range '0 - 36'
  }
 }
 control.31 {
  iface CARD
  name 'HDMI/DP,pcm=3 Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.32 {
  iface MIXER
  name 'IEC958 Playback Con Mask'
  value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access read
   type IEC958
   count 1
  }
 }
 control.33 {
  iface MIXER
  name 'IEC958 Playback Pro Mask'
  value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access read
   type IEC958
   count 1
  }
 }
 control.34 {
  iface MIXER
  name 'IEC958 Playback Default'
  value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access 'read write'
   type IEC958
   count 1
  }
 }
 control.35 {
  iface MIXER
  name 'IEC958 Playback Switch'
  value false
  comment {
   access 'read write'
   type BOOLEAN
   count 1
  }
 }
 control.36 {
  iface PCM
  device 3
  name ELD
  value ''
  comment {
   access 'read volatile'
   type BYTES
   count 0
  }
 }
 control.37 {
  iface CARD
  name 'HDMI/DP,pcm=7 Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.38 {
  iface MIXER
  name 'IEC958 Playback Con Mask'
  index 1
  value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access read
   type IEC958
   count 1
  }
 }
 control.39 {
  iface MIXER
  name 'IEC958 Playback Pro Mask'
  index 1
  value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access read
   type IEC958
   count 1
  }
 }
 control.40 {
  iface MIXER
  name 'IEC958 Playback Default'
  index 1
  value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access 'read write'
   type IEC958
   count 1
  }
 }
 control.41 {
  iface MIXER
  name 'IEC958 Playback Switch'
  index 1
  value true
  comment {
   access 'read write'
   type BOOLEAN
   count 1
  }
 }
 control.42 {
  iface PCM
  device 7
  name ELD
  value ''
  comment {
   access 'read volatile'
   type BYTES
   count 0
  }
 }
 control.43 {
  iface CARD
  name 'HDMI/DP,pcm=8 Jack'
  value false
  comment {
   access read
   type BOOLEAN
   count 1
  }
 }
 control.44 {
  iface MIXER
  name 'IEC958 Playback Con Mask'
  index 2
  value '0fff000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access read
   type IEC958
   count 1
  }
 }
 control.45 {
  iface MIXER
  name 'IEC958 Playback Pro Mask'
  index 2
  value '0f00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access read
   type IEC958
   count 1
  }
 }
 control.46 {
  iface MIXER
  name 'IEC958 Playback Default'
  index 2
  value '0400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000'
  comment {
   access 'read write'
   type IEC958
   count 1
  }
 }
 control.47 {
  iface MIXER
  name 'IEC958 Playback Switch'
  index 2
  value true
  comment {
   access 'read write'
   type BOOLEAN
   count 1
  }
 }
 control.48 {
  iface PCM
  device 8
  name ELD
  value ''
  comment {
   access 'read volatile'
   type BYTES
   count 0
  }
 }
 control.49 {
  iface PCM
  device 3
  name 'Playback Channel Map'
  value.0 0
  value.1 0
  value.2 0
  value.3 0
  value.4 0
  value.5 0
  value.6 0
  value.7 0
  comment {
   access 'read write'
   type INTEGER
   count 8
   range '0 - 36'
  }
 }
 control.50 {
  iface PCM
  device 7
  name 'Playback Channel Map'
  value.0 0
  value.1 0
  value.2 0
  value.3 0
  value.4 0
  value.5 0
  value.6 0
  value.7 0
  comment {
   access 'read write'
   type INTEGER
   count 8
   range '0 - 36'
  }
 }
 control.51 {
  iface PCM
  device 8
  name 'Playback Channel Map'
  value.0 0
  value.1 0
  value.2 0
  value.3 0
  value.4 0
  value.5 0
  value.6 0
  value.7 0
  comment {
   access 'read write'
   type INTEGER
   count 8
   range '0 - 36'
  }
 }
 control.52 {
  iface MIXER
  name 'PCM Playback Volume'
  value.0 255
  value.1 255
  comment {
   access 'read write user'
   type INTEGER
   count 2
   range '0 - 255'
   tlv '0000000100000008ffffec1400000014'
   dbmin -5100
   dbmax 0
   dbvalue.0 0
   dbvalue.1 0
  }
 }
}

Không có nhận xét nào :

Đăng nhận xét