Skip to content

Commit 1c63c1a

Browse files
committed
cs: new entry linux audio (only file)
1 parent 13085d7 commit 1c63c1a

File tree

1 file changed

+170
-0
lines changed

1 file changed

+170
-0
lines changed

cs/linux/audio.tex

+170
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
\documentclass[11pt]{article}
2+
\usepackage[utf8]{inputenc}
3+
\usepackage[T1]{fontenc} % Fix weird character
4+
\usepackage{geometry}
5+
\usepackage{amsmath}
6+
\usepackage{amssymb}
7+
\usepackage{gensymb}
8+
\usepackage{spalign}
9+
\usepackage{xfrac}
10+
\usepackage{parskip}
11+
\usepackage{float} % figure[H]
12+
\usepackage[english]{babel}
13+
\usepackage[style=ieee,backend=biber,urldate=iso,date=iso]{biblatex}
14+
\usepackage[breaklinks=true,bookmarks=true,hidelinks]{hyperref}
15+
\usepackage{tikz}
16+
\usepackage{pgfplots}
17+
\usepackage{circuitikz}
18+
\usepackage{subcaption}
19+
\usepackage[yyyymmdd]{datetime}
20+
\usepackage{url}
21+
\usetikzlibrary {arrows.meta}
22+
\pgfplotsset{compat=newest,compat/show suggested version=false}
23+
24+
% Custom shape
25+
\makeatletter
26+
\pgfdeclareshape{dflowpass}{
27+
\inheritsavedanchors[from=rectangle]
28+
\inheritanchorborder[from=rectangle]
29+
\inheritanchor[from=rectangle]{center}
30+
\anchor{left}{\pgfpoint{-0.5cm}{0cm}}
31+
\anchor{right}{\pgfpoint{0.5cm}{0cm}}
32+
% Add more custom anchors if needed
33+
\backgroundpath{
34+
% Draw the switch shape (rectangle with diagonal lines)
35+
\pgfsetlinewidth{0.85pt}
36+
\pgfpathrectanglecorners{\pgfpoint{-0.5cm}{-0.5cm}}{\pgfpoint{0.5cm}{0.5cm}}
37+
\pgfpathmoveto{\pgfpoint{-0.35cm}{0.125cm}}
38+
\pgfpathlineto{\pgfpoint{0.15cm}{0.125cm}}
39+
\pgfpathlineto{\pgfpoint{0.35cm}{-0.2cm}}
40+
\pgfusepath{draw}
41+
}
42+
}
43+
\pgfdeclareshape{dfhighpass}{
44+
\inheritsavedanchors[from=rectangle]
45+
\inheritanchorborder[from=rectangle]
46+
\inheritanchor[from=rectangle]{center}
47+
\anchor{left}{\pgfpoint{-0.5cm}{0cm}}
48+
\anchor{right}{\pgfpoint{0.5cm}{0cm}}
49+
\backgroundpath{
50+
% Draw the switch shape (rectangle with diagonal lines)
51+
\pgfsetlinewidth{1pt}
52+
\pgfpathrectanglecorners{\pgfpoint{-0.5cm}{-0.5cm}}{\pgfpoint{0.5cm}{0.5cm}}
53+
\pgfpathmoveto{\pgfpoint{0.35cm}{0.125cm}}
54+
\pgfpathlineto{\pgfpoint{-0.15cm}{0.125cm}}
55+
\pgfpathlineto{\pgfpoint{-0.35cm}{-0.2cm}}
56+
\pgfusepath{draw}
57+
}
58+
}
59+
\pgfdeclareshape{dfbandpass}{
60+
\inheritsavedanchors[from=rectangle]
61+
\inheritanchorborder[from=rectangle]
62+
\inheritanchor[from=rectangle]{center}
63+
\anchor{left}{\pgfpoint{-0.5cm}{0cm}}
64+
\anchor{right}{\pgfpoint{0.5cm}{0cm}}
65+
\backgroundpath{
66+
% Draw the switch shape (rectangle with diagonal lines)
67+
\pgfsetlinewidth{1pt}
68+
\pgfpathrectanglecorners{\pgfpoint{-0.5cm}{-0.5cm}}{\pgfpoint{0.5cm}{0.5cm}}
69+
\pgfpathmoveto{\pgfpoint{-0.35cm}{-0.2cm}}
70+
\pgfpathlineto{\pgfpoint{-0.20cm}{0.125cm}}
71+
\pgfpathlineto{\pgfpoint{0.15cm}{0.125cm}}
72+
\pgfpathlineto{\pgfpoint{0.35cm}{-0.2cm}}
73+
\pgfusepath{draw}
74+
}
75+
}
76+
\pgfdeclareshape{quantizer}{
77+
\inheritsavedanchors[from=rectangle]
78+
\inheritanchorborder[from=rectangle]
79+
\inheritanchor[from=rectangle]{center}
80+
\anchor{left}{\pgfpoint{-0.5cm}{0cm}}
81+
\anchor{right}{\pgfpoint{0.5cm}{0cm}}
82+
\backgroundpath{
83+
% Draw the switch shape (rectangle with diagonal lines)
84+
\pgfsetlinewidth{0.8pt}
85+
\pgfpathrectanglecorners{\pgfpoint{-0.5cm}{-0.5cm}}{\pgfpoint{0.5cm}{0.5cm}}
86+
\pgfpathmoveto{\pgfpoint{-0.25cm}{-0.25cm}}
87+
\pgfpathlineto{\pgfpoint{0cm}{-0.25cm}}
88+
\pgfpathlineto{\pgfpoint{0cm}{0.25cm}}
89+
\pgfpathlineto{\pgfpoint{0.25cm}{0.25cm}}
90+
\pgfusepath{draw}
91+
}
92+
}
93+
\pgfdeclareshape{quantamp}{
94+
\inheritsavedanchors[from=op amp]
95+
\inheritanchorborder[from=op amp]
96+
\inheritanchor[from=op amp]{center}
97+
\inheritanchor[from=op amp]{+}
98+
\inheritanchor[from=op amp]{-}
99+
\inheritanchor[from=op amp]{out}
100+
\inheritanchor[from=op amp]{up}
101+
\inheritanchor[from=op amp]{down}
102+
\backgroundpath{
103+
\pgfsetlinewidth{0.8pt}
104+
\pgfpathmoveto{\pgfpoint{-0.5cm}{0.55cm}}
105+
\pgfpathlineto{\pgfpoint{0.5cm}{0}}
106+
\pgfpathlineto{\pgfpoint{-0.5cm}{-0.55cm}}
107+
\pgfpathclose
108+
\pgfpathmoveto{\pgfpoint{-0.35cm}{-0.2cm}}
109+
\pgfpathlineto{\pgfpoint{-0.2cm}{-0.2cm}}
110+
\pgfpathlineto{\pgfpoint{-0.2cm}{0.2cm}}
111+
\pgfpathlineto{\pgfpoint{-0.05cm}{0.2cm}}
112+
\pgfusepath{draw}
113+
}
114+
}
115+
\pgfdeclareshape{decimation}{
116+
\inheritsavedanchors[from=rectangle]
117+
\inheritanchorborder[from=rectangle]
118+
\inheritanchor[from=rectangle]{center}
119+
\anchor{left}{\pgfpoint{-0.5cm}{0.0cm}}
120+
\anchor{right}{\pgfpoint{0.5cm}{0.0cm}}
121+
\anchor{top}{\pgfpoint{0.0cm}{0.5cm}}
122+
\anchor{bot}{\pgfpoint{0.0cm}{-0.5cm}}
123+
\backgroundpath{
124+
\pgfsetlinewidth{0.8pt}
125+
\pgfpathrectanglecorners{\pgfpoint{-0.5cm}{-0.5cm}}{\pgfpoint{0.5cm}{0.5cm}}
126+
\pgfpathmoveto{\pgfpoint{-0.25cm}{0.25cm}}
127+
\pgfpathlineto{\pgfpoint{-0.25cm}{-0.25cm}}
128+
\pgfpathmoveto{\pgfpoint{-0.30cm}{-0.185cm}}
129+
\pgfpathlineto{\pgfpoint{-0.25cm}{-0.25cm}}
130+
\pgfpathlineto{\pgfpoint{-0.20cm}{-0.185cm}}
131+
\pgfusepath{draw}
132+
}
133+
}
134+
\makeatother
135+
136+
\geometry{
137+
a4paper,
138+
hmargin=2.54cm,
139+
tmargin=1.27cm,
140+
bmargin=1.27cm,
141+
includeheadfoot
142+
}
143+
\setcounter{secnumdepth}{0} % Disable section numbering
144+
145+
\begin{filecontents}{linux-audio-stack.bib}
146+
@misc{linux:doc,
147+
author = {The Linux Kernel Community},
148+
title = {The Linux Kernel Documentation},
149+
year = {2024},
150+
url = {https://www.kernel.org/doc/html/latest/},
151+
note = {Accessed: 2024-12-27}
152+
}
153+
@misc{linux:sound,
154+
author = {The Linux Kernel Community},
155+
title = {Sound Subsystem Documentation - The Linux Kernel},
156+
year = {2024},
157+
url = {https://www.kernel.org/doc/html/latest/sound/index.html},
158+
note = {Accessed: 2024-12-27}
159+
}
160+
\end{filecontents}
161+
\addbibresource{linux-audio-stack.bib}
162+
163+
\begin{document}
164+
\section{Linux Audio Stack}
165+
166+
Linux Kernel\cite{linux:doc} audio stack. ALSA, ASoC\cite{linux:sound}
167+
168+
\newpage
169+
\printbibliography
170+
\end{document}

0 commit comments

Comments
 (0)