{"id":180,"date":"2009-10-10T15:02:40","date_gmt":"2009-10-10T07:02:40","guid":{"rendered":"https:\/\/patrick-nagel.net\/blog\/?p=180"},"modified":"2012-06-16T16:20:46","modified_gmt":"2012-06-16T08:20:46","slug":"an-equaliser-that-works-with-mpd-and-alsa","status":"publish","type":"post","link":"https:\/\/patrick-nagel.net\/blog\/archives\/180","title":{"rendered":"An equaliser that works with MPD and ALSA"},"content":{"rendered":"<p>A few months ago I was looking for a way to lower the amplification of the lower frequencies while listening to music on extremely bass-heavy in-ear headphones. The only way to accomplish that, seemed to be using JACK. Since that seemed overkill to me, I gave up.<\/p>\n<p>Today I found a solution that does not require JACK: Charles Eidsness&#8217; <a href=\"http:\/\/www.thedigitalmachine.net\/alsaequal.html\">ALSAEQUAL<\/a>. This is how you get it working with <a href=\"http:\/\/mpd.wikia.com\/wiki\/Music_Player_Daemon_Wiki\">MPD<\/a> on Gentoo:<\/p>\n<ol>\n<li>`emerge alsaequal`<\/li>\n<li>\nCreate an <tt>.asoundrc<\/tt> file in the home directory of the user that runs MPD on your system (see <tt>`grep \"^user\" \/etc\/mpd.conf`<\/tt>) with the following content:<\/p>\n<pre>\r\nctl.equal {\r\n  type equal;\r\n}\r\n\r\npcm.plugequal {\r\n  type equal;\r\n  slave.pcm \"plug:dmix\";\r\n}\r\n\r\npcm.equal {\r\n  # Or if you want the equalizer to be your\r\n  # default soundcard uncomment the following\r\n  # line and comment the above line.\r\n# pcm.!default {\r\n  type plug;\r\n  slave.pcm plugequal;\r\n}\r\n<\/pre>\n<p>(copied from the ALSAEQUAL website &#8211; modified so that dmix is being used, which allows playing multiple audio sources simultaneously)\n<\/li>\n<li>Find the <tt>audio_output<\/tt> section in your <tt>\/etc\/mpd.conf<\/tt> where you currently configure MPD to use ALSA&#8217;s default device. Change it so that it looks like\n<pre>\r\naudio_output {\r\n  type    \"alsa\"\r\n  name    \"equal\"\r\n  device  \"plug:plugequal\"\r\n}\r\n<\/pre>\n<\/li>\n<li><tt>`\/etc\/init.d\/alsasound restart && \/etc\/init.d\/mpd restart`<\/tt><\/li>\n<li>Play a track with MPD, then run <tt>`alsamixer -D equal`<\/tt><big><b>*<\/b><\/big>. Modify any of the frequency band sliders and observe the effect.<\/li>\n<\/ol>\n<p>Other applications will be unaffected by the equaliser, if you don&#8217;t change the <tt>.asoundrc<\/tt> according to the comment, and if you don&#8217;t configure them to use the &#8216;equal&#8217; ALSA device.<\/p>\n<p><big><b>*<\/b><\/big>) Note that alsamixer needs to be run as the user that runs mpd. See <a href=\"https:\/\/patrick-nagel.net\/blog\/archives\/180#comment-15317\">Ian&#8217;s comment<\/a> for details.<\/p>\n<p><strong>Update (2012-06-16):<\/strong> Having the .asoundrc in place causes Skype to crash after a few seconds (see also <a href=\"http:\/\/forums.gentoo.org\/viewtopic-t-910896-start-0-postdays-0-postorder-asc-highlight-.html\">this Gentoo Forums post<\/a>).<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A few months ago I was looking for a way to lower the amplification of the lower frequencies while listening to music on extremely bass-heavy in-ear headphones. The only way to accomplish that, seemed to be using JACK. Since that seemed overkill to me, I gave up. Today I found a solution that does not &hellip; <a href=\"https:\/\/patrick-nagel.net\/blog\/archives\/180\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;An equaliser that works with MPD and ALSA&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,13],"tags":[],"class_list":["post-180","post","type-post","status-publish","format-standard","hentry","category-gentoo-linux","category-linux-general"],"_links":{"self":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/180","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/comments?post=180"}],"version-history":[{"count":18,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/180\/revisions"}],"predecessor-version":[{"id":246,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/posts\/180\/revisions\/246"}],"wp:attachment":[{"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/media?parent=180"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/categories?post=180"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/patrick-nagel.net\/blog\/wp-json\/wp\/v2\/tags?post=180"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}