How can I add a filter to a particular post format?

Use get_post_format():

function test_filter($content) {

    $format = get_post_format();

    if ( ! $format )
        return $content;

    if ( 'audio' === $format )
        // do something with audio

    if ( 'aside' === $format )
        // do something with aside

    return "$content <hr>post format: $format";
}

Since the_content() requires a global $post object to work, get_post_format() will always work. It will return FALSE if the current post type does not support post formats and a post format slug otherwise.