summaryrefslogtreecommitdiff
path: root/.config/alsa/asoundrc
blob: 5aceda954baa1553c8d11df6061712f1a26e50fc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
@hooks [{
  func load; files [{
    @func concat; strings [
      { @func getenv; vars [ XDG_CONFIG_HOME ]; default "~/.config"; }
      "/alsa/asoundrc-"
      { @func getenv; vars [ HOSTNAME        ]; default "default"; }
    ]
  }]
  errors true;
}]

pcm.unified {
  type asym;
  capture.pcm "PrimaryCapture";
  playback.pcm "PrimaryPlayback";
  #playback.pcm "plug:both";
}

# OBS: capture aloop, mpv --audio-device=alsa/both or aloop
pcm.both {
  type plug
  slave.pcm {
    type route;
    slave.pcm {
      type multi;
      slaves {
        a.pcm "PrimaryPlayback"
        #b.pcm "null"
        b.pcm "aloop"
        #c.pcm "null"
        #c.pcm "bthome"
        a.channels 2
        b.channels 2
        #c.channels 2
      }
      bindings {
        0 { slave a; channel 0 }
        1 { slave a; channel 1 }
        2 { slave b; channel 0 }
        3 { slave b; channel 1 }
        #4 { slave c; channel 0 }
        #5 { slave c; channel 1 }
      }
    }
    ttable {
      0 {
        0 1;
        2 1;
        #4 1;
      }
      1 {
        1 1;
        3 1;
        #5 1;
      }
    }
  }
}

pcm.aloop {
  type asym;
  capture.pcm {
# i don't know why i can't just plug:dsnoop:Loopback,1 here
    type plug;
    slave.pcm "dsnoop:Loopback,1";
  }
  playback.pcm "plug:dmix:Loopback";
}

# extraneous test of subdev syntax
pcm.dsnoopaloop {
      type dsnoop
      ipc_key 98
      slave {
        pcm "hw:Loopback,1,0";
        rate 48000;
        period_size 1024;
      }
}
pcm.dmixaloop {
      type dmix
      ipc_key 99
      slave {
        pcm "hw:Loopback,0,0";
        rate 48000;
        period_size 1024;
      }
}

pcm.btcar {
  profile a2dp
  #type bluetooth # old 1.0
  type bluealsa   # new 1.1
  device 00:00:00:66:6F:73 # killed by voltage regulator
}

pcm.bthome {
  profile a2dp
  #type bluetooth # old 1.0
  type bluealsa   # new 1.1
  device C8:84:47:03:B4:54
}

defaults.bluealsa.profile a2dp
#defaults.bluealsa.delay 10000